Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
d9201be4
Commit
d9201be4
authored
Sep 26, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring view compilation.
parent
516f310e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
container.php
laravel/config/container.php
+1
-1
view.php
laravel/view.php
+11
-2
.gitignore
storage/views/.gitignore
+0
-0
No files found.
laravel/config/container.php
View file @
d9201be4
...
...
@@ -80,7 +80,7 @@ return array(
{
require_once
SYS_PATH
.
'view'
.
EXT
;
return
new
View_Factory
(
$c
->
resolve
(
'laravel.composer'
),
VIEW_PATH
);
return
new
View_Factory
(
$c
->
resolve
(
'laravel.composer'
),
VIEW_PATH
,
STORAGE_PATH
.
'views/'
);
}),
...
...
laravel/view.php
View file @
d9201be4
...
...
@@ -9,6 +9,13 @@ class View_Factory {
*/
public
$path
;
/**
* The path to the application storage directory.
*
* @var string
*/
public
$compiled
;
/**
* The view composer instance.
*
...
...
@@ -21,12 +28,14 @@ class View_Factory {
*
* @param View_Composer $composer
* @param string $path
* @param string $compiled
* @return void
*/
public
function
__construct
(
View_Composer
$composer
,
$path
)
public
function
__construct
(
View_Composer
$composer
,
$path
,
$compiled
)
{
$this
->
path
=
$path
;
$this
->
composer
=
$composer
;
$this
->
compiled
=
$compiled
;
}
/**
...
...
@@ -279,7 +288,7 @@ class View {
// For simplicity, compiled views are stored in a single directory by the MD5 hash of
// their name. This allows us to avoid recreating the entire view directory structure
// within the compiled views directory.
$compiled
=
$this
->
factory
->
path
.
'compiled/'
.
md5
(
$this
->
view
);
$compiled
=
$this
->
factory
->
compiled
.
md5
(
$this
->
view
);
// The view will only be re-compiled if the view has been modified since the last compiled
// version of the view was created or no compiled view exists. Otherwise, the path will
...
...
storage/views/.gitignore
0 → 100644
View file @
d9201be4
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