protected function getConfigurationFromYaml($exceptionMessage = null)
    {
        if ($this->loadedYamlConfiguration !== false) {
            return $this->loadedYamlConfiguration;
        }

        $reflection = new ReflectionClass(get_class($this));
        $yamlFilePath = dirname($reflection->getFileName()).'/plugin.yaml';

        if (!file_exists($yamlFilePath)) {
            if ($exceptionMessage) {
                throw new SystemException($exceptionMessage);
            }

            $this->loadedYamlConfiguration = [];
        }
        else {
            $this->loadedYamlConfiguration = Yaml::parse(file_get_contents($yamlFilePath));
            if (!is_array($this->loadedYamlConfiguration)) {
                throw new SystemException(sprintf('Invalid format of the plugin configuration file: %s. The file should define an array.', $yamlFilePath));
            }
        }

        return $this->loadedYamlConfiguration;
    }
protected function getConfigurationFromYaml($exceptionMessage = null)
    {
        if ($this->loadedYamlConfiguration !== false) {
            return $this->loadedYamlConfiguration;
        }

        $reflection = new ReflectionClass(get_class($this));
        $yamlFilePath = dirname($reflection->getFileName()).'/plugin.yaml';

        if (!file_exists($yamlFilePath)) {
            if ($exceptionMessage) {
                throw new SystemException($exceptionMessage);
            }

            $this->loadedYamlConfiguration = [];
        }
        else {
            $this->loadedYamlConfiguration = Yaml::parse(file_get_contents($yamlFilePath));
            if (!is_array($this->loadedYamlConfiguration)) {
                throw new SystemException(sprintf('Invalid format of the plugin configuration file: %s. The file should define an array.', $yamlFilePath));
            }
        }

        return $this->loadedYamlConfiguration;
    }
protected function getConfigurationFromYaml ( $ exceptionMessage = null ) { if ( $ this -> loadedYamlConfiguration !== false ) { return $ this -> loadedYamlConfiguration ; } $ reflection = new ReflectionClass ( get_class ( $ this ) ) ; $ yamlFilePath = dirname ( $ reflection -> getFileName ( ) ) . '/plugin.yaml' ; if ( ! file_exists ( $ yamlFilePath ) ) { if ( $ exceptionMessage ) { throw new SystemException ( $ exceptionMessage ) ; } $ this -> loadedYamlConfiguration = [ ] ; } else { $ this -> loadedYamlConfiguration = Yaml :: parse ( file_get_contents ( $ yamlFilePath ) ) ; if ( ! is_array ( $ this -> loadedYamlConfiguration ) ) { throw new SystemException ( sprintf ( 'Invalid format of the plugin configuration file: %s. The file should define an array.' , $ yamlFilePath ) ) ; } } return $ this -> loadedYamlConfiguration ; }
Read configuration from YAML file

@param string|null $exceptionMessage
@return array|bool
@throws SystemException
Read configuration from YAML file