PHP Class DotsUnited\BundleFu\Factory

Author: Jan Sorgalla ([email protected])
Show file Open project: dotsunited/bundlefu Class Usage Examples

Protected Properties

Property Type Description
$filters array Filter map.
$options array Global bundle options.

Public Methods

Method Description
__construct ( array $options = [], array $filters = [] ) Contructor.
createBundle ( string | array $options = null ) : Bundle Create a Bundle instance.
getFilter ( string $name ) : DotsUnited\BundleFu\Filter\FilterInterface Get a filter.
setFilter ( string $name, DotsUnited\BundleFu\Filter\FilterInterface $filter = null ) : Factory Set a filter.
setOption ( string $name, mixed $value ) : Factory Set an option.

Method Details

__construct() public method

Contructor.
public __construct ( array $options = [], array $filters = [] )
$options array
$filters array

createBundle() public method

Create a Bundle instance.
public createBundle ( string | array $options = null ) : Bundle
$options string | array An array of options or a bundle name as string
return Bundle

getFilter() public method

Get a filter.
public getFilter ( string $name ) : DotsUnited\BundleFu\Filter\FilterInterface
$name string
return DotsUnited\BundleFu\Filter\FilterInterface $filter

setFilter() public method

Set a filter.
public setFilter ( string $name, DotsUnited\BundleFu\Filter\FilterInterface $filter = null ) : Factory
$name string
$filter DotsUnited\BundleFu\Filter\FilterInterface
return Factory

setOption() public method

Set an option.
public setOption ( string $name, mixed $value ) : Factory
$name string
$value mixed
return Factory

Property Details

$filters protected property

Filter map.
protected array $filters
return array

$options protected property

Global bundle options.
protected array $options
return array