original_string: protected function loadJsonParameters()
      {
          $reflectionObject = new \ReflectionObject($this);
          $componentFile    = $reflectionObject->getFileName();
          $parameterFile    = dirname($componentFile).DIRECTORY_SEPARATOR.pathinfo(
                  $componentFile,
                  PATHINFO_FILENAME
              ).'.json';
          if (is_readable($parameterFile)) {
              $jsonParameters = file_get_contents($parameterFile);
              if (strlen($jsonParameters)) {
                  $jsonParameterObj = @json_decode($jsonParameters);
                  if ($jsonParameterObj && is_object($jsonParameterObj)) {
                      foreach ($jsonParameterObj as $name => $value) {
                          $this->setParameter($name, $value);
                      }
                  }
              }
          }
      }
code: protected function loadJsonParameters()
      {
          $reflectionObject = new \ReflectionObject($this);
          $componentFile    = $reflectionObject->getFileName();
          $parameterFile    = dirname($componentFile).DIRECTORY_SEPARATOR.pathinfo(
                  $componentFile,
                  PATHINFO_FILENAME
              ).'.json';
          if (is_readable($parameterFile)) {
              $jsonParameters = file_get_contents($parameterFile);
              if (strlen($jsonParameters)) {
                  $jsonParameterObj = @json_decode($jsonParameters);
                  if ($jsonParameterObj && is_object($jsonParameterObj)) {
                      foreach ($jsonParameterObj as $name => $value) {
                          $this->setParameter($name, $value);
                      }
                  }
              }
          }
      }
code_tokens: protected function loadJsonParameters ( ) { $ reflectionObject = new \ ReflectionObject ( $ this ) ; $ componentFile = $ reflectionObject -> getFileName ( ) ; $ parameterFile = dirname ( $ componentFile ) . DIRECTORY_SEPARATOR . pathinfo ( $ componentFile , PATHINFO_FILENAME ) . '.json' ; if ( is_readable ( $ parameterFile ) ) { $ jsonParameters = file_get_contents ( $ parameterFile ) ; if ( strlen ( $ jsonParameters ) ) { $ jsonParameterObj = @ json_decode ( $ jsonParameters ) ; if ( $ jsonParameterObj && is_object ( $ jsonParameterObj ) ) { foreach ( $ jsonParameterObj as $ name => $ value ) { $ this -> setParameter ( $ name , $ value ) ; } } } } }
docstring: Load parameters provided from an external JSON file
docstring_tokens: Load parameters provided from an external JSON file