public function __construct($EntityNamespace, $arg) { array_shift($arg); $this->_entityNamespace = $EntityNamespace; $this->_tableName = $arg[0]; $this->_className = ucfirst($arg[1]); if (!empty($arg[2]) && !empty($arg[3]) && !empty($arg[4]) && !empty($arg[5])) { Connection::resetConnection($arg[2], $arg[3], $arg[4], $arg[5]); } $this->fieldsList = $this->getFieldsListFromDatabase(); $this->generate(); }