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
188b0c4f
Commit
188b0c4f
authored
Aug 03, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks to package handling.
parent
dbf43877
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
18 deletions
+12
-18
aliases.php
application/config/aliases.php
+1
-0
index.php
public/index.php
+1
-1
loader.php
system/loader.php
+1
-1
package.php
system/package.php
+9
-16
No files found.
application/config/aliases.php
View file @
188b0c4f
...
...
@@ -35,6 +35,7 @@ return array(
'Inflector'
=>
'System\\Inflector'
,
'Input'
=>
'System\\Input'
,
'Lang'
=>
'System\\Lang'
,
'Loader'
=>
'System\\Loader'
,
'Package'
=>
'System\\Package'
,
'URL'
=>
'System\\URL'
,
'Redirect'
=>
'System\\Redirect'
,
...
...
public/index.php
View file @
188b0c4f
...
...
@@ -145,7 +145,7 @@ require SYS_PATH.'routing/filter'.EXT;
// --------------------------------------------------------------
require
SYS_PATH
.
'package'
.
EXT
;
System\Package
::
load
(
System\Config
::
get
(
'package
s
.autoload'
));
System\Package
::
load
(
System\Config
::
get
(
'package.autoload'
));
// --------------------------------------------------------------
// Register the route filters.
...
...
system/loader.php
View file @
188b0c4f
...
...
@@ -65,7 +65,7 @@ class Loader {
*/
public
static
function
register
(
$path
)
{
static
::
$paths
[]
=
$path
;
static
::
$paths
[]
=
rtrim
(
$path
,
'/'
)
.
'/'
;
}
}
\ No newline at end of file
system/package.php
View file @
188b0c4f
...
...
@@ -12,30 +12,23 @@ class Package {
/**
* Load a package or set of packages.
*
* @param string|array $package
* @param string|array $package
s
* @return void
*/
public
static
function
load
(
$package
)
public
static
function
load
(
$package
s
)
{
if
(
is_array
(
$package
)
)
foreach
((
array
)
$packages
as
$package
)
{
foreach
(
$package
as
$value
)
// Packages may have a bootstrap file, which commonly is used to register auto-loaders
// and perform other initialization needed to use the package. If the package has a
// bootstrapper, we will require it here.
if
(
!
array_key_exists
(
$package
,
static
::
$loaded
)
and
file_exists
(
$path
=
PACKAGE_PATH
.
$package
.
'/bootstrap'
.
EXT
))
{
static
::
load
(
$value
);
require
$path
;
}
return
;
static
::
$loaded
[]
=
$package
;
}
// Packages may have a bootstrap file, which commonly is used to register auto-loaders
// and perform other initialization needed to use the package. If the package has a
// bootstrapper, we will require it here.
if
(
!
array_key_exists
(
$package
,
static
::
$loaded
)
and
file_exists
(
$path
=
PACKAGE_PATH
.
$package
.
'/bootstrap'
.
EXT
))
{
require
$path
;
}
static
::
$loaded
[]
=
$package
;
}
}
\ 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