PHP Класс PHPUnit_Extensions_Database_DB_MetaData, qcodo

Автор: Mike Lively ([email protected])
Наследование: implements PHPUnit_Extensions_Database_DB_IMetaData
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$metaDataClassMap
$pdo PDO The PDO connection used to retreive database meta data
$schema string The default schema name for the meta data object.
$schemaObjectQuoteChar The character used to quote schema objects.
$truncateCommand The command used to perform a TRUNCATE operation.

Открытые методы

Метод Описание
__construct ( PDO $pdo, string $schema = '' ) Creates a new database meta data object using the given pdo connection and schema name.
allowsCascading ( ) : boolean Returns true if the rdbms allows cascading
createMetaData ( PDO $pdo, string $schema = '' ) : PHPUnit_Extensions_Database_DB_MetaData Creates a meta data object based on the driver of given $pdo object and $schema name.
getSchema ( ) : string Returns the schema for the connection.
getTruncateCommand ( ) : string Returns the command for the database to truncate a table.
quoteSchemaObject ( string $object ) : string Returns a quoted schema object. (table name, column name, etc)
registerClassWithDriver ( string $className, string $pdoDriver ) : ReflectionClass Validates and registers the given $className with the given $pdoDriver.
splitTableName ( string $fullTableName ) : array Seperates the schema and the table from a fully qualified table name.

Описание методов

__construct() закрытый публичный Метод

Creates a new database meta data object using the given pdo connection and schema name.
final public __construct ( PDO $pdo, string $schema = '' )
$pdo PDO
$schema string

allowsCascading() публичный Метод

Returns true if the rdbms allows cascading
public allowsCascading ( ) : boolean
Результат boolean

createMetaData() публичный статический Метод

Creates a meta data object based on the driver of given $pdo object and $schema name.
public static createMetaData ( PDO $pdo, string $schema = '' ) : PHPUnit_Extensions_Database_DB_MetaData
$pdo PDO
$schema string
Результат PHPUnit_Extensions_Database_DB_MetaData

getSchema() публичный Метод

Returns the schema for the connection.
public getSchema ( ) : string
Результат string

getTruncateCommand() публичный Метод

Returns the command for the database to truncate a table.
public getTruncateCommand ( ) : string
Результат string

quoteSchemaObject() публичный Метод

Returns a quoted schema object. (table name, column name, etc)
public quoteSchemaObject ( string $object ) : string
$object string
Результат string

registerClassWithDriver() публичный статический Метод

It should be noted that this function will not attempt to include / require the file. The $pdoDriver can be determined by the value of the PDO::ATTR_DRIVER_NAME attribute for a pdo object. A reflection of the $className is returned.
public static registerClassWithDriver ( string $className, string $pdoDriver ) : ReflectionClass
$className string
$pdoDriver string
Результат ReflectionClass

splitTableName() публичный Метод

Returns an associative array containing the 'schema' and the 'table'.
public splitTableName ( string $fullTableName ) : array
$fullTableName string
Результат array

Описание свойств

$metaDataClassMap защищенное статическое свойство

protected static $metaDataClassMap

$pdo защищенное свойство

The PDO connection used to retreive database meta data
protected PDO $pdo
Результат PDO

$schema защищенное свойство

The default schema name for the meta data object.
protected string $schema
Результат string

$schemaObjectQuoteChar защищенное свойство

The character used to quote schema objects.
protected $schemaObjectQuoteChar

$truncateCommand защищенное свойство

The command used to perform a TRUNCATE operation.
protected $truncateCommand