本文整理汇总了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";
}
示例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();
}
示例3: __construct
public function __construct($title, $pageCount)
{
parent::__construct();
$this->_title = $title;
$this->_pageCount = $pageCount;
$this->_type = 'book';
}
示例4: __construct
public function __construct($title, $duration)
{
parent::__construct();
$this->_type = 'DVD';
$this->_duration = $duration;
$this->_title = $title;
}
示例5: __construct
public function __construct($number = 0)
{
//call constructor of parent to init value
parent::__construct();
$this->number = $number;
$this->object_type = "SoldProduct";
}
示例6: __construct
/**
* Contructor
*
* @param void
* @return void
*/
public function __construct($pId = false)
{
parent::__construct($pId);
if (!$pId) {
// Create SKU automatically
$this->setSku(new Sku());
}
}
示例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'];
}
示例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'];
}
示例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'];
}
示例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'];
}
示例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'];
}
示例12:
function __construct($ref, $name, $price, $VAT = 0, $qty = 1)
{
parent::__construct($ref, $name, $price, $VAT = 0, $qty = 1);
}
示例13: __construct
public function __construct()
{
parent::__construct(self::STAR_SHIP_PRODUCT_NAME, self::PIECE, self::PRICE);
}
示例14: __construct
public function __construct()
{
parent::__construct();
}
示例15:
function __construct($title, $firstName, $mainName, $price, $numPages)
{
parent::__construct($title, $firstName, $mainName, $price);
$this->numPages = $numPages;
}