Class **Phalcon\\Mvc\\Model\\MetaData\\Memory** =============================================== *extends* abstract class :doc:`Phalcon\\Mvc\\Model\\MetaData ` *implements* :doc:`Phalcon\\Di\\InjectionAwareInterface `, :doc:`Phalcon\\Mvc\\Model\\MetaDataInterface ` .. role:: raw-html(raw) :format: html :raw-html:`Source on GitHub` Stores model meta-data in memory. Data will be erased when the request finishes 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_EMPTY_STRING_VALUES** *integer* **MODELS_COLUMN_MAP** *integer* **MODELS_REVERSE_COLUMN_MAP** Methods ------- public **__construct** ([*array* $options]) Phalcon\\Mvc\\Model\\MetaData\\Memory constructor public *array* **read** (*string* $key) Reads the meta-data from temporal memory public **write** (*string* $key, *array* $data) Writes the meta-data to temporal memory final protected **_initialize** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model, *unknown* $key, *unknown* $table, *unknown* $schema) inherited from Phalcon\\Mvc\\Model\\MetaData Initialize the metadata for certain table public **setDI** (:doc:`Phalcon\\DiInterface ` $dependencyInjector) inherited from Phalcon\\Mvc\\Model\\MetaData Sets the DependencyInjector container public **getDI** () inherited from Phalcon\\Mvc\\Model\\MetaData Returns the DependencyInjector container public **setStrategy** (:doc:`Phalcon\\Mvc\\Model\\MetaData\\StrategyInterface ` $strategy) inherited from Phalcon\\Mvc\\Model\\MetaData Set the meta-data extraction strategy public **getStrategy** () inherited from Phalcon\\Mvc\\Model\\MetaData Return the strategy to obtain the meta-data final public **readMetaData** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Reads the complete meta-data for certain model .. code-block:: php readMetaData(new Robots()); final public **readMetaDataIndex** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model, *unknown* $index) inherited from Phalcon\\Mvc\\Model\\MetaData Reads meta-data for certain model .. code-block:: php readMetaDataIndex(new Robots(), 0); final public **writeMetaDataIndex** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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 **readColumnMap** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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 **getAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns table attributes names (fields) .. code-block:: php getAttributes(new Robots())); public **getPrimaryKeyAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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 **getNonPrimaryKeyAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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 **getNotNullAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns an array of not null attributes .. code-block:: php getNotNullAttributes(new Robots())); public **getDataTypes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes and their data types .. code-block:: php getDataTypes(new Robots())); public **getDataTypesNumeric** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes which types are numerical .. code-block:: php getDataTypesNumeric(new Robots())); public *string* **getIdentityField** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns the name of identity field (if one is present) .. code-block:: php getIdentityField(new Robots())); public **getBindTypes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes and their bind data types .. code-block:: php getBindTypes(new Robots())); public **getAutomaticCreateAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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 **getAutomaticUpdateAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $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** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model, *array* $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** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model, *array* $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 **setEmptyStringAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model, *array* $attributes) inherited from Phalcon\\Mvc\\Model\\MetaData Set the attributes that allow empty string values .. code-block:: php setEmptyStringAttributes(new Robots(), array('name' => true)); public **getEmptyStringAttributes** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes allow empty strings .. code-block:: php getEmptyStringAttributes(new Robots())); public **getDefaultValues** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns attributes (which have default values) and their default values .. code-block:: php getDefaultValues(new Robots())); public **getColumnMap** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns the column map if any .. code-block:: php getColumnMap(new Robots())); public **getReverseColumnMap** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model) inherited from Phalcon\\Mvc\\Model\\MetaData Returns the reverse column map if any .. code-block:: php getReverseColumnMap(new Robots())); public **hasAttribute** (:doc:`Phalcon\\Mvc\\ModelInterface ` $model, *unknown* $attribute) inherited from Phalcon\\Mvc\\Model\\MetaData Check if a model has certain attribute .. code-block:: php hasAttribute(new Robots(), 'name')); public **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();