コード例 #1
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>';
 }
コード例 #2
0
ファイル: Post.php プロジェクト: rudiedirkx/Rudie-on-wheels
 public function catUrl()
 {
     return 'blog/category/' . $this->category_id . '/' . Inflector::slugify($this->category_name);
 }
コード例 #3
0
ファイル: User.php プロジェクト: rudiedirkx/Rudie-on-wheels
 public function url($more = '')
 {
     return 'blog/user/' . $this->user_id . '/' . Inflector::slugify((string) $this) . $more;
 }
コード例 #4
0
<? $this->title('New record to populate `'.$table.'`') ?>

<form method="post" action="<?php 
echo $app->_url('table-data', $table . '/add/save');
?>
">
<table>
	<tr>
		<th></th>
		<th></th>
		<th>NULL</th>
	</tr>
	<?foreach( $columns AS $name => $details ):?>
		<tr>
			<th><?php 
echo $this::html(Inflector::spacify($name));
?>
</th>
			<td><textarea name="data[<?php 
echo $name;
?>
]"><?php 
echo $this::html((string) $columns[$name]['default']);
?>
</textarea></td>
			<td align="center"><input type="checkbox" name="null[<?php 
echo $name;
?>
]"<?if( !$columns[$name]['null'] && !in_array($name, $pkColumns) ):?> disabled<?elseif( null === $columns[$name]['default'] ):?> checked<?endif?> /></td>
		</tr>
	<?endforeach?>
コード例 #5
0
 public function nameToTitle($name)
 {
     return Inflector::spacify($name);
     // 'beautify'
 }
コード例 #6
0
 public function url($more = '')
 {
     return 'blog/category/' . $this->category_id . '/' . Inflector::slugify($this->category_name) . $more;
 }
コード例 #7
0
ファイル: Output.php プロジェクト: rudiedirkx/Rudie-on-wheels
 public static function slugify($text, $replacement = '-')
 {
     return \row\utils\Inflector::slugify($text, $replacement);
 }