本文整理匯總了PHP中Inflector::titleize方法的典型用法代碼示例。如果您正苦於以下問題:PHP Inflector::titleize方法的具體用法?PHP Inflector::titleize怎麽用?PHP Inflector::titleize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Inflector
的用法示例。
在下文中一共展示了Inflector::titleize方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param string $name
* @param Custom_Post_Type $post_type
* @param array $args
*/
public function __construct($name, Custom_Post_Type $post_type, array $args = array())
{
$this->name = \Inflector::underscore($name);
$this->plural = \Inflector::titleize($this->name);
$this->singular = \Inflector::singularize($this->plural);
$this->post_type = $post_type;
$this->args = $args;
if (!isset($this->args['labels'])) {
$this->args['labels'] = array('name' => __($this->plural), 'singular_name' => __($this->singular), 'search_items' => __('Search ' . $this->plural), 'all_items' => __('All ' . $this->plural), 'parent_item' => __('Parent ' . $this->singular), 'parent_item_colon' => __('Parent ' . $this->singular), 'edit_item' => __('Edit ' . $this->singular), 'update_item' => __('Update ' . $this->singular), 'add_new_item' => __('Add New ' . $this->singular), 'new_item_name' => __('New ' . $this->singular . ' Name'), 'menu_name' => __($this->plural));
}
$this->subscribe();
}
示例2: __construct
/**
* @param string $name
*/
public function __construct($name, array $fields = array(), array $args = array(), $public = true)
{
$this->name = \Inflector::underscore(\Inflector::singularize($name));
$this->singular = \Inflector::titleize($name);
$this->plural = \Inflector::pluralize($this->singular);
$this->json_data = array();
$this->screen = null;
$this->args = $args;
foreach ($fields as $field) {
if ($field instanceof Custom_Meta_Box) {
$field->set_parent($this);
$this->json_data[$field->get_id()] = $field->get_json_data();
}
}
if (!isset($this->args['public'])) {
$this->args['public'] = $public;
}
if (!isset($this->args['labels'])) {
$this->args['labels'] = array('name' => __($this->singular), 'singular_name' => __($this->singular), 'menu_name' => __($this->plural), 'name_admin_bar' => __($this->singular), 'add_new' => __('Add New'), 'add_new_item' => __('Add New ' . $this->singular), 'edit_item' => __('Edit ' . $this->singular), 'view_item' => __('View ' . $this->singular), 'all_items' => __('All ' . $this->plural), 'search_items' => __('Search ' . $this->plural), 'parent_item_colon' => __('Parent ' . $this->plural . ':'), 'not_found' => __('No ' . strtolower($this->plural) . ' found.'), 'not_found_in_trash' => __('No ' . strtolower($this->plural) . ' found in trash.'));
}
$this->subscribe();
}
示例3: foreach
<th>Callback URL</th>
<th>Date Created</th>
<th>Date Updated</th>
<th>Actions</th>
</thead>
<tbody>
<?php
foreach ($callbacks as $callback) {
?>
<tr>
<td><?php
echo $callback->id;
?>
</td>
<td><?php
echo Inflector::titleize($callback->event, '.');
?>
</td>
<td><?php
echo $callback->url;
?>
</td>
<td><?php
echo View_Helper::date($callback->created_at);
?>
</td>
<td><?php
echo $callback->updated_at != $callback->created_at ? View_Helper::date($callback->updated_at) : '';
?>
</td>
<td>
示例4: Inflector
" valign="top">
<?php
echo $venda->email;
?>
</td>
<td class="<?php
if ($count == 1) {
echo 'alternate';
}
?>
" valign="top">
<?php
$status = new Inflector();
?>
<?php
echo $status->titleize($venda->status);
?>
</td>
<td class="<?php
if ($count == 1) {
echo 'alternate';
}
?>
anotacoes" valign="top">
<?php
if ($venda->anotacoes) {
?>
<a href="#" class="manage"><?php
echo $venda->anotacoes;
?>
</a>
示例5: array
echo Form::select('processor', Input::post('processor', $gateway->processor), $processors, array('class' => 'required'));
?>
<?php
if (!empty($errors['processor'])) {
echo $errors['processor'];
}
?>
</div>
</div>
<?php
foreach ($gateway->meta() as $meta) {
?>
<div class="control-group">
<?php
echo Form::label(Inflector::titleize($meta->name), $meta->name, array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo Form::input("meta[{$meta->name}]", Input::post("meta.{$meta->name}", Crypt::decode($meta->value, $enc_key)));
?>
</div>
</div>
<?php
}
?>
<div class="form-actions">
<?php
echo Html::anchor('settings/gateways', __('form.cancel.label'), array('class' => 'btn'));
?>
示例6: array
<?php
$layout->title = 'Add Gateway';
$layout->breadcrumbs['Settings'] = 'settings';
$layout->breadcrumbs['Gateways'] = 'settings/gateways';
$layout->breadcrumbs['Add Gateway'] = '';
$types = array();
foreach (Arr::get($config, 'types') as $type) {
$types[$type] = Inflector::titleize($type);
}
$processors = array();
foreach (Arr::get($config, 'processors') as $processor) {
$processors[$processor] = Inflector::titleize($processor);
}
?>
<?php
echo Form::open(array('class' => 'form-horizontal form-validate'));
?>
<div class="control-group<?php
if (!empty($errors['type'])) {
echo ' error';
}
?>
">
<?php
echo Form::label('Type', 'type', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo Form::select('type', Input::post('type'), $types, array('class' => 'required'));
示例7: get_class
<?php
$class = get_class($record);
$pageTitle = __('Delete %s', Inflector::titleize($class));
if (!$isPartial) {
echo head(array('title' => $pageTitle));
}
?>
<div title="<?php
echo $pageTitle;
?>
">
<h2><?php
echo __('Are you sure?');
?>
</h2>
<?php
echo text_to_paragraphs(html_escape($confirmMessage));
?>
<?php
echo $form;
?>
</div>
<?php
if (!$isPartial) {
echo foot();
}
示例8: foreach
<div class="nav">
<?php
foreach (all_controllers() as $controller) {
?>
<?php
link_to(Inflector::titleize(str_replace('Controller', '', $controller)), index_path(Inflector::underscore(str_replace('Controller', '', $controller))));
?>
<?php
}
?>
</div>
示例9: type
/**
* Type helper function.
*
* @return string
*/
public function type()
{
return Inflector::titleize($this->gateway->type);
}
示例10: __toString
/**
* Returns this model's string representation.
*
* @return string
*/
public function __toString()
{
return Inflector::titleize($this->name, '.');
}
示例11: paymentmethod
/**
* Payment method details helper function.
*
* @return string
*/
public function paymentmethod()
{
return Inflector::titleize($this->type) . ' ' . $this->provider . ' ' . $this->account;
}
示例12: pluralize_titleize
public static function pluralize_titleize($string)
{
$string = Inflector::pluralize(Inflector::titleize($string));
return $string;
}