Mvc\Model\MetaData

Abstract class Phalcon\Mvc\Model\MetaData

implements Phalcon\DI\InjectionAwareInterface, Phalcon\Mvc\Model\MetaDataInterface

Because Phalcon\Mvc\Model requires meta-data like field names, data types, primary keys, etc. this component collect them and store for further querying by Phalcon\Mvc\Model. Phalcon\Mvc\Model\MetaData can also use adapters to store temporarily or permanently the meta-data. A standard Phalcon\Mvc\Model\MetaData can be used to query model attributes:

$metaData = new Phalcon\Mvc\Model\MetaData\Memory();
$attributes = $metaData->getAttributes(new Robots());
print_r($attributes);

Constants

登录查看完整内容