Phactory\Sql\Phactory::buildWithAssociations PHP Method

buildWithAssociations() public method

The row is not saved to the database.
public buildWithAssociations ( $blueprint_name, $associations = [], $overrides = [] )
$blueprint_name name of the blueprint to use
$associations [table name] => [Row]
$overrides key => value pairs of column => value
    public function buildWithAssociations($blueprint_name, $associations = array(), $overrides = array())
    {
        if (!($blueprint = $this->_blueprints[$blueprint_name])) {
            throw new \Exception("No blueprint defined for '{$blueprint_name}'");
        }
        foreach ($associations as $association) {
            if ($association instanceof Association\ManyToMany) {
                throw new \Exception("ManyToMany associations cannot be used in Phactory::build()");
            }
        }
        return $blueprint->build($overrides, $associations);
    }