/** * Return LudoDBCollection handled by the parser. * @return LudoDBModel|null */ public function getModel() { if (isset($this->config['model'])) { // TODO singleton. $this->model = $this->getModelInstance(); $this->model->clearValues(); return $this->model; } return null; }
public function read() { $pr = new Project(); if ($pr->exists()) { $pr->drop()->yesImSure(); } $pr->createTable(); #if(!$pr->exists()){ $pr->drop()->yesImSure(); $pr->createTable(); #} return parent::read(); }
/** * Return values in a tree structure * @return array */ public function getValues() { $rows = parent::getValues(); $rowReferences = array(); $ret = array(); $pk = $this->parser->getPK(); $fk = $this->parser->getFK(); $childKey = $this->parser->getChildKey(); foreach ($rows as &$row) { $rowReferences[$row[$pk]] =& $row; if (isset($row[$fk])) { $parent =& $rowReferences[$row[$fk]]; if (!isset($parent[$childKey])) { $parent[$childKey] = array(); } $parent[$childKey][] =& $row; } else { $ret[] =& $row; } unset($row[$fk]); } return $ret; }
public function __construct($fen) { $fen = $this->getValidFen($fen); parent::__construct($fen); }
public function __construct($playerId, $finished, $category = 1) { parent::__construct($playerId, $playerId, $finished, $category); }
public function getValues() { return parent::getValues(); }
public function __construct($fromZip, $toZip) { parent::__construct($fromZip, $toZip); }