public function load($file, $type = null)
    {
        $json = file_get_contents($this->getPath($file));

        $content = [];

        if ('' !== $json) {
            $content = json_decode($json, true);
            $error = json_last_error();

            if (JSON_ERROR_NONE !== $error) {
                throw new JsonParseException($error);
            }
        }

        $content = $this->resolveParams($content); //Resolve parameter placeholders (%name%)

        return $content;
    }
public function load($file, $type = null)
    {
        $json = file_get_contents($this->getPath($file));

        $content = [];

        if ('' !== $json) {
            $content = json_decode($json, true);
            $error = json_last_error();

            if (JSON_ERROR_NONE !== $error) {
                throw new JsonParseException($error);
            }
        }

        $content = $this->resolveParams($content); //Resolve parameter placeholders (%name%)

        return $content;
    }
public function load ( $ file , $ type = null ) { $ json = file_get_contents ( $ this -> getPath ( $ file ) ) ; $ content = [ ] ; if ( '' !== $ json ) { $ content = json_decode ( $ json , true ) ; $ error = json_last_error ( ) ; if ( JSON_ERROR_NONE !== $ error ) { throw new JsonParseException ( $ error ) ; } } $ content = $ this -> resolveParams ( $ content ) ; //Resolve parameter placeholders (%name%) return $ content ; }
Loads an Json file.

@param mixed  $file The resource
@param string $type The resource type

@return array

@throws \InvalidArgumentException                            if configuration file not found
@throws \Propel\Common\Config\Exception\JsonParseException   if invalid json file
@throws \Propel\Common\Config\Exception\InputOutputException if configuration file is not readable
Loads an Json file .