Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanniramos committed Mar 26, 2014
1 parent f27d9bd commit c2f68dd
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 163 deletions.
16 changes: 12 additions & 4 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@
Deny from all
</FilesMatch>

# Friendly URL
# Rewrites for pretty URLs
<IfModule mod_rewrite.c>
RewriteEngine On

# Optional - The location of the project directory
#RewriteBase /path/to/project

# Ignoring any existing files
RewriteCond %{REQUEST_FILENAME} !-f

# Ignoring any existing directories
RewriteCond %{REQUEST_FILENAME} !-d
# Example 1 - Only pagination: http://localhost/PDO4You/index.php?n=1 OR http://localhost/PDO4You/index/n/1

# Example 1 - Only pagination: http://localhost/path/to/project/index.php?n=1 OR http://localhost/path/to/project/index/n/1
RewriteRule ^([A-Za-z]+)/([A-Za-z]+)/([0-9]+)/?$ $1.php?$2=$3 [L]
# Example 2 - Pagination + Id + Slug: http://localhost/PDO4You/index/paginator/number-current-page/id/some-title

# Example 2 - Pagination + Id + Slug: http://localhost/path/to/project/index/paginator/number-current-page/id/some-title
RewriteRule ^([A-Za-z]+)/([A-Za-z]+)/([0-9]+)/([0-9]+)/([\w\-\.]+)/?$ $1.php?$2=$3&id=$4&slug=$5 [L]
# For demo page: http://localhost/PDO4You/index/paginator/number-current-page/page-demo/page-name-demo

# For demo page: http://localhost/path/to/project/index/paginator/number-current-page/page-demo/page-name-demo
RewriteRule ^(\w+)/(\w+)/(\d+)/(\w+)/([\w]+)/?$ $1.php?$2=$3&$4=$5 [L]
RewriteRule ^(\w+)/(\w+)/(\d+)/(\w+)/?$ $1.php [L]
RewriteRule ^(\w+)/?$ $1.php [L]
Expand Down
21 changes: 7 additions & 14 deletions src/PDO4You/Describe.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

// Defining namespaces
namespace PDO4You;

// Importing classes
Expand All @@ -11,13 +10,12 @@
* Describe class
*
* @author Giovanni Ramos <giovannilauro@gmail.com>
* @copyright 2010-2013, Giovanni Ramos
* @copyright 2010-2014, Giovanni Ramos
* @since 2010-09-07
* @license http://opensource.org/licenses/MIT
* @link http://github.com/giovanniramos/PDO4You
* @package PDO4You
*
* */
*/
class Describe
{

Expand All @@ -27,8 +25,7 @@ class Describe
* @access public static
* @param string $schema Name of the schema used
* @return void
*
* */
*/
public static function showTables($schema = null)
{
try {
Expand Down Expand Up @@ -58,8 +55,7 @@ public static function showTables($schema = null)
* @access private static
* @param void
* @return void
*
* */
*/
private static function showMySqlTables()
{
Singleton::setStyle();
Expand Down Expand Up @@ -93,8 +89,7 @@ private static function showMySqlTables()
* @access private static
* @param string $schema Name of scheme
* @return void
*
* */
*/
private static function showPgSqlTables($schema)
{
Singleton::setStyle();
Expand Down Expand Up @@ -126,8 +121,7 @@ private static function showPgSqlTables($schema)
* @access private static
* @param void
* @return void
*
* */
*/
private static function showCubridTables()
{
Singleton::setStyle();
Expand Down Expand Up @@ -161,8 +155,7 @@ private static function showCubridTables()
* @access private static
* @param string $schema Name of scheme
* @return void
*
* */
*/
private static function showMsSqlTables($schema)
{
Singleton::setStyle();
Expand Down
6 changes: 2 additions & 4 deletions src/PDO4You/PDO4You.config.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?php

// Defining namespaces
namespace PDO4You;

/**
* Initial Configuration
*
* @author Giovanni Ramos <giovannilauro@gmail.com>
* @copyright 2010-2013, Giovanni Ramos
* @copyright 2010-2014, Giovanni Ramos
* @since 2010-09-07
* @license http://opensource.org/licenses/MIT
* @link http://github.com/giovanniramos/PDO4You
* @package PDO4You
*
* */
*/
interface Config
{
// Connection adapter defined in: PDO4You.settings.ini
Expand Down
Loading

0 comments on commit c2f68dd

Please sign in to comment.