PHP 클래스 Sonata\Component\Product\Pool

파일 보기 프로젝트 열기: sonata-project/ecommerce 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$products array

공개 메소드들

메소드 설명
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

메소드 상세

addProduct() 공개 메소드

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

getManager() 공개 메소드

public getManager ( Sonata\Component\Product\ProductInterface | string $code ) : Sonata\Component\Product\ProductManagerInterface
$code Sonata\Component\Product\ProductInterface | string
리턴 Sonata\Component\Product\ProductManagerInterface

getProduct() 공개 메소드

public getProduct ( string $code ) : ProductDefinition
$code string
리턴 ProductDefinition

getProductCode() 공개 메소드

public getProductCode ( Sonata\Component\Product\ProductInterface $product ) : integer | null | string
$product Sonata\Component\Product\ProductInterface
리턴 integer | null | string

getProducts() 공개 메소드

public getProducts ( ) : array
리턴 array

getProvider() 공개 메소드

public getProvider ( Sonata\Component\Product\ProductInterface | string $code ) : Sonata\Component\Product\ProductProviderInterface
$code Sonata\Component\Product\ProductInterface | string
리턴 Sonata\Component\Product\ProductProviderInterface

hasProduct() 공개 메소드

Tells if a product with $code is in the pool.
public hasProduct ( string $code ) : boolean
$code string
리턴 boolean

hasProvider() 공개 메소드

public hasProvider ( string $code ) : boolean
$code string
리턴 boolean

프로퍼티 상세

$products 보호되어 있는 프로퍼티

protected array $products
리턴 array