Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
79d0dc45
Commit
79d0dc45
authored
Apr 18, 2011
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mount] separate app and appPath members for LazyApplication
parent
85ff2522
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/Silex/LazyApplication.php
src/Silex/LazyApplication.php
+5
-4
No files found.
src/Silex/LazyApplication.php
View file @
79d0dc45
...
...
@@ -20,6 +20,7 @@ use Symfony\Component\HttpFoundation\Request;
*/
class
LazyApplication
{
protected
$appPath
;
protected
$app
;
/**
...
...
@@ -30,9 +31,9 @@ class LazyApplication
*
* @param string $app The absolute path to a Silex app file
*/
public
function
__construct
(
$app
)
public
function
__construct
(
$app
Path
)
{
$this
->
app
=
$app
;
$this
->
app
Path
=
$appPath
;
}
/**
...
...
@@ -43,8 +44,8 @@ class LazyApplication
*/
public
function
__invoke
(
Request
$request
,
$prefix
)
{
if
(
!
$this
->
app
instanceof
Application
)
{
$this
->
app
=
require
$this
->
app
;
if
(
!
$this
->
app
)
{
$this
->
app
=
require
$this
->
app
Path
;
}
return
$this
->
app
->
__invoke
(
$request
,
$prefix
);
...
...
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