PHP Class PartKeepr\PartBundle\Entity\PartDistributor

Inheritance: extends PartKeepr\CoreBundle\Entity\BaseEntity
Show file Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method Description
__construct ( ) Cretes a new part->distributor link. Initializes the packaging unit with a quantity of "1".
getDistributor ( ) : Distributor Returns the distributor.
getOrderNumber ( ) : string Returns the order number.
getPackagingUnit ( ) : integer Returns the packaging unit.
getPart ( ) : Part Returns the part.
getPrice ( ) Returns the price.
getSku ( ) : string Returns the SKU (stock keeping unit).
setDistributor ( Distributor $distributor ) Sets the distributor.
setOrderNumber ( string $orderNumber ) Sets the order number.
setPackagingUnit ( integer $packagingUnit ) Sets the packaging unit for a specific distributor.
setPart ( Part $part = null ) Sets the part.
setPrice ( float $price ) Sets the price.
setSku ( string $sku ) Sets the SKU (stock keeping unit).

Method Details

__construct() public method

Cretes a new part->distributor link. Initializes the packaging unit with a quantity of "1".
public __construct ( )

getDistributor() public method

Returns the distributor.
public getDistributor ( ) : Distributor
return PartKeepr\DistributorBundle\Entity\Distributor The distributor

getOrderNumber() public method

Returns the order number.
public getOrderNumber ( ) : string
return string The order number

getPackagingUnit() public method

Returns the packaging unit.
public getPackagingUnit ( ) : integer
return integer The packaging unit

getPart() public method

Returns the part.
public getPart ( ) : Part
return Part The part

getPrice() public method

Returns the price.
public getPrice ( )

getSku() public method

Returns the SKU (stock keeping unit).
public getSku ( ) : string
return string The SKU

setDistributor() public method

Sets the distributor.
public setDistributor ( Distributor $distributor )
$distributor PartKeepr\DistributorBundle\Entity\Distributor The distributor

setOrderNumber() public method

Sets the order number.
public setOrderNumber ( string $orderNumber )
$orderNumber string The order number

setPackagingUnit() public method

For example, some distributors only sell resistors in packs of 100, so you can't order just one. We use the packagingUnit to calculate how many pieces will be delivered once ordered. So if your stock level falls below the minimum (example: you would need to order 10 resistors), we suggest that you only order one resistor pack instead of 10.
public setPackagingUnit ( integer $packagingUnit )
$packagingUnit integer The amount of items in one package

setPart() public method

Sets the part.
public setPart ( Part $part = null )
$part Part The part

setPrice() public method

Sets the price.
public setPrice ( float $price )
$price float

setSku() public method

Sets the SKU (stock keeping unit).
public setSku ( string $sku )
$sku string The SKU