コード例 #1
0
 public function __construct($siteId = false)
 {
     //TODO: make tables prefixes
     if (empty($this->primaryKey)) {
         $this->primaryKey = str_replace("cody_", "", $this->table) . "_id";
     }
     $db = DB::get();
     parent::__construct($this->table, $db);
     if ($siteId !== false) {
         $this->siteId = intval($siteId);
         $this->accountId = Site::accountId($siteId);
     } else {
         $this->siteId = Site::id();
         $this->accountId = Site::accountId();
     }
     if ($this->useSiteId) {
         $this->whereBy('site_id', $this->siteId);
     }
     if ($this->useAccountId) {
         $this->whereBy('account_id', $this->accountId);
     }
 }
コード例 #2
0
ファイル: Values.php プロジェクト: harp-orm/query
 public function __construct(array $values)
 {
     parent::__construct(null, $values);
 }
コード例 #3
0
ファイル: SQL.class.php プロジェクト: BlackyPanther/SQL-Class
 /**
  * Initialize a new instance of SQLite Connection
  *
  * @param string $path path to db file
  * @param string $password database users password
  *
  * @return SQLite
  */
 function __construct($path, $password = '')
 {
     if (!class_exists('SQLite3')) {
         throw new \RuntimeException('SQLite3 Class not found. Details at http://php.net/manual/de/book.sqlite3.php');
     }
     parent::__construct();
     $this->path = $path;
     $this->password = $password;
 }
コード例 #4
0
ファイル: ContactDAO.php プロジェクト: Anon215/movim
 function __construct()
 {
     parent::__construct();
 }
コード例 #5
0
ファイル: Condition.php プロジェクト: harp-orm/query
 /**
  * @param string $column
  * @param string $content
  * @param array $parameters
  */
 public function __construct($column, $content, array $parameters = array())
 {
     $this->column = $column;
     parent::__construct($content, $parameters);
 }
コード例 #6
0
ファイル: IntValue.php プロジェクト: harp-orm/query
 /**
  * @param integer $value
  */
 public function __construct($value)
 {
     parent::__construct((string) (int) $value);
 }
コード例 #7
0
ファイル: Restriction.php プロジェクト: JeCat/framework
 public function __construct($bDefaultLogic = true, array &$arrRawSql = null)
 {
     $this->setDefaultLogic($bDefaultLogic);
     parent::__construct($arrRawSql);
 }