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; }
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; }