Пример #1
0
 /**
  * DEPRECATED -- use Lib/Pluck class instead (see readme)
  *
  * returns the value of the $path from the input $data
  * this is baically Hash::extract() but it returns the first
  * value match for a path, instead of an array of matches
  * also, you can pass in an array of possible paths and you get the first
  * @param array $data
  * @param mixed @paths
  *                  ex: '/User/id' or '/User'
  *                  or: array('/User/id', '/Alt/user_id')
  * @param mixed $default null - returned if no path found
  * @return mixed
  */
 public static function pluck($data, $paths = null, $default = null)
 {
     return Pluck::oneEmpties($data, $paths, $default);
 }