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


PHP BaseModel::initialize方法代碼示例

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


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

示例1: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\EventHasPack', 'pack_id', 'event_id', 'App\\Models\\Event', 'id', ['alias' => 'Events']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\PackHasProduct', 'pack_id', 'product_id', 'App\\Models\\Product', 'id', ['alias' => 'Products']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:7,代碼來源:Pack.php

示例2: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->belongsTo('period_id', 'App\\Models\\Period', 'id', ['alias' => 'Period', 'foreignKey' => ['message' => 'The period_id does not exist on the Period model']]);
     $this->hasOne('id', 'App\\Models\\Event', 'scheduling_id', ['alias' => 'Event']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:7,代碼來源:Scheduling.php

示例3: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->hasOne('id', 'App\\Models\\Event', 'guestList_id', ['alias' => 'Event']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Belong', 'guestList_id', 'user_id', 'App\\Models\\User', 'id', ['alias' => 'Users']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:7,代碼來源:GuestList.php

示例4: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->hasOne('id', 'App\\Models\\User', 'rrpp_id', ['alias' => 'User']);
     $this->hasMany('id', 'App\\Models\\Local', 'owner_id', ['alias' => 'Locals']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:7,代碼來源:RRPP.php

示例5: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->belongsTo('user_id', 'App\\Models\\User', 'id', ['alias' => 'User', 'foreignKey' => ['message' => 'The user_id does not exist on the User model']]);
     $this->belongsTo('provider_id', 'App\\Models\\Provider', 'id', ['alias' => 'Provider', 'foreignKey' => ['message' => 'The provider_id does not exist on the Provider model']]);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:7,代碼來源:Profile.php

示例6: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->belongsTo('event_id', 'App\\Models\\Event', 'id', ['alias' => 'Event', 'foreignKey' => ['message' => 'The event_id does not exist on the Event model']]);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Appear', 'photo_id', 'user_id', 'App\\Models\\User', 'id', ['alias' => 'UsersAppearing']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\PhotoHasHashTag', 'photo_id', 'hashTag_id', 'App\\Models\\HashTag', 'id', ['alias' => 'HashTags']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:8,代碼來源:Photo.php

示例7: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->belongsTo('owner_id', 'App\\Models\\RRPP', 'id', ['alias' => 'Owner', 'foreignKey' => ['message' => 'The owner_id does not exist on the RRPP model']]);
     $this->hasMany('id', 'App\\Models\\Event', 'local_id', ['alias' => 'Events']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Follow', 'local_id', 'user_id', 'App\\Models\\User', 'id', ['alias' => 'Followers']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:8,代碼來源:Local.php

示例8: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->belongsTo('local_id', 'App\\Models\\Local', 'id', ['alias' => 'Local', 'foreignKey' => ['message' => 'The local_id does not exist on the Local model']]);
     $this->belongsTo('guestList_id', 'App\\Models\\GuestList', 'id', ['alias' => 'GuestList', 'foreignKey' => ['allowNulls' => true, 'message' => 'The guestList_id does not exist on the GuestList model']]);
     $this->belongsTo('scheduling_id', 'App\\Models\\Scheduling', 'id', ['alias' => 'Scheduling', 'foreignKey' => ['allowNulls' => true, 'message' => 'The scheduling_id does not exist on the Scheduling model']]);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Attend', 'event_id', 'user_id', 'App\\Models\\User', 'id', ['alias' => 'Users']);
     $this->hasMany('id', 'App\\Models\\Photo', 'event_id', ['alias' => 'Photos']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\EventHasHashTag', 'event_id', 'hashTag_id', 'App\\Models\\HashTag', 'id', ['alias' => 'HashTags']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\EventHasMusicTag', 'event_id', 'musicTag_id', 'App\\Models\\MusicTag', 'id', ['alias' => 'MusicTags']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\EventHasPack', 'event_id', 'pack_id', 'App\\Models\\Pack', 'id', ['alias' => 'Packs']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:13,代碼來源:Event.php

示例9: initialize

 public function initialize()
 {
     parent::initialize();
     /**
      * Table name.
      */
     $this->setSource($this->className());
     /**
      * Relationships.
      */
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Follower', 'user_id', 'follower_id', 'App\\Models\\User', 'id', ['alias' => 'Followers']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Follower', 'follower_id', 'user_id', 'App\\Models\\User', 'id', ['alias' => 'Following']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Appear', 'user_id', 'photo_id', 'App\\Models\\Photo', 'id', ['alias' => 'Photos']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Follow', 'user_id', 'local_id', 'App\\Models\\Local', 'id', ['alias' => 'LocalsFollowed']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Attend', 'user_id', 'event_id', 'App\\Models\\Event', 'id', ['alias' => 'Events']);
     $this->hasManyToMany('id', 'App\\Models\\Relationships\\Belong', 'user_id', 'guestList_id', 'App\\Models\\GuestList', 'id', ['alias' => 'GuestLists']);
     $this->belongsTo('rrpp_id', 'App\\Models\\RRPP', 'id', ['alias' => 'RRPPprofile', 'foreignKey' => ['allowNulls' => true, 'message' => 'The rrpp_id does not exist on the RRPP model']]);
     $this->hasMany('id', 'App\\Models\\Profile', 'user_id', ['alias' => 'Profiles']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:19,代碼來源:User.php

示例10: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource($this->className());
     $this->hasMany('id', 'App\\Models\\Profile', 'provider_id', ['alias' => 'Profiles']);
 }
開發者ID:soutoner,項目名稱:api-desconecta,代碼行數:6,代碼來源:Provider.php

示例11: initialize

 public function initialize()
 {
     parent::initialize();
     $this->setSource('users');
     $this->hasMany('id', "App\\Models\\BookInstance", 'user_id', ["alias" => "bookInstances"]);
 }
開發者ID:vladylen,項目名稱:phalcon,代碼行數:6,代碼來源:User.php


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