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
83d927c4
Commit
83d927c4
authored
Nov 02, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring.
parent
c3c0fbce
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
52 additions
and
40 deletions
+52
-40
application.php
application/config/application.php
+1
-1
filters.php
application/filters.php
+1
-1
autoloader.php
laravel/autoloader.php
+17
-13
constants.php
laravel/bootstrap/constants.php
+11
-2
core.php
laravel/bootstrap/core.php
+0
-2
facades.php
laravel/facades.php
+1
-2
input.php
laravel/input.php
+10
-0
paginator.php
laravel/paginator.php
+5
-5
redis.php
laravel/redis.php
+2
-0
router.php
laravel/routing/router.php
+1
-2
crypter.php
laravel/security/crypter.php
+3
-12
No files found.
application/config/application.php
View file @
83d927c4
...
...
@@ -83,7 +83,7 @@ return array(
|
*/
'
packag
es'
=>
array
(),
'
librari
es'
=>
array
(),
/*
|--------------------------------------------------------------------------
...
...
application/filters.php
View file @
83d927c4
...
...
@@ -52,7 +52,7 @@ return array(
{
if
(
Config
::
get
(
'session.driver'
)
!==
''
)
{
Session
::
flash
(
Input
::
old_input
,
Input
::
get
()
);
Input
::
flash
(
);
}
},
...
...
laravel/autoloader.php
View file @
83d927c4
...
...
@@ -19,14 +19,20 @@ class Autoloader {
/**
* Load the file corresponding to a given class.
*
* Laravel loads classes out of three directorys: the core "laravel" directory,
* and the application "models" and "libraires" directories. All of the file
* names are lower cased and the directory structure corresponds with the
* class namespaces.
*
* The application "libraries" directory also supports the inclusion of PSR-0
* compliant libraries. These libraries will be detected automatically and
* will be loaded according to the PSR-0 naming conventions.
*
* @param string $class
* @return void
*/
public
static
function
load
(
$class
)
{
// Most of the core classes are aliases for convenient access in spite of
// the namespace. If an alias is defined for the class, we will load the
// alias and bail out of the auto-load method.
if
(
array_key_exists
(
$class
,
Config
::
$items
[
'application'
][
'aliases'
]))
{
return
class_alias
(
Config
::
$items
[
'application'
][
'aliases'
][
$class
],
$class
);
...
...
@@ -39,7 +45,7 @@ class Autoloader {
}
/**
*
Find the file
associated with a given class name.
*
Determine the file path
associated with a given class name.
*
* @param string $class
* @return string
...
...
@@ -50,13 +56,11 @@ class Autoloader {
$namespace
=
substr
(
$class
,
0
,
strpos
(
$class
,
'\\'
));
// If the class namespace exists in the libraries array, it means that the
// library is PSR-0 compliant, and we will load it following those standards.
// This allows us to add many third-party libraries to an application and be
// able to auto-load them automatically.
// If the namespace has been detected as a PSR-0 compliant library,
// we will load the library according to those naming conventions.
if
(
array_key_exists
(
$namespace
,
static
::
$libraries
))
{
return
LIBRARY_PATH
.
str_replace
(
'_'
,
'/'
,
$file
)
;
return
str_replace
(
'_'
,
'/'
,
$file
)
.
EXT
;
}
foreach
(
static
::
$paths
as
$path
)
...
...
@@ -67,10 +71,10 @@ class Autoloader {
}
}
// If the file exists a
s-is in the libraries directory, we will assume the
//
library is PSR-0 compliant, and will add the namespace to the array of
//
libraries and load the class accordingly
.
if
(
file_exists
(
$path
=
LIBRARY_PATH
.
str_replace
(
'_'
,
'/'
,
$file
)
))
// If the file exists a
ccording to the PSR-0 naming conventions,
//
we will add the namespace to the array of libraries and load
//
the class according to the PSR-0 conventions
.
if
(
file_exists
(
$path
=
str_replace
(
'_'
,
'/'
,
$file
)
.
EXT
))
{
static
::
$libraries
[]
=
$namespace
;
...
...
laravel/bootstrap/constants.php
View file @
83d927c4
<?php
define
(
'EXT'
,
'.php'
);
define
(
'BLADE_EXT'
,
'.blade.php'
);
define
(
'CRLF'
,
chr
(
13
)
.
chr
(
10
));
define
(
'EXT'
,
'.php'
);
function
constants
(
$constants
)
{
...
...
@@ -12,6 +11,11 @@ function constants($constants)
}
}
/**
* Register the core framework paths and all of the paths that
* derive from them. If any constant has already been defined,
* we will not attempt to define it again.
*/
$constants
=
array
(
'APP_PATH'
=>
realpath
(
$application
)
.
'/'
,
'BASE_PATH'
=>
realpath
(
"
$laravel
/.."
)
.
'/'
,
...
...
@@ -42,6 +46,11 @@ $constants = array(
constants
(
$constants
);
/**
* Register the core framework paths and all of the paths that
* derive from them. If any constant has already been defined,
* we will not attempt to define it again.
*/
$environment
=
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]))
?
CONFIG_PATH
.
$_SERVER
[
'LARAVEL_ENV'
]
.
'/'
:
''
;
constants
(
array
(
'ENV_CONFIG_PATH'
=>
$environment
));
...
...
laravel/bootstrap/core.php
View file @
83d927c4
...
...
@@ -14,8 +14,6 @@ Config::load('session');
IoC
::
bootstrap
();
$loader
=
new
Autoloader
;
spl_autoload_register
(
array
(
'Laravel\\Autoloader'
,
'load'
));
function
e
(
$value
)
...
...
laravel/facades.php
View file @
83d927c4
...
...
@@ -59,5 +59,4 @@ abstract class Facade {
}
class
Autoloader
extends
Facade
{
public
static
$resolve
=
'laravel.autoloader'
;
}
class
Session
extends
Facade
{
public
static
$resolve
=
'laravel.session'
;
}
\ No newline at end of file
class
Session
extends
Facade
{
public
static
$resolve
=
'laravel.session'
;
}
\ No newline at end of file
laravel/input.php
View file @
83d927c4
...
...
@@ -74,6 +74,16 @@ class Input {
return
(
!
is_null
(
static
::
old
(
$key
))
and
trim
((
string
)
static
::
old
(
$key
))
!==
''
);
}
/**
* Flash the input for the current request to the session.
*
* @return void
*/
public
static
function
flash
()
{
IoC
::
container
()
->
core
(
'session'
)
->
flash
(
Input
::
old_input
,
static
::
get
());
}
/**
* Get input data from the previous request.
*
...
...
laravel/paginator.php
View file @
83d927c4
...
...
@@ -145,7 +145,7 @@ class Paginator {
* @param string $text
* @return string
*/
p
rotected
function
status
(
$text
)
p
ublic
function
status
(
$text
)
{
return
str_replace
(
array
(
':current'
,
':last'
),
array
(
$this
->
page
,
$this
->
last
),
$text
);
}
...
...
@@ -156,7 +156,7 @@ class Paginator {
* @param string $text
* @return string
*/
p
rotected
function
first
(
$text
)
p
ublic
function
first
(
$text
)
{
return
$this
->
backwards
(
__FUNCTION__
,
$text
,
1
);
}
...
...
@@ -167,7 +167,7 @@ class Paginator {
* @param string $text
* @return string
*/
p
rotected
function
previous
(
$text
)
p
ublic
function
previous
(
$text
)
{
return
$this
->
backwards
(
__FUNCTION__
,
$text
,
$this
->
page
-
1
);
}
...
...
@@ -178,7 +178,7 @@ class Paginator {
* @param string $text
* @return string
*/
p
rotected
function
next
(
$text
)
p
ublic
function
next
(
$text
)
{
return
$this
->
forwards
(
__FUNCTION__
,
$text
,
$this
->
page
+
1
);
}
...
...
@@ -189,7 +189,7 @@ class Paginator {
* @param string $text
* @return string
*/
p
rotected
function
last
(
$text
)
p
ublic
function
last
(
$text
)
{
return
$this
->
forwards
(
__FUNCTION__
,
$text
,
$this
->
last
);
}
...
...
laravel/redis.php
View file @
83d927c4
<?php
namespace
Laravel
;
define
(
'CRLF'
,
chr
(
13
)
.
chr
(
10
));
class
Redis
{
/**
...
...
laravel/routing/router.php
View file @
83d927c4
...
...
@@ -194,8 +194,7 @@ class Router {
}
/**
* Search the controllers for the application and determine if an applicable
* controller exists for the current request to the application.
* Search for a controller that can handle the current request.
*
* If a controller is found, the array key for the controller name in the URI
* segments will be returned by the method, otherwise NULL will be returned.
...
...
laravel/security/crypter.php
View file @
83d927c4
...
...
@@ -65,20 +65,11 @@ class Crypter {
throw
new
\Exception
(
'Decryption error. Input value is not valid base64 data.'
);
}
list
(
$iv
,
$value
)
=
static
::
parse
(
$value
);
$iv
=
substr
(
$value
,
0
,
static
::
iv_size
()
);
return
rtrim
(
mcrypt_decrypt
(
static
::
$cipher
,
static
::
key
(),
$value
,
static
::
$mode
,
$iv
),
"
\0
"
);
}
$value
=
substr
(
$value
,
static
::
iv_size
());
/**
* Parse an encrypted string into its input vector and value segments.
*
* @param string $value
* @return array
*/
protected
static
function
parse
(
$value
)
{
return
array
(
substr
(
$value
,
0
,
static
::
iv_size
()),
substr
(
$value
,
static
::
iv_size
()));
return
rtrim
(
mcrypt_decrypt
(
static
::
$cipher
,
static
::
key
(),
$value
,
static
::
$mode
,
$iv
),
"
\0
"
);
}
/**
...
...
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