本文整理汇总了PHP中Patchwork\Utf8::ucfirst方法的典型用法代码示例。如果您正苦于以下问题:PHP Utf8::ucfirst方法的具体用法?PHP Utf8::ucfirst怎么用?PHP Utf8::ucfirst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patchwork\Utf8
的用法示例。
在下文中一共展示了Utf8::ucfirst方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTitle
public function getTitle()
{
$title = Utf8::ucfirst($this->title['parent']);
if ($this->title['child']) {
$title .= ' – ' . Utf8::ucfirst($this->title['child']);
}
$title .= ' – ' . $this->appname;
return $title;
}
示例2: __construct
public function __construct($repository = null)
{
$this->repository = $repository;
$this->applicationName = Config::get('typicms.' . App::getLocale() . '.websiteTitle');
$instance = $this;
View::composer($this->layout, function (\Illuminate\View\View $view) use($instance) {
$view->withTitle(Utf8::ucfirst(implode(' ', $instance->title)) . ' – ' . $instance->applicationName);
});
$bodyClass = ['lang-' . App::getLocale(), $repository->getModel()->getTable()];
if (Sentry::getUser() && !Input::get('preview')) {
$bodyClass[] = 'has-navbar';
}
View::share('lang', App::getLocale());
View::share('bodyClass', implode(' ', $bodyClass));
}
示例3: api_ucfirst
/**
* Makes a string's first character uppercase.
* @param string $string The input string.
* @param string $encoding (optional) The used internally by this function character encoding.
* If it is omitted, the platform character set will be used by default.
* @return string Returns a string with the first character capitalized, if that character is alphabetic.
* This function is aimed at replacing the function ucfirst() for human-language strings.
* @link http://php.net/manual/en/function.ucfirst
*/
function api_ucfirst($string, $encoding = null)
{
return Utf8::ucfirst($string);
}
示例4: upperFirst
public function upperFirst()
{
$this->string = u::ucfirst($this->string);
return $this;
}
示例5: utf8_ucfirst
/**
* Make sure the first letter is uppercase
*
* @param string $str
*
* @return string
*
* @deprecated Deprecated since Contao 4.0, to be removed in Contao 5.0.
* Use Patchwork\Utf8::ucfirst() instead.
*/
function utf8_ucfirst($str)
{
@trigger_error('Using utf8_ucfirst() has been deprecated and will no longer work in Contao 5.0. Use Patchwork\\Utf8::ucfirst() instead.', E_USER_DEPRECATED);
return Utf8::ucfirst($str);
}
示例6: postForgotPassword
/**
* Request forgot password
* @param $email string
* @return redirect
*/
public function postForgotPassword()
{
$valid = Validator::make(Input::all(), array('email' => 'required|email|exists:users'), array('exists' => \Patchwork\Utf8::ucfirst(trans('larauth::larauth.account_with_email_not_exist'))));
if (!$valid->passes()) {
return Redirect::route('larauth.forgot_password')->with('errors', $valid->errors())->with(Input::all());
}
$user = Sentry::findUserByCredentials(['email' => Input::get('email')]);
$key = $user->getResetPasswordCode();
$data = ['key' => $key, 'email' => Input::get('email'), 'subject' => trans('larauth::larauth.password_recovery')];
$this->sendMail(Config::get('larauth::views.mail_forgotpassword'), $data);
return Redirect::route('larauth.forgot_password')->with('processed', true);
}
示例7: added
public function added()
{
setlocale(LC_TIME, 'fr_FR.utf8', 'fra');
$dt = Carbon::parse($this->created_at);
return Utf8::ucfirst($dt->formatLocalized('%A %d %B %Y'));
}
示例8: test_linefeed
public function test_linefeed()
{
$str = "ñtërn\nâtiônàlizætiøn";
$ucfirst = "Ñtërn\nâtiônàlizætiøn";
$this->assertEquals($ucfirst, u::ucfirst($str));
}