src/ActiveDoctrine/Entity/Entity.php
/**
     * Create a new collection with an amount of empty entities.
     *
     * @param Connection $connection A connection instance
     * @param int        $amount     The amount of new Entities to create
     */
Create a new collection with an amount of empty entities.
@param Connection $connection A connection instance
@param int        $amount     The amount of new Entities to create
Create a new collection with an amount of empty entities . @param Connection $connection A connection instance @param int $amount The amount of new Entities to create
public static function create(Connection $connection, $amount = 0)
    {
        $entities = [];
        for ($i = 0; $i < (int) $amount; $i++) {
            $entities[] = new static($connection);
        }
        return static::newCollection($entities);
    }
public static function create ( Connection $ connection , $ amount = 0 ) { $ entities = [ ] ; for ( $ i = 0 ; $ i < ( int ) $ amount ; $ i ++ ) { $ entities [ ] = new static ( $ connection ) ; } return static :: newCollection ( $ entities ) ; }
Create a new collection with an amount of empty entities.
Create a new collection with an amount of empty entities .