1
Install FiQueLa
If you haven’t already, add the package to your project:Then include the autoloader:
2
Approach 1: Open a file with Stream\Provider
Use You can also open specific stream classes directly:
Stream\Provider::fromFile to open a file and call ->query() to start building a query with the fluent API. The format is inferred automatically from the file extension.3
Approach 2: FileQuery syntax with Query\Provider
Query\Provider::fromFileQuery accepts a compact string that encodes the format, file path, and data path in one expression. This is useful for quick one-liners.4
Approach 3: FQL string syntax with Query\Provider
Query\Provider::fql accepts a full SQL-like string. This is the most expressive option and mirrors the FQL syntax closely.5
Inspect the output
All three approaches produce the same array structure:
fetchAll() returns a Generator. Wrap it with iterator_to_array() to get a plain array, or iterate it directly in a foreach loop.Next steps
Fluent API
Learn every method available for building queries in PHP.
FQL syntax
Write full SQL-like query strings with all supported clauses.