DataSift\Storyplayer\ConfigLib\ConfigList::findConfigs PHP Метод

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

find a list of config files in a folder, and load them
public findConfigs ( ) : void
Результат void
    public function findConfigs()
    {
        // find our SPv2.0-style config files
        $this->list = array_merge($this->list, $this->findJsonConfigs());
        // find our SPv2.3-style config files
        $this->list = array_merge($this->list, $this->findPhpConfigs());
        // we want our list of configs to be sorted, to make presentation
        // to end-users easier
        ksort($this->list);
        // all done
    }

Usage Example

Пример #1
0
 /**
  * @covers DataSift\Storyplayer\ConfigLib\ConfigList::__construct
  * @covers DataSift\Storyplayer\ConfigLib\ConfigList::getEntryNames
  */
 public function testCanGetEntryNames()
 {
     // ----------------------------------------------------------------
     // setup your test
     $obj = new ConfigList("DataSift\\Storyplayer\\ConfigLib\\StoryplayerConfig", __DIR__ . '/ConfigListTestData1');
     $obj->findConfigs();
     $expected = ['config-1', 'config-2'];
     // ----------------------------------------------------------------
     // perform the change
     $actual = $obj->getEntryNames();
     // ----------------------------------------------------------------
     // test the results
     $this->assertSame($expected, $actual);
 }