igor822/query-parser

This project is a different approach to separate your queries search to run into database, when a simple (or comples) ORM is too complicated to run all your queries or simply can't do what you need, you can use QueryParser for put your queries into a YAML file and easily get from source

1.0.0 2015-09-12 21:41 UTC

This package is auto-updated.

Last update: 2022-07-29 01:09:58 UTC


README

This project is a different approach to separate your queries search to run into database, when a simple (or comples) ORM is too complicated to run all your queries or simply can't do what you need, you can use QueryParser for put your queries into a YAML file and easily get from source

Example

<?php
$queryParser = new QueryParser('config/queries.yml');
$path = 'queries.user.login';
$query = $queryParser->findQuery($path);
$query = $queryParser->replaceValues($query, array('id' => 1));

echo $query;

To test and implement at other projects, you must to add , "zendframework/zend-config": "2.0.*" to require composer