示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getContextConfig($key)
 {
     $config = $this->allConfig();
     if (isset($config['contexts'][$key])) {
         $config = array_merge($config, $config['contexts'][$key]);
     }
     return Hash::reduce($config, ['user', 'pass', 'host', 'port', 'database']);
 }
示例#2
0
 /**
  * Test that reduce() reduces the size of the array.
  */
 public function testReduce()
 {
     $this->assertEquals(array('boolean' => true, 'integer' => 123), Hash::reduce($this->expanded, array('boolean', 'integer', 'foobar')));
 }