PHP Class Phactory\Mongo\Blueprint

Datei anzeigen Open project: chriskite/phactory

Protected Properties

Property Type Description
$_collection
$_defaults
$_sequence

Public Methods

Method Description
__construct ( $name, $defaults, $associations = [], Phactory $phactory )
addAssociation ( $name, $association )
addDefault ( $column, $value )
build ( $overrides = [], $associated = [] ) * Build the document as an array, but don't save it to the db.
create ( $overrides = [], $associated = [] ) * Create document in the database and return it.
recall ( ) * Empty the collection in the database.
removeAssociation ( $name )
removeDefault ( $column )
setAssociations ( $associations )
setDefaults ( $defaults )

Protected Methods

Method Description
_evalSequence ( &$data )

Method Details

__construct() public method

public __construct ( $name, $defaults, $associations = [], Phactory $phactory )
$phactory Phactory

_evalSequence() protected method

protected _evalSequence ( &$data )

addAssociation() public method

public addAssociation ( $name, $association )

addDefault() public method

public addDefault ( $column, $value )

build() public method

* Build the document as an array, but don't save it to the db.
public build ( $overrides = [], $associated = [] )
$overrides field => value pairs which override the defaults for this blueprint
$associated [name] => [Association] pairs

create() public method

* Create document in the database and return it.
public create ( $overrides = [], $associated = [] )
$overrides field => value pairs which override the defaults for this blueprint
$associated [name] => [Association] pairs

recall() public method

* Empty the collection in the database.
public recall ( )

removeAssociation() public method

public removeAssociation ( $name )

removeDefault() public method

public removeDefault ( $column )

setAssociations() public method

public setAssociations ( $associations )

setDefaults() public method

public setDefaults ( $defaults )

Property Details

$_collection protected_oe property

protected $_collection

$_defaults protected_oe property

protected $_defaults

$_sequence protected_oe property

protected $_sequence