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


PHP DataProvider::__construct方法代碼示例

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


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

示例1: __construct

 /**
  * User constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->name = "";
     $this->table = ARCDBPREFIX . "companies";
     $this->map = ["id" => "id", "name" => "name"];
     $this->columns = ["id", "name"];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:11,代碼來源:Company.class.php

示例2: __construct

 /**
  * UserPermission constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->groupid = 0;
     $this->permission = "";
     $this->table = ARCDBPREFIX . 'user_permissions';
     $this->map = ["id" => "id", "groupid" => "groupid", "permission" => "permission"];
     $this->columns = ['id', 'groupid', 'permission'];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:12,代碼來源:UserPermission.class.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->event = date("y-m-d H:i:s");
     $this->message = "";
     $this->table = ARCDBPREFIX . 'logs';
     $this->map = ["id" => "id", "type" => "type", "module" => "module", "event" => "event", "message" => "message"];
     $this->columns = ['id', 'type', 'module', 'event', 'message'];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:9,代碼來源:Log.class.php

示例4: __construct

 /**
  * UserGroup constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->name = "";
     $this->description = "";
     $this->table = ARCDBPREFIX . 'user_groups';
     $this->map = ["id" => "id", "name" => "name", "description" => "description"];
     $this->columns = ['id', 'name', 'description'];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:12,代碼來源:UserGroup.class.php

示例5: __construct

 /**
  * SystemSetting constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->key = "";
     $this->value = "";
     $this->userid = 0;
     $this->table = ARCDBPREFIX . "system_settings";
     $this->map = ["id" => "id", "key" => "skey", "value" => "svalue", "userid" => "userid"];
     $this->columns = ["id", "skey", "svalue", "userid"];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:13,代碼來源:SystemSetting.class.php

示例6: __construct

 public function __construct(SkyBlock $plugin, $cacheSize = 0)
 {
     parent::__construct($plugin, $cacheSize);
     $this->db = new SQLite3($this->plugin->getDataFolder() . "plots.db");
     $this->db->exec("CREATE TABLE IF NOT EXISTS plots\n            (id INTEGER PRIMARY KEY AUTOINCREMENT, level TEXT, X INTEGER, Z INTEGER, name TEXT,\n             owner TEXT, helpers TEXT, biome TEXT)");
     $this->sqlGetPlot = $this->db->prepare("SELECT id, name, owner, helpers, biome FROM plots WHERE level = :level AND X = :X AND Z = :Z");
     $this->sqlSavePlot = $this->db->prepare("INSERT OR REPLACE INTO plots (id, level, X, Z, name, owner, helpers, biome) VALUES\n            ((select id from plots where level = :level AND X = :X AND Z = :Z),\n             :level, :X, :Z, :name, :owner, :helpers, :biome);");
     $this->sqlSavePlotById = $this->db->prepare("UPDATE plots SET name = :name, owner = :owner, helpers = :helpers, biome = :biome WHERE id = :id");
     $this->sqlRemovePlot = $this->db->prepare("DELETE FROM plots WHERE level = :level AND X = :X AND Z = :Z");
     $this->sqlRemovePlotById = $this->db->prepare("DELETE FROM plots WHERE id = :id");
     $this->sqlGetPlotsByOwner = $this->db->prepare("SELECT * FROM plots WHERE owner = :owner");
     $this->sqlGetPlotsByOwnerAndLevel = $this->db->prepare("SELECT * FROM plots WHERE owner = :owner AND level = :level");
     $this->sqlGetExistingXZ = $this->db->prepare("SELECT X, Z FROM plots WHERE (\n                level = :level\n                AND (\n                    (abs(X) == :number AND abs(Z) <= :number) OR\n                    (abs(Z) == :number AND abs(X) <= :number)\n                )\n            )");
 }
開發者ID:RedstoneAlmeida,項目名稱:SkyBlockPE,代碼行數:14,代碼來源:SQLiteDataProvider.php

示例7: __construct

 /**
  * User constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->firstname = "";
     $this->lastname = "";
     $this->email = "";
     $this->enabled = true;
     $this->passwordhash = "";
     $this->groups = "[\"Users\"]";
     $this->company = "[]";
     $this->created = date("y-m-d H:i:s");
     $this->table = ARCDBPREFIX . "users";
     $this->map = ["id" => "id", "firstname" => "firstname", "lastname" => "lastname", "email" => "email", "passwordhash" => "passwordhash", "created" => "created", "enabled" => "enabled", "groups" => "groups", "company" => "company"];
     $this->columns = ["id", "firstname", "lastname", "email", "passwordhash", "created", "enabled", "groups", "company"];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:18,代碼來源:User.class.php

示例8: __construct

 /**
  * Page constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->title = "";
     $this->content = "";
     $this->metadescription = "";
     $this->metakeywords = "";
     $this->metatitle = "";
     $this->seourl = "";
     $this->sortorder = 0;
     $this->iconclass = "";
     $this->showtitle = true;
     $this->hideonlogin = false;
     $this->hidefrommenu = false;
     $this->theme = "none";
     $this->table = ARCDBPREFIX . "pages";
     $this->map = ["id" => "id", "title" => "title", "content" => "content", "seourl" => "seourl", "metadescription" => "metadescription", "metakeywords" => "metakeywords", "sortorder" => "sortorder", "iconclass" => "iconclass", "showtitle" => "showtitle", "hideonlogin" => "hideonlogin", "hidefrommenu" => "hidefrommenu", "theme" => "theme"];
     $this->columns = ["id", "title", "content", "seourl", "metadescription", "metakeywords", "sortorder", "iconclass", "showtitle", "hideonlogin", "hidefrommenu", "theme"];
 }
開發者ID:DeltaWolf7,項目名稱:Arc,代碼行數:22,代碼來源:Page.class.php


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