Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
01ba3557
Commit
01ba3557
authored
Sep 10, 2012
by
Bryan te Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize Str-helper (see pull request #1180)
Signed-off-by: Bryan te Beek <bryantebeek@gmail.com>
parent
1f005bd7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
laravel/str.php
+9
-4
No files found.
laravel/str.php
View file @
01ba3557
...
...
@@ -10,15 +10,20 @@ class Str {
public
static
$pluralizer
;
/**
* Get the default string encoding for the application
.
* Cache application encoding locally to save expensive calls to Config::get()
.
*
* This method is simply a short-cut to Config::get('application.encoding').
* @var string
*/
public
static
$encoding
=
null
;
/**
* Get the appliction.encoding without needing to request it from Config::get() each time.
*
* @return string
*/
public
static
function
encoding
()
protected
static
function
encoding
()
{
return
Config
::
get
(
'application.encoding'
);
return
static
::
$encoding
?:
static
::
$encoding
=
Config
::
get
(
'application.encoding'
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment