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
9da20410
Commit
9da20410
authored
Sep 04, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added resolver class file.
parent
cd395c26
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
25 deletions
+27
-25
application.php
laravel/application.php
+0
-25
bootstrap.php
laravel/bootstrap.php
+1
-0
resolver.php
laravel/resolver.php
+26
-0
No files found.
laravel/application.php
View file @
9da20410
<?php
namespace
Laravel
;
abstract
class
Resolver
{
/**
* Magic Method for resolving classes out of the IoC container.
*
* This allows the derived class to provide access to all of the Laravel libraries
* registered in the container. Currently, this class is derived by the Application
* and Controller classes.
*/
public
function
__get
(
$key
)
{
if
(
IoC
::
container
()
->
registered
(
'laravel.'
.
$key
))
{
return
IoC
::
container
()
->
resolve
(
'laravel.'
.
$key
);
}
elseif
(
IoC
::
container
()
->
registered
(
$key
))
{
return
IoC
::
container
()
->
resolve
(
$key
);
}
throw
new
\Exception
(
"Attempting to access undefined property [
$key
]."
);
}
}
class
Application
extends
Resolver
{
/**
...
...
laravel/bootstrap.php
View file @
9da20410
...
...
@@ -35,6 +35,7 @@ define('VIEW_PATH', APP_PATH.'views/');
// --------------------------------------------------------------
// Bootstrap the application instance.
// --------------------------------------------------------------
require
SYS_PATH
.
'resolver'
.
EXT
;
require
SYS_PATH
.
'application'
.
EXT
;
$application
=
new
Application
;
...
...
laravel/resolver.php
0 → 100644
View file @
9da20410
<?php
namespace
Laravel
;
abstract
class
Resolver
{
/**
* Magic Method for resolving classes out of the IoC container.
*
* This allows the derived class to provide access to all of the Laravel libraries
* registered in the container. Currently, this class is derived by the Application
* and Controller classes.
*/
public
function
__get
(
$key
)
{
if
(
IoC
::
container
()
->
registered
(
'laravel.'
.
$key
))
{
return
IoC
::
container
()
->
resolve
(
'laravel.'
.
$key
);
}
elseif
(
IoC
::
container
()
->
registered
(
$key
))
{
return
IoC
::
container
()
->
resolve
(
$key
);
}
throw
new
\Exception
(
"Attempting to access undefined property [
$key
]."
);
}
}
\ No newline at end of file
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