Convert "camelCaseWord" to "CAMEL CASE WORD"
public static toUpperWords ( string $string ) : string | ||
$string | string | |
Résultat | string |
/** * @param $clause * @param array $parameters - first is $statement followed by $parameters * @return $this|SelectQuery */ public function __call($clause, $parameters = array()) { $clause = FluentUtils::toUpperWords($clause); if ($clause == 'GROUP') { $clause = 'GROUP BY'; } if ($clause == 'ORDER') { $clause = 'ORDER BY'; } if ($clause == 'FOOT NOTE') { $clause = "\n--"; } $statement = array_shift($parameters); if (strpos($clause, 'JOIN') !== FALSE) { return $this->addJoinStatements($clause, $statement, $parameters); } return $this->addStatement($clause, $statement, $parameters); }
/** Add SQL clause with parameters * @param type $clause * @param type $parameters first is $statement followed by $parameters * @return FluentQuery */ function __call($clause, $parameters = array()) { $clause = FluentUtils::toUpperWords($clause); $statement = array_shift($parameters); if (strpos($clause, 'JOIN')) { return $this->addJoinStatements($clause, $statement, $parameters); } return $this->addStatement($clause, $statement, $parameters); }