PHP Class Phactory\Mongo\Blueprint

Afficher le fichier Open project: chriskite/phactory

Protected Properties

Свойство Type Description
$_collection
$_defaults
$_sequence

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode Description
_evalSequence ( &$data )

Method Details

__construct() public méthode

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

_evalSequence() protected méthode

protected _evalSequence ( &$data )

addAssociation() public méthode

public addAssociation ( $name, $association )

addDefault() public méthode

public addDefault ( $column, $value )

build() public méthode

* 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 méthode

* 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 méthode

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

removeAssociation() public méthode

public removeAssociation ( $name )

removeDefault() public méthode

public removeDefault ( $column )

setAssociations() public méthode

public setAssociations ( $associations )

setDefaults() public méthode

public setDefaults ( $defaults )

Property Details

$_collection protected_oe property

protected $_collection

$_defaults protected_oe property

protected $_defaults

$_sequence protected_oe property

protected $_sequence