b0y-101 Mini Shell


Current Path : E:/www/instructor/teacher06/components/com_eventgallery/library/
File Upload :
Current File : E:/www/instructor/teacher06/components/com_eventgallery/library/scaleprice.php

<?php

/**
 * @package     Sven.Bluege
 * @subpackage  com_eventgallery
 *
 * @copyright   Copyright (C) 2005 - 2019 Sven Bluege All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

class EventgalleryLibraryScaleprice
{

    /**
     * @var int
     */
    public $quantity;

    /**
     * @var EventgalleryLibraryCommonMoney
     */
    public $price;

    /**
     * @param $quantity int
     * @param $price EventgalleryLibraryCommonMoney
     */
    public function __construct($quantity, $price) {
        $this->quantity = $quantity;
        $this->price = $price;
    }

    /**
     * @return int
     */
    public function getQuantity() {
        return $this->quantity;
    }

    /**
     * @return EventgalleryLibraryCommonMoney
     */
    public function getPrice() {
        return $this->price;
    }

    /**
     * Returns the package price (singleprice * quantity)
     * @return EventgalleryLibraryCommonMoney
     */
    public function getPackagePrice() {
        return new EventgalleryLibraryCommonMoney($this->getPrice()->getAmount() * $this->getQuantity(), $this->getPrice()->getCurrency());
    }

}

Copyright © 2019 by b0y-101