/** * A Magic Method, Handling WHERE clause pieces and table joins * @see SCAR_Generic::by() * @see SCAR_Generic::join() **/ public function __call($method, $args) { if (substr($method, 0, 2) == 'by') { array_unshift($args, Inflector::columnize(substr($method, 2))); return $this->by($args); } return $this->join($method); }
public static function foreignify($string) { return Inflector::columnize($string) . '_id'; }