PHP Class Nelmio\Alice\Entity\StdClassFactory

Exibir arquivo Open project: nelmio/alice Class Usage Examples

Public Methods

Method Description
create ( array $attributes = [] ) : stdClass Creates an stdClass instance with the given attributes. For example:

Method Details

create() public static method

$std = $factory->create(['foo' => 'bar', 'ping' => 'pong']); is equivalent to: $std = new \stdClass(); $std->foo = 'bar'; $std->ping = 'pong';
public static create ( array $attributes = [] ) : stdClass
$attributes array
return stdClass