public function Insert() { $this->salt = phalanx\base\Random(10); $this->password = md5($this->password . $this->salt); $this->authkey = \phalanx\base\Random(); parent::Insert(); }
public static function BootstrapDatabase($config) { define('TABLE_PREFIX', $config->{'database.prefix'}); try { self::$db = new PDO($config->{'database.dsn'}, $config->{'database.username'}, $config->{'database.password'}); self::$db->SetAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); phalanx\data\Model::set_db(self::$db); } catch (PDOException $e) { throw new CoreException('Database error: ' . $e->GetMessage()); } }
public function FetchInto() { $this->attributes = array(); return parent::FetchInto(); }