original_string: public static function fromString($json, $directory = ".") {
          $json = json_decode($json, true);
          if (is_null($json))
              throw new SettingsException("invalid json");
          return new static($json, $directory);
      }
code: public static function fromString($json, $directory = ".") {
          $json = json_decode($json, true);
          if (is_null($json))
              throw new SettingsException("invalid json");
          return new static($json, $directory);
      }
code_tokens: public static function fromString ( $ json , $ directory = "." ) { $ json = json_decode ( $ json , true ) ; if ( is_null ( $ json ) ) throw new SettingsException ( "invalid json" ) ; return new static ( $ json , $ directory ) ; }
docstring: Creates settings from a JSON-encoded string.
  @param string $json
  @param string $directory the directory the settings apply to
  @return Settings
docstring_tokens: Creates settings from a JSON - encoded string .