PHP Класс Contao\DcaExtractor

The class parses the DCA files and stores various extracts like relations in the cache directory. This meta data can then be loaded and used in the application (e.g. the Model classes). Usage: $user = DcaExtractor::getInstance('tl_user'); if ($user->hasRelations()) { print_r($user->getRelations()); }
Наследование: extends Controller
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$arrFields array Fields
$arrInstances DcaExtractor[] Instances
$arrKeys array Keys
$arrMeta array Meta data
$arrOrderFields array Order fields
$arrRelations array Relations
$arrSql array SQL buffer
$arrUniqueFields array Unique fields
$blnIsDbTable boolean Database table
$strTable string Table name

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

Метод Описание
__clone ( ) Prevent cloning of the object (Singleton)
getDbInstallerArray ( ) : array Return an array that can be used by the database installer
getFields ( ) : array Return the fields as array
getInstance ( string $strTable ) : DcaExtractor Get one object instance per table
getKeys ( ) : array Return the keys as array
getMeta ( ) : array Return the meta data as array
getOrderFields ( ) : array Return the order fields as array
getRelations ( ) : array Return the relations as array
getUniqueFields ( ) : array Return an array of unique columns
hasFields ( ) : boolean Return true if there are fields
hasKeys ( ) : boolean Return true if there are keys
hasMeta ( ) : boolean Return true if there is meta data
hasOrderFields ( ) : boolean Return true if there are order fields
hasRelations ( ) : boolean Return true if there are relations
hasUniqueFields ( ) : boolean Return true if there are unique fields
isDbTable ( ) : boolean Return true if the extract relates to a database table

Защищенные методы

Метод Описание
__construct ( string $strTable ) Load or create the extract
createExtract ( ) Create the extract from the DCA or the database.sql files

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

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

Prevent cloning of the object (Singleton)
final public __clone ( )

__construct() защищенный Метод

Load or create the extract
protected __construct ( string $strTable )
$strTable string The table name

createExtract() защищенный Метод

Create the extract from the DCA or the database.sql files
protected createExtract ( )

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

Return an array that can be used by the database installer
public getDbInstallerArray ( ) : array
Результат array The data array

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

Return the fields as array
public getFields ( ) : array
Результат array The fields array

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

Get one object instance per table
public static getInstance ( string $strTable ) : DcaExtractor
$strTable string The table name
Результат DcaExtractor The object instance

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

Return the keys as array
public getKeys ( ) : array
Результат array The keys array

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

Return the meta data as array
public getMeta ( ) : array
Результат array The meta data

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

Return the order fields as array
public getOrderFields ( ) : array
Результат array The order fields array

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

Return the relations as array
public getRelations ( ) : array
Результат array The relations array

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

Return an array of unique columns
public getUniqueFields ( ) : array
Результат array

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

Return true if there are fields
public hasFields ( ) : boolean
Результат boolean True if there are fields

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

Return true if there are keys
public hasKeys ( ) : boolean
Результат boolean True if there are keys

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

Return true if there is meta data
public hasMeta ( ) : boolean
Результат boolean True if there is meta data

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

Return true if there are order fields
public hasOrderFields ( ) : boolean
Результат boolean True if there are order fields

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

Return true if there are relations
public hasRelations ( ) : boolean
Результат boolean True if there are relations

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

Return true if there are unique fields
public hasUniqueFields ( ) : boolean
Результат boolean True if there are unique fields

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

Return true if the extract relates to a database table
public isDbTable ( ) : boolean
Результат boolean True if the extract relates to a database table

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

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

Fields
protected array $arrFields
Результат array

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

Instances
protected static DcaExtractor[],contao $arrInstances
Результат DcaExtractor[]

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

Keys
protected array $arrKeys
Результат array

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

Meta data
protected array $arrMeta
Результат array

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

Order fields
protected array $arrOrderFields
Результат array

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

Relations
protected array $arrRelations
Результат array

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

SQL buffer
protected static array $arrSql
Результат array

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

Unique fields
protected array $arrUniqueFields
Результат array

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

Database table
protected bool $blnIsDbTable
Результат boolean

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

Table name
protected string $strTable
Результат string