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
5c666584
Commit
5c666584
authored
Feb 20, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove bundle guessing in autoloader in preference of explicit config.
parent
16dca5e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
22 deletions
+3
-22
autoloader.php
laravel/autoloader.php
+3
-22
No files found.
laravel/autoloader.php
View file @
5c666584
...
@@ -42,7 +42,7 @@ class Autoloader {
...
@@ -42,7 +42,7 @@ class Autoloader {
{
{
// First, we will check to see if the class has been aliased. If it has,
// First, we will check to see if the class has been aliased. If it has,
// we will register the alias, which may cause the auto-loader to be
// we will register the alias, which may cause the auto-loader to be
// called again for the "real" class name.
// called again for the "real" class name
to load its file
.
if
(
isset
(
static
::
$aliases
[
$class
]))
if
(
isset
(
static
::
$aliases
[
$class
]))
{
{
class_alias
(
static
::
$aliases
[
$class
],
$class
);
class_alias
(
static
::
$aliases
[
$class
],
$class
);
...
@@ -57,9 +57,8 @@ class Autoloader {
...
@@ -57,9 +57,8 @@ class Autoloader {
}
}
// If the class namespace is mapped to a directory, we will load the
// If the class namespace is mapped to a directory, we will load the
// class using the PSR-0 standards from that directory; however, we
// class using the PSR-0 standards from that directory accounting
// will trim off the beginning of the namespace to account for
// for the root of the namespace by trimming it.
// the root of the mapped directory.
if
(
!
is_null
(
$info
=
static
::
namespaced
(
$class
)))
if
(
!
is_null
(
$info
=
static
::
namespaced
(
$class
)))
{
{
$class
=
substr
(
$class
,
strlen
(
$info
[
'namespace'
]));
$class
=
substr
(
$class
,
strlen
(
$info
[
'namespace'
]));
...
@@ -67,24 +66,6 @@ class Autoloader {
...
@@ -67,24 +66,6 @@ class Autoloader {
return
static
::
load_psr
(
$class
,
$info
[
'directory'
]);
return
static
::
load_psr
(
$class
,
$info
[
'directory'
]);
}
}
// If the class is namespaced and a bundle exists that is assigned
// a name matching that namespace, we'll start the bundle and let
// the class fall through the method again.
if
(
!
is_null
(
$namespace
=
root_namespace
(
$class
)))
{
$namespace
=
strtolower
(
$namespace
);
if
(
Bundle
::
exists
(
$namespace
)
and
!
Bundle
::
started
(
$namespace
))
{
Bundle
::
start
(
$namespace
);
return
static
::
load
(
$class
);
}
}
// If the class is not maped and is not part of a bundle or a mapped
// namespace, we'll make a last ditch effort to load the class via
// the PSR-0 from one of the registered directories.
static
::
load_psr
(
$class
);
static
::
load_psr
(
$class
);
}
}
...
...
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