/** * Provides access to a prototype of the Prooph\Done\Process\Type\Type (empty Object, with a Description and PrototypeProperties) * * @return Prototype */ public static function prototype() { $implementer = get_called_class(); if (PrototypeRegistry::hasPrototype($implementer)) { return PrototypeRegistry::getPrototype($implementer); } return new Prototype($implementer, static::buildDescription(), array('item' => new PrototypeProperty('item', static::itemPrototype()))); }
/** * Provides access to a prototype of the Prooph\Done\Process\Type\Type (empty Object, with a Description and PrototypeProperties) * * @return Prototype */ public static function prototype() { $implementer = get_called_class(); if (PrototypeRegistry::hasPrototype($implementer)) { return PrototypeRegistry::getPrototype($implementer); } $propertyPrototypes = static::getPropertyPrototypes(); $propertyMap = array(); foreach ($propertyPrototypes as $propertyName => $propertyPrototype) { $propertyMap[$propertyName] = new PrototypeProperty($propertyName, $propertyPrototype); } return new Prototype($implementer, static::buildDescription(), $propertyMap); }