示例#1
0
 public function Insert()
 {
     $this->salt = phalanx\base\Random(10);
     $this->password = md5($this->password . $this->salt);
     $this->authkey = \phalanx\base\Random();
     parent::Insert();
 }
示例#2
0
文件: core.php 项目: rsesek/Bugdar2
 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());
     }
 }
示例#3
0
 public function FetchInto()
 {
     $this->attributes = array();
     return parent::FetchInto();
 }