August 2016
Intermediate to advanced
610 pages
11h 55m
English
PHP 7 implements something called a context sensitive lexer. What this means is that words that are normally reserved can be used if the context allows. Thus, when building an object-oriented SQL builder, we can get away with using methods named and, or, not, and so on.
Application\Database\Finder class. In the class, we define methods that match our favorite SQL operations:namespace Application\Database; class Finder { public static $sql = ''; public static $instance = NULL; public static $prefix = ''; public static $where = array(); public static $control = ['', '']; // $a == name of table // $cols = column names public static function select($a, $cols = NULL) { self::$instance = new ...Read now
Unlock full access