Свойство | Тип | Описание | |
---|---|---|---|
$_metadata | array |
Метод | Описание | |
---|---|---|
getAttributes ( string | ManaPHP\Mvc\ModelInterface $model ) : array | Returns table attributes names (fields) | |
getAutoIncrementAttribute ( string | ManaPHP\Mvc\ModelInterface $model ) : string | null | Returns attribute which is auto increment or null | |
getColumnProperties ( string | ManaPHP\Mvc\ModelInterface $model ) : array | ||
getNonPrimaryKeyAttributes ( string | ManaPHP\Mvc\ModelInterface $model ) : array | Returns an array of fields which are not part of the primary key | |
getPrimaryKeyAttributes ( string | ManaPHP\Mvc\ModelInterface $model ) : array | Returns an array of fields which are part of the primary key | |
hasAttribute ( string | ManaPHP\Mvc\ModelInterface $model, string $attribute ) : boolean | Check if a model has certain attribute |
Метод | Описание | |
---|---|---|
_readMetaData ( string | ManaPHP\Mvc\ModelInterface $model ) : array | Reads the complete meta-data for certain model |
print_r($metaData->readMetaData(new Robots()));
protected _readMetaData ( string | ManaPHP\Mvc\ModelInterface $model ) : array | ||
$model | string | ManaPHP\Mvc\ModelInterface | |
Результат | array |
print_r($metaData->getAttributes(new Robots()));
public getAttributes ( string | ManaPHP\Mvc\ModelInterface $model ) : array | ||
$model | string | ManaPHP\Mvc\ModelInterface | |
Результат | array |
public getColumnProperties ( string | ManaPHP\Mvc\ModelInterface $model ) : array | ||
$model | string | ManaPHP\Mvc\ModelInterface | |
Результат | array |
public getNonPrimaryKeyAttributes ( string | ManaPHP\Mvc\ModelInterface $model ) : array | ||
$model | string | ManaPHP\Mvc\ModelInterface | |
Результат | array |
print_r($metaData->getPrimaryKeyAttributes(new Robots()));
public getPrimaryKeyAttributes ( string | ManaPHP\Mvc\ModelInterface $model ) : array | ||
$model | string | ManaPHP\Mvc\ModelInterface | |
Результат | array |
var_dump($metaData->hasAttribute(new Robots(), 'name'));