Exemplo n.º 1
0
 public function catUrl()
 {
     return 'blog/category/' . $this->category_id . '/' . Inflector::slugify($this->category_name);
 }
Exemplo n.º 2
0
 public function inflector()
 {
     echo "<pre><u>  camelcase:</u>\n\n";
     echo $txt = 'Oele boele la la';
     echo "\n";
     var_dump(Inflector::camelcase($txt));
     echo "\n";
     echo $txt = 'verified_user_address';
     echo "\n";
     var_dump(Inflector::camelcase($txt));
     echo "\n";
     echo "<u>  slugify:</u>\n\n";
     echo $txt = 'The (new) future of the old/young/restless AND... pretty!';
     echo "\n";
     var_dump(Inflector::slugify($txt));
     echo "\n";
     echo $txt = 'verified_user_address';
     echo "\n";
     var_dump(Inflector::slugify($txt));
     echo "\n";
     echo "<u>  spacify:</u>\n\n";
     echo $txt = 'the-new-future-of-the-old-young-restless-and-pretty';
     echo "\n";
     var_dump(Inflector::spacify($txt));
     echo "\n";
     echo $txt = 'verified_user_address';
     echo "\n";
     var_dump(Inflector::spacify($txt));
     echo "\n";
     echo "<u>  uncamelcase:</u>\n\n";
     echo $txt = 'verifiedUserAddress';
     echo "\n";
     var_dump(Inflector::uncamelcase($txt));
     echo '</pre>';
 }
Exemplo n.º 3
0
 public function url($more = '')
 {
     return 'blog/category/' . $this->category_id . '/' . Inflector::slugify($this->category_name) . $more;
 }
Exemplo n.º 4
0
 public function url($more = '')
 {
     return 'blog/user/' . $this->user_id . '/' . Inflector::slugify((string) $this) . $more;
 }
Exemplo n.º 5
0
 public static function slugify($text, $replacement = '-')
 {
     return \row\utils\Inflector::slugify($text, $replacement);
 }