本文整理汇总了PHP中Phalcon\Mvc\Model::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Model::find方法的具体用法?PHP Model::find怎么用?PHP Model::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phalcon\Mvc\Model
的用法示例。
在下文中一共展示了Model::find方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: find
/**
* 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;
}
示例2: find
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);
}
示例3: find
/**
* 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);
}
示例4: find
/**
* 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);
}
示例5: find
/**
* @return User[]
*/
public static function find($parameters = array())
{
return parent::find($parameters);
}
示例6: find
public static function find($parameters = null)
{
return parent::find(self::$needGet);
}
示例7: find
public static function find($parameters = null)
{
$needFind = array_merge($parameters, self::$needGet);
return parent::find($needFind);
}
示例8: find
public static function find($parameters = NULL)
{
$results = parent::find($parameters = NULL);
foreach ($results as $result) {
$_oldTags = $result->tags;
}
return $results;
}
示例9: find
public static function find($parameters = null)
{
$parameters = self::getCacheableParams($parameters);
return parent::find($parameters);
}
示例10: find
public static function find($parameters = null)
{
$parameters = self::softDeleteFetch($parameters);
return parent::find($parameters);
}