当前位置: 首页>>代码示例>>PHP>>正文


PHP Product::__construct方法代码示例

本文整理汇总了PHP中Product::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Product::__construct方法的具体用法?PHP Product::__construct怎么用?PHP Product::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Product的用法示例。


在下文中一共展示了Product::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($import_price)
 {
     //call constructor of parent to init value
     parent::__construct();
     $this->import_price = $import_price;
     $this->object_type = "ImportProduct";
 }
开发者ID:Ruyka,项目名称:Tam-An-Food-Store-Manager,代码行数:7,代码来源:ImportProduct.php

示例2: __construct

 /**
  * public __construct
  *
  * @description initialise our checkout
  */
 public function __construct(&$product)
 {
     // If we are being created then there is only 1 of us
     parent::__construct($product->getCode(), $product->getName(), $product->getPrice());
     $this->quantity = 1;
     $this->totalPrice = parent::getPrice();
 }
开发者ID:KidsOnShred,项目名称:dc-test,代码行数:12,代码来源:CheckoutItem.class.php

示例3: __construct

 public function __construct($title, $pageCount)
 {
     parent::__construct();
     $this->_title = $title;
     $this->_pageCount = $pageCount;
     $this->_type = 'book';
 }
开发者ID:arnoldllanes,项目名称:oopSolutions,代码行数:7,代码来源:class.Book.php

示例4: __construct

 public function __construct($title, $duration)
 {
     parent::__construct();
     $this->_type = 'DVD';
     $this->_duration = $duration;
     $this->_title = $title;
 }
开发者ID:arnoldllanes,项目名称:oopSolutions,代码行数:7,代码来源:class.Dvd.php

示例5: __construct

 public function __construct($number = 0)
 {
     //call constructor of parent to init value
     parent::__construct();
     $this->number = $number;
     $this->object_type = "SoldProduct";
 }
开发者ID:Ruyka,项目名称:Tam-An-Food-Store-Manager,代码行数:7,代码来源:SoldProduct.php

示例6: __construct

 /**
  * Contructor
  *
  * @param  void
  * @return void
  */
 public function __construct($pId = false)
 {
     parent::__construct($pId);
     if (!$pId) {
         // Create SKU automatically
         $this->setSku(new Sku());
     }
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:14,代码来源:SingleSkuProduct.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN person_role = 'musician' THEN person_name END ORDER BY madeby_id", 'musicians'];
     $this->sqlOptions['concat'][] = ['song_title ORDER BY song_number', 'songs'];
     $this->sqlOptions['concat'][] = ['running_time ORDER BY song_number', 'running_times'];
     $this->sqlOptions['join']['song_base_product'] = ['fk_song_base_product_base_product', 'base_product_id'];
     $this->sqlOptions['join']['song'] = ['song_id', 'fk_song_base_product_song'];
 }
开发者ID:matthewleighton,项目名称:online_shop,代码行数:9,代码来源:Music.php

示例8: __construct

 public function __construct()
 {
     $this->properties['console'] = '';
     $this->validates('console', 'presence');
     $this->properties['book_type'] = '';
     $this->validates('book_type', 'presence');
     parent::__construct();
     $this->sqlOptions['join']['video_game'] = ['fk_video_game_product_version', 'product_version_id'];
     $this->sqlOptions['join']['pc_game'] = ['fk_pc_game_video_game', 'video_game_id'];
     $this->sqlOptions['join']['subtitles'] = ['fk_subtitles_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages_base_product'] = ['fk_languages_base_product_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages'] = ['language_id', 'fk_subtitles_languages OR fk_languages_base_product_languages'];
 }
开发者ID:matthewleighton,项目名称:online_shop,代码行数:13,代码来源:Video_game.php

示例9: __construct

 public function __construct()
 {
     $this->properties['running_time'] = '';
     $this->validates('running_time', 'presence');
     $this->properties['age_rating'] = '';
     $this->validates('age_rating', 'presence');
     $this->properties['creators']['director'] = [];
     parent::__construct();
     $this->sqlOptions['join']['film'] = ['fk_film_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages_base_product'] = ['fk_languages_base_product_base_product', 'base_product_id'];
     $this->sqlOptions['join']['subtitles'] = ['fk_subtitles_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages'] = ['language_id', 'fk_languages_base_product_languages'];
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN person_role = 'director' " . "THEN person.person_name ELSE NULL END", 'directors'];
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN person_role = 'actor' " . "THEN person.person_name ELSE NULL END", 'actors'];
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN fk_languages_base_product_languages = language_id " . "THEN language_name END ORDER BY languages_base_product_id", 'languages'];
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN fk_subtitles_languages = language_id " . "THEN language_name END ORDER BY languages_base_product_id", 'subtitles'];
 }
开发者ID:matthewleighton,项目名称:online_shop,代码行数:17,代码来源:Film.php

示例10: __construct

 public function __construct()
 {
     $this->properties['page_count'] = '';
     $this->validates('page_count', 'presence');
     $this->properties['book_type'] = '';
     $this->validates('book_type', 'presence');
     $this->properties['publisher'] = '';
     $this->validates('publisher', 'presence');
     $this->properties['language'] = '';
     $this->validates('language', 'presence');
     $this->properties['creators']['author'] = [];
     parent::__construct();
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN person_role = 'author' THEN person.person_name ELSE NULL END", 'authors'];
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN fk_languages_base_product_languages = language_id " . "THEN language_name END ORDER BY languages_base_product_id", 'languages'];
     $this->sqlOptions['join']['physical_book'] = ['fk_physical_book_product_version', 'product_version_id'];
     $this->sqlOptions['join']['ebook'] = ['fk_ebook_product_version', 'product_version_id'];
     $this->sqlOptions['join']['languages_base_product'] = ['fk_languages_base_product_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages'] = ['language_id', 'fk_languages_base_product_languages'];
 }
开发者ID:matthewleighton,项目名称:online_shop,代码行数:19,代码来源:Book.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->sqlOptions['concat'][] = ["DISTINCT CASE WHEN person_role = 'actor' " . "THEN person_name END ORDER BY madeby_id", 'actors'];
     $this->sqlOptions['concat'][] = ['DISTINCT CASE WHEN fk_subtitles_languages = language_id ' . 'THEN language_name END ORDER BY subtitles_id', 'subtitles'];
     $this->sqlOptions['concat'][] = ['DISTINCT CASE WHEN fk_languages_base_product_languages = language_id ' . 'THEN language_name END ORDER BY languages_base_product_id', 'languages'];
     $this->sqlOptions['concat'][] = ['DISTINCT tv_episode_name ORDER BY tv_episode_number', 'episodes'];
     $this->sqlOptions['concat'][] = ['DISTINCT tv_episode_description ORDER BY tv_episode_number', 'episode_descriptions'];
     # TODO  - episode_air_date concat is only DINSTINCT to avoid an issue were it was being joined to multiple times.
     # Find a way to fix the joining issue. Else, the inclusion of DISTINCT will cause issues with episodes of the
     # same air date
     $this->sqlOptions['concat'][] = ['DISTINCT tv_episode_air_date ORDER BY tv_episode_number', 'episode_air_dates'];
     $this->sqlOptions['concat'][] = ['tv_episode_running_time ORDER BY tv_episode_number', 'episode_running_times'];
     $this->sqlOptions['join']['tv_season'] = ['fk_tv_season_base_product', 'base_product_id'];
     $this->sqlOptions['join']['tv_series'] = ['fk_tv_season_tv_series', 'tv_series_id'];
     $this->sqlOptions['join']['tv_episode'] = ['fk_tv_episode_tv_season', 'tv_season_id'];
     $this->sqlOptions['join']['subtitles'] = ['fk_subtitles_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages_base_product'] = ['fk_languages_base_product_base_product', 'base_product_id'];
     $this->sqlOptions['join']['languages'] = ['language_id', 'fk_subtitles_languages OR fk_languages_base_product_languages'];
 }
开发者ID:matthewleighton,项目名称:online_shop,代码行数:20,代码来源:Tv.php

示例12:

 function __construct($ref, $name, $price, $VAT = 0, $qty = 1)
 {
     parent::__construct($ref, $name, $price, $VAT = 0, $qty = 1);
 }
开发者ID:DennisdeBest,项目名称:CoursPHP,代码行数:4,代码来源:Product.php

示例13: __construct

 public function __construct()
 {
     parent::__construct(self::STAR_SHIP_PRODUCT_NAME, self::PIECE, self::PRICE);
 }
开发者ID:juhaszjt,项目名称:tdd-training,代码行数:4,代码来源:StarShipProduct.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:ohjack,项目名称:mallerp_standard,代码行数:4,代码来源:index.php

示例15:

 function __construct($title, $firstName, $mainName, $price, $numPages)
 {
     parent::__construct($title, $firstName, $mainName, $price);
     $this->numPages = $numPages;
 }
开发者ID:Jgirl033,项目名称:PhpStudyBook,代码行数:5,代码来源:Unit3.php


注:本文中的Product::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。