예제 #1
0
 /**
  * Retrieve custom configuration for a specific class.
  * @param $class string|object - class or instance of class to retrieve
  * @param $key string optional - key to retrieve
  * @return array
  */
 public function getClassConfig($class, $key = null)
 {
     if (!is_string($class)) {
         $class = get_class($class);
     }
     return $this->config->getClassConfig($class, $key);
 }
예제 #2
0
 public function testIniConfig()
 {
     $config = new Google_Config(__DIR__ . "/testdata/test.ini");
     $this->assertEquals('My Test application', $config->getApplicationName());
     $this->assertEquals('gjfiwnGinpena3', $config->getClassConfig('Google_Auth_OAuth2', 'client_secret'));
     $this->assertInternalType('array', $config->getClassConfig('Google_IO_Abstract'));
     $this->assertEquals(100, $config->getClassConfig('Google_IO_Abstract', 'request_timeout_seconds'));
 }
예제 #3
0
 public function testIniConfig()
 {
     $config = new Google_Config(__DIR__ . "/testdata/test.ini");
     $this->assertEquals('My Test application', $config->getApplicationName());
     $this->assertEquals('gjfiwnGinpena3', $config->getClassConfig('Google_Auth_OAuth2', 'client_secret'));
 }