2015-09-17 23:11:18 -04:00
|
|
|
<?php
|
2015-11-16 11:40:01 -05:00
|
|
|
/**
|
|
|
|
* Ion
|
|
|
|
*
|
|
|
|
* Building blocks for web development
|
|
|
|
*
|
|
|
|
* @package Ion
|
|
|
|
* @author Timothy J. Warren
|
|
|
|
* @copyright Copyright (c) 2015
|
|
|
|
* @license MIT
|
|
|
|
*/
|
2015-09-17 23:11:18 -04:00
|
|
|
|
|
|
|
namespace Aviat\Ion\Di;
|
|
|
|
|
2015-11-13 16:31:01 -05:00
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
|
2015-10-09 22:29:59 -04:00
|
|
|
/**
|
|
|
|
* Interface for the Dependency Injection Container
|
|
|
|
*/
|
2015-09-17 23:11:18 -04:00
|
|
|
interface ContainerInterface extends \Interop\Container\ContainerInterface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a value to the container
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
* @param mixed $value
|
|
|
|
* @return ContainerInterface
|
|
|
|
*/
|
|
|
|
public function set($key, $value);
|
2015-11-13 16:31:01 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a logger to the Container
|
|
|
|
*
|
|
|
|
* @param LoggerInterface $logger
|
|
|
|
* @param string $key The logger 'channel'
|
2015-11-16 10:33:30 -05:00
|
|
|
* @return Container
|
2015-11-13 16:31:01 -05:00
|
|
|
*/
|
|
|
|
public function setLogger(LoggerInterface $logger, $key = 'default');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieve a logger for the selected channel
|
|
|
|
*
|
|
|
|
* @param string $key The logger to retreive
|
|
|
|
* @return LoggerInterface|null
|
|
|
|
*/
|
|
|
|
public function getLogger($key = 'default');
|
2015-09-17 23:11:18 -04:00
|
|
|
}
|