当前位置: 首页>>代码示例>>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;未经允许,请勿转载。