duncan3dc\Sonos\Network::__construct PHP Method

__construct() public method

Create a new instance.
public __construct ( Doctrine\Common\Cache\Cache $cache = null, Psr\Log\LoggerInterface $logger = null )
$cache Doctrine\Common\Cache\Cache The cache object to use for the expensive multicast discover to find Sonos devices on the network
$logger Psr\Log\LoggerInterface The logging object
    public function __construct(CacheInterface $cache = null, LoggerInterface $logger = null)
    {
        if ($cache === null) {
            $cache = new Cache();
        }
        $this->cache = $cache;
        if ($logger === null) {
            $logger = new NullLogger();
        }
        $this->logger = $logger;
    }