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
파일 보기 프로젝트 열기: contao/core-bundle 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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