Пример #1
0
 private static function buildData($data, $options)
 {
     $config = array_merge(self::$config, $options);
     self::$config = $config;
     extract($config);
     $r = array();
     foreach ($data as $item) {
         $id = $item[$primary_key];
         $parent_id = $item[$parent_key];
         $r[$parent_id][$id] = $item;
     }
     return $r;
 }