public function setup() { $dataSource = new Atrox_Core_Data_Source(); $dataSource->addProperty(new Atrox_Core_Data_Property("Id", Atrox_Core_Data_Property::TYPE_INTEGER)); $dataSource->addProperty(new Atrox_Core_Data_Property("Start", Atrox_Core_Data_Property::TYPE_STRING)); $dataSource->addProperty(new Atrox_Core_Data_Property("Destination", Atrox_Core_Data_Property::TYPE_STRING)); }
/** * * @param string $tableName * @param string $idName * @param string $sequenceName * @param Atrox_Core_Data_IConnection $connection * @return void */ public function __construct($tableName, $idName = "Id", $sequenceName = null, Atrox_Core_Data_IConnection $connection = null) { parent::__construct($connection); $this->setTableName($tableName); $this->setIdName($idName); if ($sequenceName) { $this->parsedSequenceName = $this->connection->parseField($sequenceName); } else { $this->parsedSequenceName = $this->connection->parseTable($tableName); } $this->application = Atrox_Application_Application::getInstance(); }
public function addJoin($tableFrom, $propertyFrom, $tableTo, $propertyTo, $as = null) { $connection = $this->dataSource->getConnection(); $newJoin["FullTableFrom"] = $connection->parseTable($tableFrom); $newJoin["FullPropertyFrom"] = $connection->parseField($propertyFrom); $newJoin["FullTableTo"] = $connection->parseTable($tableTo); $newJoin["FullPropertyTo"] = $connection->parseField($propertyTo); $newJoin["As"] = null; if ($as) { $newJoin["As"] = $connection->parseTable($as); } $this->joins[] = $newJoin; }
public function format($value) { return $this->source->getCurrentDateTime(); }
/** * * @param string $name * @param string $id * @param Atrox_Core_Data_IConnection $connection * @return void */ public function __construct($name, $id = "Id", Atrox_Core_Data_IConnection $connection = null) { parent::__construct($name, $id, $connection); $this->serviceLocator = Atrox_Core_ServiceLocator::getInstance(); $this->parsedSequenceName = $this->connection->parsePropertyName("{$name}_{$id}_seq"); }
/** * * @return int */ public function getCount() { return $this->dataSource->getConnection()->getRowCount($this->result); }