SearchTable Of ContentsPrevious topicClass Phalcon\Mvc\Model\MetaData\Memory Next topicThis Page |
Class Phalcon\Mvc\Model\MetaData\Session¶extends Phalcon\Mvc\Model\MetaData implements Phalcon\Mvc\Model\MetaDataInterface Stores model meta-data in session. Data will erased when the session finishes. Meta-data are permanent while the session is active. You can query the meta-data by printing $_SESSION[‘$PMM$’] <?php
$metaData = new Phalcon\Mvc\Model\Metadata\Session(array(
'suffix' => 'my-app-id'
));
Constants¶integer MODELS_ATTRIBUTES integer MODELS_PRIMARY_KEY integer MODELS_NON_PRIMARY_KEY integer MODELS_NOT_NULL integer MODELS_DATA_TYPES integer MODELS_DATA_TYPES_NUMERIC integer MODELS_DATE_AT integer MODELS_DATE_IN integer MODELS_IDENTITY_COLUMN integer MODELS_DATA_TYPES_BIND integer MODELS_AUTOMATIC_DEFAULT_INSERT integer MODELS_AUTOMATIC_DEFAULT_UPDATE integer MODELS_COLUMN_MAP integer MODELS_REVERSE_COLUMN_MAP Methods¶public __construct (array $options) Phalcon\Mvc\Model\MetaData\Session constructor public array read (unknown $key) Reads meta-data from $_SESSION public write (string $key, array $data) Writes the meta-data to $_SESSION protected _initialize () inherited from Phalcon\Mvc\Model\MetaData Initialize the metadata for certain table public array readMetaData (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Reads meta-data for certain model public readMetaDataIndex (Phalcon\Mvc\ModelInterface $model, int $index) inherited from Phalcon\Mvc\Model\MetaData Reads meta-data for certain model using a MODEL_* constant public writeMetaDataIndex (Phalcon\Mvc\ModelInterface $model, int $index, mixed $data) inherited from Phalcon\Mvc\Model\MetaData Writes meta-data for certain model using a MODEL_* constant public array readColumnMap (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Reads the ordered/reversed column map for certain model public readColumnMapIndex (Phalcon\Mvc\ModelInterface $model, int $index) inherited from Phalcon\Mvc\Model\MetaData Reads column-map information for certain model using a MODEL_* constant public array getAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns table attributes names (fields) public array getPrimaryKeyAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns an array of fields which are part of the primary key public array getNonPrimaryKeyAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns an arrau of fields which are not part of the primary key public array getNotNullAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns an array of not null attributes public array getDataTypes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns attributes and their data types public array getDataTypesNumeric (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns attributes which types are numerical public string getIdentityField (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns the name of identity field (if one is present) public array getBindTypes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns attributes and their bind data types public array getAutomaticCreateAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns attributes that must be ignored from the INSERT SQL generation public array getAutomaticUpdateAttributes (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns attributes that must be ignored from the UPDATE SQL generation public setAutomaticCreateAttributes (Phalcon\Mvc\ModelInterface $model, array $attributes) inherited from Phalcon\Mvc\Model\MetaData Set the attributes that must be ignored from the INSERT SQL generation public setAutomaticUpdateAttributes (Phalcon\Mvc\ModelInterface $model, array $attributes) inherited from Phalcon\Mvc\Model\MetaData Set the attributes that must be ignored from the UPDATE SQL generation public array getColumnMap (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns the column map if any public array getReverseColumnMap (Phalcon\Mvc\ModelInterface $model) inherited from Phalcon\Mvc\Model\MetaData Returns the reverse column map if any public boolean hasAttribute (Phalcon\Mvc\ModelInterface $model, unknown $attribute) inherited from Phalcon\Mvc\Model\MetaData Check if a model has certain attribute public boolean isEmpty () inherited from Phalcon\Mvc\Model\MetaData Checks if the internal meta-data container is empty public reset () inherited from Phalcon\Mvc\Model\MetaData Resets internal meta-data in order to regenerate it |