當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBFactory::__construct方法代碼示例

本文整理匯總了PHP中DBFactory::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBFactory::__construct方法的具體用法?PHP DBFactory::__construct怎麽用?PHP DBFactory::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DBFactory的用法示例。


在下文中一共展示了DBFactory::__construct方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($conn = null)
 {
     parent::__construct(USERS, USERS_USERID, $conn, array(
         USERS_USERID        => array(
             DataRules::TYPE         => DataRules::TYPE_NUM,
             DataRules::MINVALUE     => 1,
             DataRules::REQUIRED     => false
         ),
         USERS_USERNAME      => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 40,
             DataRules::MINLENGTH    => 5,
             DataRules::REQUIRED     => true,
         ),
         USERS_PASSWORD      => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 40,
             DataRules::MINLENGTH    => 40,
             DataRules::REQUIRED     => true,
         ),
         USERS_SALT          => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 3,
             DataRules::MINLENGTH    => 3,
             DataRules::REQUIRED     => true,
         ),
         USERS_EMAIL         => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 60,
             DataRules::MINLENGTH    => 5,
             DataRules::DEFAULT_     => "",
         ),
         USERS_SECRETQUESTION=> array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 255,
             DataRules::MINLENGTH    => 5,
             DataRules::DEFAULT_     => "",
         ),
         USERS_SECRETANSWER  => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 255,
             DataRules::MINLENGTH    => 0,
             DataRules::DEFAULT_     => "",
         ),
         USERS_MASTERNOTES   => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 255,
             DataRules::MINLENGTH    => 5,
             DataRules::DEFAULT_     => "",
         ),
         USERS_SCHEMEUSING   => array(
             DataRules::TYPE         => DataRules::TYPE_STRING,
             DataRules::MAXLENGTH    => 40,
             DataRules::MINLENGTH    => 5,
             DataRules::DEFAULT_     => "default",
         ),
         USERS_CANDOWNLOAD   => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_CANUPLOAD     => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_CANMESSAGE    => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_CANCDSELF     => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_CANCDOTHER    => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_CANSCHEME     => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_ISFAMILY      => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_ISLOGGED      => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_ISMASTER      => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_ISACTIVE      => array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
         USERS_ISPERMISSIONED=> array(
             DataRules::TYPE     => DataRules::TYPE_INTBOOL,
             DataRules::DEFAULT_ => 0,
         ),
//.........這裏部分代碼省略.........
開發者ID:rexfleischer,項目名稱:web_dev,代碼行數:101,代碼來源:UsersFactory.php

示例2: __construct

 public function __construct($conn = null)
 {
     parent::__construct(SCHEME, SCHEME_SCHEMEID, $conn);
 }
開發者ID:rexfleischer,項目名稱:web_dev,代碼行數:4,代碼來源:SchemeFactory.php

示例3: __construct

 public function __construct($conn = null)
 {
     parent::__construct(USERMANUAL, USERMANUAL_PAGEID, $conn);
 }
開發者ID:rexfleischer,項目名稱:web_dev,代碼行數:4,代碼來源:UserManualFactory.php


注:本文中的DBFactory::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。