public function loadSchemaFile(): Schema
    {
        if (!file_exists($this->schemaFile)) {
            return new Schema();
        }

        $content = file_get_contents($this->schemaFile);
        $desc = Yaml::parse($content);
        if (empty($desc)) {
            return new Schema();
        }

        $builder = new SchemaBuilder();
        return $builder->build($desc['schema']);
    }
public function loadSchemaFile(): Schema
    {
        if (!file_exists($this->schemaFile)) {
            return new Schema();
        }

        $content = file_get_contents($this->schemaFile);
        $desc = Yaml::parse($content);
        if (empty($desc)) {
            return new Schema();
        }

        $builder = new SchemaBuilder();
        return $builder->build($desc['schema']);
    }
public function loadSchemaFile ( ) : Schema { if ( ! file_exists ( $ this -> schemaFile ) ) { return new Schema ( ) ; } $ content = file_get_contents ( $ this -> schemaFile ) ; $ desc = Yaml :: parse ( $ content ) ; if ( empty ( $ desc ) ) { return new Schema ( ) ; } $ builder = new SchemaBuilder ( ) ; return $ builder -> build ( $ desc [ 'schema' ] ) ; }
Load schema from config file.
@return Schema
Load schema from config file .