當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。