<?php
/**
 *
 * @author：llbjj
 * @DateTime：2022/5/4 21:28
 * @Description：
 *
 */

namespace Application\Factory;

use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException;
use Laminas\ServiceManager\Exception\ServiceNotCreatedException;
use Laminas\ServiceManager\Exception\ServiceNotFoundException;

class ServiceFactory implements \Laminas\ServiceManager\Factory\FactoryInterface
{

    /**
     * @inheritDoc
     */
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
    {
        // TODO: Implement __invoke() method.
        return (null === $options) ? new $requestedName($container) : new $requestedName($container, $options);
    }
}