Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function make_query_builder_select(): Closure {
- $memory = [
- 'tables' => []
- ];
- $builder = function(string $instruction) use (&$memory, &$builder) {
- $instructionParameters = explode(' ', $instruction);
- $instruction = array_shift($instructionParameters);
- switch ($instruction) {
- case 'from':
- break;
- default:
- throw new Exception("Unknown instruction '{$instruction}'!");
- }
- return $builder;
- };
- return $builder;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement