public function __construct($data = array()) { fx::count('create collection'); if (is_array($data)) { $this->data = $data; } else { $this->data = array($data); } }
public static function path($key = null, $tale = null) { fx::count('getpath'); static $path = null; if (!$path) { $path = new Path(); } switch (func_num_args()) { case 0: default: return $path; case 1: return $path->abs($key); case 2: return $path->abs($key, $tale); } }