public function __construct(AssetFactory $factory) { $this->factory = $factory; $this->prototypes = array(); foreach ($this ->registerPrototypes() as $prototype => $options) { $this ->addPrototype($prototype, $options); } }