DataSift\Storyplayer\ConfigLib\WrappedConfig::getArray PHP Метод

getArray() публичный Метод

throws an exception if the path does not point to an array
public getArray ( string $path ) : array
$path string the dot.notation.path to the data to return
Результат array
    public function getArray($path)
    {
        return $this->config->getArray($path);
    }

Usage Example

Пример #1
0
 /**
  * @covers DataSift\Storyplayer\ConfigLib\WrappedConfig::getArray()
  * @expectedException DataSift\Stone\ObjectLib\E4xx_PropertyNotAnArray
  */
 public function testGetArrayThrowsExceptionWhenNonObjectRetrieved()
 {
     // ----------------------------------------------------------------
     // setup your test
     $obj = new WrappedConfig();
     $obj->loadConfigFromFile(__DIR__ . "/wrapped-config-2.json");
     $expected = $obj->getConfig()->storyplayer;
     // ----------------------------------------------------------------
     // perform the change
     $obj->getArray("storyplayer.ipAddress");
 }