當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Inflector::titleize方法代碼示例

本文整理匯總了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();
 }
開發者ID:kublaj,項目名稱:OmniBuilder,代碼行數:17,代碼來源:Custom_Taxonomy.php

示例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();
 }
開發者ID:kublaj,項目名稱:OmniBuilder,代碼行數:25,代碼來源:Custom_Post_Type.php

示例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>
開發者ID:mehulsbhatt,項目名稱:volcano,代碼行數:31,代碼來源:index.php

示例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>
開發者ID:alexanmtz,項目名稱:M-dulo-de-pagamento-para-wordpress,代碼行數:31,代碼來源:modulo-vendas.php

示例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'));
?>
開發者ID:mehulsbhatt,項目名稱:volcano,代碼行數:31,代碼來源:edit.php

示例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'));
開發者ID:mehulsbhatt,項目名稱:volcano,代碼行數:31,代碼來源:create.php

示例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();
}
開發者ID:lchen01,項目名稱:STEdwards,代碼行數:27,代碼來源:delete-confirm.php

示例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>
開發者ID:phaedryx,項目名稱:wannabe-mvc,代碼行數:11,代碼來源:_nav.php

示例9: type

 /**
  * Type helper function.
  *
  * @return string
  */
 public function type()
 {
     return Inflector::titleize($this->gateway->type);
 }
開發者ID:mehulsbhatt,項目名稱:volcano,代碼行數:9,代碼來源:paymentmethod.php

示例10: __toString

 /**
  * Returns this model's string representation.
  *
  * @return string
  */
 public function __toString()
 {
     return Inflector::titleize($this->name, '.');
 }
開發者ID:mehulsbhatt,項目名稱:volcano,代碼行數:9,代碼來源:event.php

示例11: paymentmethod

 /**
  * Payment method details helper function.
  *
  * @return string
  */
 public function paymentmethod()
 {
     return Inflector::titleize($this->type) . ' ' . $this->provider . ' ' . $this->account;
 }
開發者ID:mehulsbhatt,項目名稱:volcano,代碼行數:9,代碼來源:transaction.php

示例12: pluralize_titleize

 public static function pluralize_titleize($string)
 {
     $string = Inflector::pluralize(Inflector::titleize($string));
     return $string;
 }
開發者ID:rogerchom,項目名稱:feedback_app,代碼行數:5,代碼來源:Inflector.php


注:本文中的Inflector::titleize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。