Class **Phalcon\\Mvc\\Model\\MetaData\\Session** ================================================ *extends* abstract class :doc:`Phalcon\\Mvc\\Model\\MetaData ` *implements* :doc:`Phalcon\\Di\\InjectionAwareInterface `, :doc:`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$'] .. code-block:: php '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_DEFAULT_VALUES** *integer* **MODELS_COLUMN_MAP** *integer* **MODELS_REVERSE_COLUMN_MAP** Methods ------- public **__construct** ([*unknown* $options]) Phalcon\\Mvc\\Model\\MetaData\\Session constructor public *array* **read** (*unknown* $key) Reads meta-data from $_SESSION public **write** (*unknown* $key, *unknown* $data) Writes the meta-data to $_SESSION final protected **_initialize** (*unknown* $model, *unknown* $key, *unknown* $table, *unknown* $schema) inherited from Phalcon\\Mvc\\Model\\MetaData Initialize the metadata for certain table public **setDI** (*unknown* $dependencyInjector) inherited from Phalcon\\Mvc\\Model\\MetaData Sets the DependencyInjector container public :doc:`Phalcon\\DiInterface ` **getDI** () inherited from Phalcon\\Mvc\\Model\\MetaData Returns the DependencyInjector container public **setStrategy** (*unknown* $strategy) inherited from Phalcon\\Mvc\\Model\\MetaData Set the meta-data extraction strategy public :doc:`Phalcon\\Mvc\\Model\\MetaData\\StrategyInterface ` **getStrategy** () inherited from Phalcon\\Mvc\\Model\\MetaData Return the strategy to obtain the meta-data final public *array* **readMetaData** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Reads the complete meta-data for certain model .. code-block:: php readMetaData(new Robots()); final public *mixed* **readMetaDataIndex** (*unknown* $model, *unknown* $index) inherited from Phalcon\\Mvc\\Model\\MetaData Reads meta-data for certain model using a MODEL_* constant .. code-block:: php writeColumnMapIndex(new Robots(), MetaData::MODELS_REVERSE_COLUMN_MAP, array('leName' => 'name'))); final public **writeMetaDataIndex** (*unknown* $model, *unknown* $index, *unknown* $data) inherited from Phalcon\\Mvc\\Model\\MetaData Writes meta-data for certain model using a MODEL_* constant .. code-block:: php writeColumnMapIndex(new Robots(), MetaData::MODELS_REVERSE_COLUMN_MAP, array('leName' => 'name'))); final public *array* **readColumnMap** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Reads the ordered/reversed column map for certain model .. code-block:: php readColumnMap(new Robots())); final public **readColumnMapIndex** (*unknown* $model, *unknown* $index) inherited from Phalcon\\Mvc\\Model\\MetaData Reads column-map information for certain model using a MODEL_* constant .. code-block:: php readColumnMapIndex(new Robots(), MetaData::MODELS_REVERSE_COLUMN_MAP)); public *array* **getAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns table attributes names (fields) .. code-block:: php getAttributes(new Robots())); public *array* **getPrimaryKeyAttributes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns an array of fields which are part of the primary key .. code-block:: php getPrimaryKeyAttributes(new Robots())); public *array* **getNonPrimaryKeyAttributes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns an array of fields which are not part of the primary key .. code-block:: php getNonPrimaryKeyAttributes(new Robots())); public *array* **getNotNullAttributes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns an array of not null attributes .. code-block:: php getNotNullAttributes(new Robots())); public *array* **getDataTypes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes and their data types .. code-block:: php getDataTypes(new Robots())); public *array* **getDataTypesNumeric** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes which types are numerical .. code-block:: php getDataTypesNumeric(new Robots())); public *string* **getIdentityField** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns the name of identity field (if one is present) .. code-block:: php getIdentityField(new Robots())); public *array* **getBindTypes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes and their bind data types .. code-block:: php getBindTypes(new Robots())); public *array* **getAutomaticCreateAttributes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes that must be ignored from the INSERT SQL generation .. code-block:: php getAutomaticCreateAttributes(new Robots())); public *array* **getAutomaticUpdateAttributes** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes that must be ignored from the UPDATE SQL generation .. code-block:: php getAutomaticUpdateAttributes(new Robots())); public **setAutomaticCreateAttributes** (*unknown* $model, *unknown* $attributes) inherited from Phalcon\\Mvc\\Model\\MetaData Set the attributes that must be ignored from the INSERT SQL generation .. code-block:: php setAutomaticCreateAttributes(new Robots(), array('created_at' => true)); public **setAutomaticUpdateAttributes** (*unknown* $model, *unknown* $attributes) inherited from Phalcon\\Mvc\\Model\\MetaData Set the attributes that must be ignored from the UPDATE SQL generation .. code-block:: php setAutomaticUpdateAttributes(new Robots(), array('modified_at' => true)); public *array* **getDefaultValues** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes (which have default values) and their default values .. code-block:: php getDefaultValues(new Robots())); public *array* **getColumnMap** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns the column map if any .. code-block:: php getColumnMap(new Robots())); public *array* **getReverseColumnMap** (*unknown* $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns the reverse column map if any .. code-block:: php getReverseColumnMap(new Robots())); public *boolean* **hasAttribute** (*unknown* $model, *unknown* $attribute) inherited from Phalcon\\Mvc\\Model\\MetaData Check if a model has certain attribute .. code-block:: php hasAttribute(new Robots(), 'name')); public *boolean* **isEmpty** () inherited from Phalcon\\Mvc\\Model\\MetaData Checks if the internal meta-data container is empty .. code-block:: php isEmpty()); public **reset** () inherited from Phalcon\\Mvc\\Model\\MetaData Resets internal meta-data in order to regenerate it .. code-block:: php reset();