DataSift\Storyplayer\ConfigLib\StoryplayerConfig::validateDefaultsSection PHP Method

validateDefaultsSection() public method

    public function validateDefaultsSection()
    {
        $config = $this->getConfig();
        if (!isset($config->defaults)) {
            // defaults is optional
            return;
        }
        if (!is_array($config->defaults)) {
            // defaults must be an array
            throw new E4xx_StoryplayerDefaultsSectionMustBeAnArray($this->getFilename());
        }
        foreach ($config->defaults as $defaultValue) {
            if (!is_string($defaultValue)) {
                throw new E4xx_StoryplayerDefaultsMustBeStrings($this->getFilename());
            }
        }
    }