-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
248 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/nbproject | ||
/vendor | ||
composer.lock | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
<?php | ||
namespace MonologModule\Factory; | ||
|
||
use Interop\Container\ContainerInterface; | ||
use MonologModule\Formatter\FormatterPluginManager; | ||
use Zend\ServiceManager\Config; | ||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class FormatterPluginManagerFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param ServiceLocatorInterface $serviceLocator | ||
* @return FormatterPluginManager | ||
*/ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
public function __invoke(ContainerInterface $container, $requestedName, array $options = null) | ||
{ | ||
$config = $serviceLocator->get('Config'); | ||
$configInstance = new Config($config['monolog']['formatter_plugin_manager']); | ||
$config = $container->get('Config'); | ||
|
||
return new FormatterPluginManager( | ||
$container, | ||
$config['monolog']['formatter_plugin_manager'] | ||
); | ||
} | ||
|
||
return new FormatterPluginManager($configInstance); | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
return $this->__invoke($serviceLocator, FormatterPluginManager::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
<?php | ||
namespace MonologModule\Factory; | ||
|
||
use Interop\Container\ContainerInterface; | ||
use MonologModule\Handler\HandlerPluginManager; | ||
use Zend\ServiceManager\Config; | ||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class HandlerPluginManagerFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param ServiceLocatorInterface $serviceLocator | ||
* @return HandlerPluginManager | ||
*/ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
public function __invoke(ContainerInterface $container, $requestedName, array $options = null) | ||
{ | ||
$config = $serviceLocator->get('Config'); | ||
$configInstance = new Config($config['monolog']['handler_plugin_manager']); | ||
$config = $container->get('Config'); | ||
|
||
return new HandlerPluginManager( | ||
$container, | ||
$config['monolog']['handler_plugin_manager'] | ||
); | ||
} | ||
|
||
return new HandlerPluginManager($configInstance); | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
return $this->__invoke($serviceLocator, HandlerPluginManager::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.