示例#1
0
 public function get_owned_intel($subject, $player)
 {
     $results = $this->get(array('filters' => array(new \Core\Filter('player', $player['id']), new \Core\Filter('subject', $subject['id']))));
     $intels = \Trouble\Intel::container()->get(array('order' => new \Core\Order('ord')));
     $data = new \Core\Li();
     foreach ($intels as $intel) {
         $res = $results->filter($intel['id'], 'intel')->{0};
         if (!$res) {
             continue;
         }
         $res['intel'] = $intel;
         $res['data'] = $subject[$intel['field']];
         $data->extend($res);
     }
     return $data;
 }
示例#2
0
文件: pdo.php 项目: radiosilence/core
 private function _join_fields($current = False, $parent = False)
 {
     $fields = new \Core\Li();
     foreach ($joins = $this->_parameters['joins'] as $join) {
         $fields->extend($this->_single_join_fields($join));
     }
     return $fields;
 }