/** * Return the ORMSettings instance * @return ORMSettings */ public function &getInstance() { return ORMRegistry::classGet("VTORM\\ORMSettings"); }
/** * @throws \Exception */ protected function instanceObjects() { $this->CommonQuery =& ORMRegistry::classGet("VTRORM\\Query\\CommonQuery"); $this->Select =& ORMRegistry::classGet("VTRORM\\Query\\SelectQuery"); $this->Update =& ORMRegistry::classGet("VTRORM\\Query\\UpdateQuery"); $this->Insert =& ORMRegistry::classGet("VTRORM\\Query\\InsertQuery"); $this->Delete =& ORMRegistry::classGet("VTRORM\\Query\\DeleteQuery"); //$Table = $this->Schema->getTable(); if (!empty($this->Alias)) { $Table = [$this->Table => $this->Alias]; } else { $Table =& $this->Table; } $this->setTableIntoHelpers($Table); }
/** * @param $name * @param $arguments * * @return \PDO * @throws \Exception */ public static function __callStatic($name, $arguments) { /** @var \VTRORM\Database\Connection $Connection */ $Connection =& ORMRegistry::classGet("VTRORM\\DatabaseConnection"); return call_user_func_array(array($Connection->getPDO(), $name), $arguments); }