<?php
/**
 *
 * @author：llbjj
 * @DateTime：2022/5/7 21:30
 * @Description：
 *
 */

namespace Application\Factory;

use Laminas\ServiceManager\Exception\ServiceNotCreatedException;
use Laminas\ServiceManager\Exception\ServiceNotFoundException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;

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

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