__construct() 공개 메소드

Accepted parameters:
public __construct ( array $params )
$params array {
예제 #1
0
파일: Hit.php 프로젝트: thuliumcc/dartboard
 public function __construct($attributes = [])
 {
     parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'game_user_id', 'field', 'multiplier', 'round'], 'belongsTo' => ['game_user' => ['class' => 'GameUser', 'foreignKey' => 'game_user_id', 'referencedColumn' => 'id']]]);
 }
예제 #2
0
 public function __construct($attributes = [])
 {
     parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'game_id', 'user_id', 'score' => 0, 'ordinal'], 'belongsTo' => ['user' => ['class' => 'User', 'foreignKey' => 'user_id', 'referencedColumn' => 'id'], 'game' => ['class' => 'Game', 'foreignKey' => 'game_id', 'referencedColumn' => 'id']], 'hasOne' => ['winner_game' => ['class' => 'Game', 'foreignKey' => 'winner_game_user_id']]]);
 }
예제 #3
0
파일: Category.php 프로젝트: letsdrink/ouzo
 public function __construct($attributes = array())
 {
     parent::__construct(array('hasMany' => array('products' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category'), 'products_starting_with_b' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => "products.name LIKE 'b%'"), 'products_ending_with_b_or_y' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => function () {
         return WhereClause::create("products.name LIKE ? OR products.name LIKE ?", array('%b', '%y'));
     }), 'products_name_bob' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => array("products.name" => "bob")), 'products_ordered_by_name' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'order' => array("products.name ASC"))), 'hasOne' => array('product_named_billy' => array('class' => 'Test\\Product', 'foreignKey' => 'id_category', 'conditions' => "products.name = 'billy'")), 'belongsTo' => array('parent' => array('class' => 'Test\\Category', 'foreignKey' => 'id_parent', 'referencedColumn' => 'id')), 'attributes' => $attributes, 'fields' => $this->_fields));
 }
예제 #4
0
파일: User.php 프로젝트: letsdrink/ouzo-app
 function __construct($attributes = array())
 {
     parent::__construct(array('attributes' => $attributes, 'fields' => array('login', 'password')));
 }
예제 #5
0
파일: Order.php 프로젝트: letsdrink/ouzo
 public function __construct($attributes = array())
 {
     parent::__construct(array('table' => 'orders', 'sequence' => 'orders_id_order_seq', 'primaryKey' => 'id_order', 'attributes' => $attributes, 'fields' => $this->_fields));
 }
예제 #6
0
 public function __construct($attributes = array())
 {
     parent::__construct(array('table' => 'products', 'attributes' => $attributes, 'fields' => array('description' => self::$defaultDescription, 'name' => function () {
         return ProductWithDefaults::$defaultName;
     }, 'id_category', 'id_manufacturer', 'sale')));
 }
예제 #7
0
 public function __construct($attributes = array())
 {
     parent::__construct(array('table' => 'products', 'primaryKey' => 'id', 'fields' => array('name'), 'sequence' => '', 'attributes' => $attributes));
 }
예제 #8
0
 public function __construct($attributes = [])
 {
     parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'login', 'password'], 'hasMany' => ['game_users' => ['class' => 'GameUser', 'foreignKey' => 'user_id']]]);
 }
예제 #9
0
 public function __construct($attributes = [])
 {
     parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'current_game_user_id', 'round' => 1, 'finished' => false, 'winner_game_user_id', 'type', 'started_at' => Clock::nowAsString()], 'belongsTo' => ['current_game_user' => ['class' => 'GameUser', 'foreignKey' => 'current_game_user_id', 'referencedColumn' => 'id'], 'winner_game_user' => ['class' => 'GameUser', 'foreignKey' => 'winner_game_user_id', 'referencedColumn' => 'id']], 'hasMany' => ['game_users' => ['class' => 'GameUser', 'foreignKey' => 'game_id', 'referencedColumn' => 'id']]]);
 }
예제 #10
0
 public function __construct(array $params)
 {
     parent::__construct($params);
 }
예제 #11
0
 public function __construct($attributes = array())
 {
     parent::__construct(array('table' => 'products', 'primaryKey' => '', 'attributes' => $attributes, 'fields' => $this->_fields));
 }
예제 #12
0
 public function __construct($attributes = array())
 {
     parent::__construct(array('table' => 'order_products', 'sequence' => '', 'primaryKey' => '', 'attributes' => $attributes, 'belongsTo' => array('product' => array('class' => 'Test\\Product', 'foreignKey' => 'id_product'), 'order' => array('class' => 'Test\\Order', 'foreignKey' => 'id_order')), 'fields' => $this->_fields));
 }
예제 #13
0
 public function __construct($attributes = array(), $beforeSaveCallback = null, $afterSaveCallback = null)
 {
     parent::__construct(array('beforeSave' => $beforeSaveCallback, 'afterSave' => $afterSaveCallback, 'table' => 'products', 'primaryKey' => 'id', 'attributes' => $attributes, 'fields' => array('name')));
 }
예제 #14
0
 public function __construct($attributes = [])
 {
     parent::__construct(['attributes' => $attributes, 'fields' => ['id', 'name', 'params', 'created_at' => Clock::nowAsString()]]);
 }
예제 #15
0
파일: Product.php 프로젝트: letsdrink/ouzo
 public function __construct($attributes = array())
 {
     parent::__construct(array('attributes' => $attributes, 'belongsTo' => array('manufacturer' => array('class' => 'Test\\Manufacturer', 'foreignKey' => 'id_manufacturer'), 'category' => array('class' => 'Test\\Category', 'foreignKey' => 'id_category'), 'categoryWithNameByDescription' => array('class' => 'Test\\Category', 'foreignKey' => 'description', 'referencedColumn' => 'name')), 'hasOne' => array('orderProduct' => array('class' => 'Test\\OrderProduct', 'foreignKey' => 'id_product')), 'fields' => $this->_fields));
 }
예제 #16
0
 public function __construct()
 {
     parent::__construct(array('fields' => array('name')));
 }
예제 #17
0
 public function __construct($attributes = array())
 {
     parent::__construct(array('hasMany' => array('products' => array('class' => 'Test\\Product', 'foreignKey' => 'id_manufacturer')), 'attributes' => $attributes, 'fields' => $this->_fields));
 }