function __construct($oh, $element_id){ $this->oh = $oh; $this->db = $oh->db; $this->cache = $oh->cache; $this->history = $oh->history; $elementRow = $this->db->get_where('elements',array('id' => $element_id)); if(rows($elementRow)){ $elementRow = $elementRow->row_array(); $this->locations = buildLocations($this->oh); $this->id = $elementRow['id']; $this->main_name = $elementRow['main_name']; $this->entity_order = $elementRow['entity_order']; $this->status = (int)$elementRow['status']; $this->seasons = $this->build("seasons",$this->id); $this->names = $this->build("names",$this->id); $this->directrules = $this->build("directrules",$this->id); $this->passthrus = $this->build("passthrus",$this->id); //$this->getJSONDirectrules(); } }
function __construct($db, $element_id){ $this->db = $db; $elementRow = $this->db->get_where('elements',array('id' => $element_id)); if(rows($elementRow)){ $elementRow = $elementRow->row_array(); $this->locations = buildLocations($this->db); $this->id = $elementRow['id']; $this->main_name = $elementRow['main_name']; $this->buildSeasons(); $this->buildNames(); $this->buildElementLocations(); } }
function __construct($db, $id, $buildRules = false) { $this->db = $db; $elementRow = $this->db->get_where('maps', array('id' => $id)); if (rows($elementRow)) { $elementRow = $elementRow->row_array(); $this->locations = buildLocations($this->db); $this->id = $elementRow['id']; $this->name_id = $elementRow['name_id']; $this->maplocations = new Maplocation($this->db, $this->id); $this->element = new Simpleelement($this->db, $elementRow['element_id']); $this->name = new Name($this->db, $elementRow['name_id']); if ($buildRules) { $this->buildOffsetrules(); } } }