Class **Phalcon\\Mvc\\Model\\Criteria** ======================================= *implements* :doc:`Phalcon\\Mvc\\Model\\CriteriaInterface `, :doc:`Phalcon\\DI\\InjectionAwareInterface ` This class allows to build the array parameter required by Phalcon\\Mvc\\Model::find and Phalcon\\Mvc\\Model::findFirst, using an object-oriented interfase Methods --------- public **setDI** (:doc:`Phalcon\\DiInterface ` $dependencyInjector) Sets the DependencyInjector container public :doc:`Phalcon\\DiInterface ` **getDI** () Returns the DependencyInjector container public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **setModelName** (*string* $modelName) Set a model on which the query will be executed public *string* **getModelName** () Returns an internal model name on which the criteria will be applied public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **bind** (*string* $bindParams) Adds the bind parameter to the criteria public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **where** (*string* $conditions) Adds the conditions parameter to the criteria public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **addWhere** (*string* $conditions) Appends a condition to the current conditions using an AND operator (deprecated) public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **andWhere** (*string* $conditions) Appends a condition to the current conditions using an AND operator public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **orWhere** (*string* $conditions) Appends a condition to the current conditions using an OR operator public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **conditions** (*string* $conditions) Adds the conditions parameter to the criteria public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **order** (*string* $orderColumns) Adds the order-by parameter to the criteria public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **limit** (*int* $limit, [*int* $offset]) Adds the limit parameter to the criteria public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **forUpdate** ([*boolean* $forUpdate]) Adds the "for_update" parameter to the criteria public :doc:`Phalcon\\Mvc\\Model\\Criteria ` **sharedLock** ([*boolean* $sharedLock]) Adds the "shared_lock" parameter to the criteria public *string* **getWhere** () Returns the conditions parameter in the criteria public *string* **getConditions** () Returns the conditions parameter in the criteria public *string* **getLimit** () Returns the limit parameter in the criteria public *string* **getOrder** () Returns the order parameter in the criteria public *string* **getParams** () Returns all the parameters defined in the criteria public static *static* **fromInput** (:doc:`Phalcon\\DiInterface ` $dependencyInjector, *string* $modelName, *array* $data) Builds a Phalcon\\Mvc\\Model\\Criteria based on an input array like $_POST public :doc:`Phalcon\\Mvc\\Model\\ResultsetInterface ` **execute** () Executes a find using the parameters built with the criteria