Submit
Path:
~
/
/
opt
/
psa
/
admin
/
plib
/
vendor
/
laminas
/
laminas-servicemanager
/
src
/
Factory
/
File Content:
InvokableFactory.php
<?php declare(strict_types=1); namespace Laminas\ServiceManager\Factory; use Psr\Container\ContainerInterface; /** * Factory for instantiating classes with no dependencies or which accept a single array. * * The InvokableFactory can be used for any class that: * * - has no constructor arguments; * - accepts a single array of arguments via the constructor. * * It replaces the "invokables" and "invokable class" functionality of the v2 * service manager. */ final class InvokableFactory implements FactoryInterface { /** {@inheritDoc} */ public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { return null === $options ? new $requestedName() : new $requestedName($options); } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
AbstractFactoryInterface.php
899 bytes
0644
DelegatorFactoryInterface.php
1231 bytes
0644
FactoryInterface.php
1116 bytes
0644
InvokableFactory.php
759 bytes
0644
N4ST4R_ID | Naxtarrr