Exemplo n.º 1
0
 /**
  * @param Config $config
  */
 public function __construct(Config $config)
 {
     $this->memcached = new \Memcached();
     $this->memcached->addServer($config->get('memcached.host'), $config->get('memcached.port'));
 }
Exemplo n.º 2
0
 /**
  * @param Config $config
  */
 public function __construct(Config $config)
 {
     $this->pdo = new \PDO(sprintf('mysql:host=%s;dbname=%s;charset=utf8', $config->get('database.host'), $config->get('database.name')), $config->get('database.user'), $config->get('database.password'));
 }
Exemplo n.º 3
0
 /**
  * @param Config $config
  */
 public function __construct(Config $config)
 {
     $this->binary = $config->get('wkhtmltopdf.binary');
 }
Exemplo n.º 4
0
 /**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Option foo is not set
  */
 public function testGetThrowsExceptionWhenOptionIsNotSet()
 {
     $config = new Config();
     $config->get('foo');
 }