original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Read configuration from YAML file
  
  @param string|null $exceptionMessage
  @return array|bool
  @throws SystemException
docstring_tokens: Read configuration from YAML file