PHP Class Sonata\Component\Product\Pool

Afficher le fichier Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Свойство Type Description
$products array

Méthodes publiques

Méthode Description
addProduct ( string $code, ProductDefinition $productDescription ) add a delivery method into the pool.
getManager ( Sonata\Component\Product\ProductInterface | string $code ) : Sonata\Component\Product\ProductManagerInterface
getProduct ( string $code ) : ProductDefinition
getProductCode ( Sonata\Component\Product\ProductInterface $product ) : integer | null | string
getProducts ( ) : array
getProvider ( Sonata\Component\Product\ProductInterface | string $code ) : Sonata\Component\Product\ProductProviderInterface
hasProduct ( string $code ) : boolean Tells if a product with $code is in the pool.
hasProvider ( string $code ) : boolean

Method Details

addProduct() public méthode

add a delivery method into the pool.
public addProduct ( string $code, ProductDefinition $productDescription )
$code string
$productDescription ProductDefinition

getManager() public méthode

public getManager ( Sonata\Component\Product\ProductInterface | string $code ) : Sonata\Component\Product\ProductManagerInterface
$code Sonata\Component\Product\ProductInterface | string
Résultat Sonata\Component\Product\ProductManagerInterface

getProduct() public méthode

public getProduct ( string $code ) : ProductDefinition
$code string
Résultat ProductDefinition

getProductCode() public méthode

public getProductCode ( Sonata\Component\Product\ProductInterface $product ) : integer | null | string
$product Sonata\Component\Product\ProductInterface
Résultat integer | null | string

getProducts() public méthode

public getProducts ( ) : array
Résultat array

getProvider() public méthode

public getProvider ( Sonata\Component\Product\ProductInterface | string $code ) : Sonata\Component\Product\ProductProviderInterface
$code Sonata\Component\Product\ProductInterface | string
Résultat Sonata\Component\Product\ProductProviderInterface

hasProduct() public méthode

Tells if a product with $code is in the pool.
public hasProduct ( string $code ) : boolean
$code string
Résultat boolean

hasProvider() public méthode

public hasProvider ( string $code ) : boolean
$code string
Résultat boolean

Property Details

$products protected_oe property

protected array $products
Résultat array