Example #1
0
 /**
  * model find
  * 
  * @param object $parameters parameters
  * 
  * @return array
  */
 public static function find($parameters = null)
 {
     $data = [];
     $temp = parent::find($parameters);
     foreach ($temp as $row) {
         $data[] = $row;
     }
     return $data;
 }
Example #2
0
 public static function find($parameters = null)
 {
     // Create an unique key based on the parameters
     if (!is_array($parameters) || !array_key_exists('cache', $parameters)) {
         if (is_array($parameters)) {
             $parameters['cache'] = array("key" => __CLASS__ . self::_createKey($parameters), "lifetime" => 3600);
         } else {
             $parameters = [$parameters, 'cache' => ["key" => __CLASS__ . self::_createKey($parameters), "lifetime" => 3600]];
         }
     }
     return parent::find($parameters);
 }
Example #3
0
 /**
  * Allows to query a set of records that match the specified conditions
  *
  * @param 	array $parameters
  * @return  \Phalcon\Mvc\Model\ResultsetInterface
  */
 public static function find($parameters = null)
 {
     if (!static::$_conditions) {
         return parent::find($parameters);
     }
     $conditions = static::normalizeConditions(static::$_conditions);
     if (!$parameters) {
         return parent::find($conditions);
     }
     if (is_string($parameters)) {
         $parameters .= " AND " . $conditions;
     } else {
         $parameters[0] .= " AND " . $conditions;
     }
     return parent::find($parameters);
 }
Example #4
0
 /**
  * Allows to query a set of records that match the specified conditions
  *
  * @param mixed $parameters        	
  * @return Questions[]
  */
 public static function find($parameters = null)
 {
     return parent::find($parameters);
 }
 /**
  * @return User[]
  */
 public static function find($parameters = array())
 {
     return parent::find($parameters);
 }
Example #6
0
 public static function find($parameters = null)
 {
     return parent::find(self::$needGet);
 }
Example #7
0
 public static function find($parameters = null)
 {
     $needFind = array_merge($parameters, self::$needGet);
     return parent::find($needFind);
 }
Example #8
0
 public static function find($parameters = NULL)
 {
     $results = parent::find($parameters = NULL);
     foreach ($results as $result) {
         $_oldTags = $result->tags;
     }
     return $results;
 }
Example #9
0
 public static function find($parameters = null)
 {
     $parameters = self::getCacheableParams($parameters);
     return parent::find($parameters);
 }
Example #10
0
 public static function find($parameters = null)
 {
     $parameters = self::softDeleteFetch($parameters);
     return parent::find($parameters);
 }