Make class names Pascal Case
This commit is contained in:
parent
39cd2ecff8
commit
b5a141ffc7
@ -25,7 +25,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
abstract class Abstract_Driver extends \PDO implements Driver_Interface {
|
abstract class AbstractDriver extends \PDO implements DriverInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the last executed query
|
* Reference to the last executed query
|
@ -21,7 +21,7 @@ namespace Query;
|
|||||||
* Abstract Class for internal implementation methods of the Query Builder
|
* Abstract Class for internal implementation methods of the Query Builder
|
||||||
* @package Query
|
* @package Query
|
||||||
*/
|
*/
|
||||||
abstract class Abstract_Query_Builder {
|
abstract class AbstractQueryBuilder {
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// ! Constants
|
// ! Constants
|
@ -21,7 +21,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
abstract class Abstract_SQL implements SQL_Interface {
|
abstract class AbstractSQL implements SQLInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit clause
|
* Limit clause
|
@ -25,7 +25,7 @@ namespace Query;
|
|||||||
* @method string quote_ident(string $sql)
|
* @method string quote_ident(string $sql)
|
||||||
* @method string quote_table(string $sql)
|
* @method string quote_table(string $sql)
|
||||||
*/
|
*/
|
||||||
abstract class Abstract_Util {
|
abstract class AbstractUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the current connection object
|
* Reference to the current connection object
|
||||||
@ -37,7 +37,7 @@ abstract class Abstract_Util {
|
|||||||
*
|
*
|
||||||
* @param Driver_Interface $conn
|
* @param Driver_Interface $conn
|
||||||
*/
|
*/
|
||||||
public function __construct(Driver_Interface $conn)
|
public function __construct(DriverInterface $conn)
|
||||||
{
|
{
|
||||||
$this->conn = $conn;
|
$this->conn = $conn;
|
||||||
}
|
}
|
@ -22,7 +22,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
*/
|
*/
|
||||||
final class Connection_Manager {
|
final class ConnectionManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map of named database connections
|
* Map of named database connections
|
||||||
@ -144,7 +144,7 @@ final class Connection_Manager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create Query Builder object
|
// Create Query Builder object
|
||||||
$conn = new Query_Builder($db, new Query_Parser($db));
|
$conn = new QueryBuilder($db, new QueryParser($db));
|
||||||
|
|
||||||
|
|
||||||
// Save it for later
|
// Save it for later
|
@ -21,7 +21,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
interface Driver_Interface {
|
interface DriverInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor/Connection method
|
* Constructor/Connection method
|
@ -23,7 +23,7 @@ namespace Query\Drivers\Firebird;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Driver extends \Query\Abstract_Driver {
|
class Driver extends \Query\AbstractDriver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the last query executed
|
* Reference to the last query executed
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Firebird;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class SQL extends \Query\Abstract_SQL {
|
class SQL extends \Query\AbstractSQL {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit clause
|
* Limit clause
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Firebird;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Util extends \Query\Abstract_Util {
|
class Util extends \Query\AbstractUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience public function to generate sql for creating a db table
|
* Convenience public function to generate sql for creating a db table
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Mysql;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Driver extends \Query\Abstract_Driver {
|
class Driver extends \Query\AbstractDriver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the backtick as the MySQL escape character
|
* Set the backtick as the MySQL escape character
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Mysql;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class SQL extends \Query\Abstract_SQL {
|
class SQL extends \Query\AbstractSQL {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit clause
|
* Limit clause
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Mysql;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Util extends \Query\Abstract_Util {
|
class Util extends \Query\AbstractUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an SQL backup file for the current database's structure
|
* Create an SQL backup file for the current database's structure
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Pgsql;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Driver extends \Query\Abstract_Driver {
|
class Driver extends \Query\AbstractDriver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a PosgreSQL database
|
* Connect to a PosgreSQL database
|
||||||
|
@ -20,7 +20,7 @@ namespace Query\Drivers\Pgsql;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class SQL extends \Query\Abstract_SQL {
|
class SQL extends \Query\AbstractSQL {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the query plan for the sql query
|
* Get the query plan for the sql query
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Pgsql;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Util extends \Query\Abstract_Util {
|
class Util extends \Query\AbstractUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an SQL backup file for the current database's structure
|
* Create an SQL backup file for the current database's structure
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Sqlite;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class Driver extends \Query\Abstract_Driver {
|
class Driver extends \Query\AbstractDriver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the last executed sql query
|
* Reference to the last executed sql query
|
||||||
|
@ -21,7 +21,7 @@ namespace Query\Drivers\Sqlite;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Drivers
|
* @subpackage Drivers
|
||||||
*/
|
*/
|
||||||
class SQL extends \Query\Abstract_SQL {
|
class SQL extends \Query\AbstractSQL {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the query plan for the sql query
|
* Get the query plan for the sql query
|
||||||
|
@ -23,7 +23,7 @@ namespace Query\Drivers\Sqlite;
|
|||||||
* @method mixed query(string $sql)
|
* @method mixed query(string $sql)
|
||||||
* @method string quote(string $str)
|
* @method string quote(string $str)
|
||||||
*/
|
*/
|
||||||
class Util extends \Query\Abstract_Util {
|
class Util extends \Query\AbstractUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an SQL backup file for the current database's data
|
* Create an SQL backup file for the current database's data
|
||||||
|
@ -24,7 +24,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Query_Builder
|
* @subpackage Query_Builder
|
||||||
*/
|
*/
|
||||||
class Query_Builder extends Abstract_Query_Builder implements Query_Builder_Interface {
|
class QueryBuilder extends AbstractQueryBuilder implements QueryBuilderInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String class values to be reset
|
* String class values to be reset
|
@ -21,7 +21,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Query_Builder
|
* @subpackage Query_Builder
|
||||||
*/
|
*/
|
||||||
interface Query_Builder_Interface {
|
interface QueryBuilderInterface {
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// ! Select Queries
|
// ! Select Queries
|
@ -21,7 +21,7 @@ namespace Query;
|
|||||||
* @package Query
|
* @package Query
|
||||||
* @subpackage Query_Builder
|
* @subpackage Query_Builder
|
||||||
*/
|
*/
|
||||||
class Query_Parser {
|
class QueryParser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DB Driver
|
* DB Driver
|
@ -91,7 +91,7 @@ if ( ! function_exists('from_camel_case'))
|
|||||||
preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);
|
preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);
|
||||||
$ret = $matches[0];
|
$ret = $matches[0];
|
||||||
foreach ($ret as &$match) {
|
foreach ($ret as &$match) {
|
||||||
$match = strtolower($match);// == strtoupper($match) ? strtolower($match) : lcfirst($match);
|
$match = strtolower($match);
|
||||||
}
|
}
|
||||||
return implode('_', $ret);
|
return implode('_', $ret);
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ if ( ! function_exists('Query'))
|
|||||||
*/
|
*/
|
||||||
function Query($params = '')
|
function Query($params = '')
|
||||||
{
|
{
|
||||||
$cmanager = \Query\Connection_Manager::get_instance();
|
$cmanager = \Query\ConnectionManager::get_instance();
|
||||||
|
|
||||||
// If you are getting a previously created connection
|
// If you are getting a previously created connection
|
||||||
if (is_scalar($params))
|
if (is_scalar($params))
|
||||||
|
Loading…
Reference in New Issue
Block a user