Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
c70f0904
Commit
c70f0904
authored
Aug 02, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added package class.
parent
f2363b11
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
7 deletions
+41
-7
application/config/aliases.php
+1
-0
system/input.php
+0
-7
system/package.php
+40
-0
No files found.
application/config/aliases.php
View file @
c70f0904
...
...
@@ -35,6 +35,7 @@ return array(
'Inflector'
=>
'System\\Inflector'
,
'Input'
=>
'System\\Input'
,
'Lang'
=>
'System\\Lang'
,
'Package'
=>
'System\\Package'
,
'URL'
=>
'System\\URL'
,
'Redirect'
=>
'System\\Redirect'
,
'Request'
=>
'System\\Request'
,
...
...
system/input.php
View file @
c70f0904
...
...
@@ -86,13 +86,6 @@ class Input {
*/
public
static
function
file
(
$key
=
null
,
$default
=
null
)
{
if
(
strpos
(
$key
,
'.'
)
!==
false
)
{
list
(
$file
,
$key
)
=
explode
(
'.'
,
$key
);
return
Arr
::
get
(
$_FILES
[
$file
],
$key
,
$default
);
}
return
Arr
::
get
(
$_FILES
,
$key
,
$default
);
}
...
...
system/package.php
0 → 100644
View file @
c70f0904
<?php
namespace
System
;
class
Package
{
/**
* All of the loaded packages.
*
* @var array
*/
public
static
$loaded
=
array
();
/**
* Load a package or set of packages.
*
* @param string|array $package
* @return void
*/
public
static
function
load
(
$package
)
{
if
(
is_array
(
$package
))
{
foreach
(
$package
as
$value
)
{
static
::
load
(
$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
))
{
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