toUpperWords() public static method

Convert "camelCaseWord" to "CAMEL CASE WORD"
public static toUpperWords ( string $string ) : string
$string string
return string
Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /** 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);
 }