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
97fcea1e
Commit
97fcea1e
authored
Jan 28, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up paths.
parent
409e9089
Changes
29
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
86 additions
and
81 deletions
+86
-81
bundle.php
application/bundle.php
+4
-4
artisan
artisan
+3
-3
asset.php
laravel/asset.php
+1
-1
autoloader.php
laravel/autoloader.php
+3
-3
blade.php
laravel/blade.php
+1
-1
bundle.php
laravel/bundle.php
+4
-4
cache.php
laravel/cache.php
+2
-2
artisan.php
laravel/cli/artisan.php
+2
-2
bundler.php
laravel/cli/tasks/bundle/bundler.php
+2
-2
github.php
laravel/cli/tasks/bundle/providers/github.php
+1
-1
publisher.php
laravel/cli/tasks/bundle/publisher.php
+2
-2
key.php
laravel/cli/tasks/key.php
+1
-1
migrator.php
laravel/cli/tasks/migrate/migrator.php
+1
-1
manager.php
laravel/cli/tasks/session/manager.php
+3
-3
runner.php
laravel/cli/tasks/test/runner.php
+7
-7
config.php
laravel/config.php
+1
-1
cookie.php
laravel/cookie.php
+1
-1
core.php
laravel/core.php
+5
-5
crypter.php
laravel/crypter.php
+1
-1
sqlite.php
laravel/database/connectors/sqlite.php
+1
-1
file.php
laravel/file.php
+2
-2
helpers.php
laravel/helpers.php
+1
-12
laravel.php
laravel/laravel.php
+1
-1
log.php
laravel/log.php
+1
-1
session.php
laravel/session.php
+1
-1
view.php
laravel/view.php
+1
-1
paths.php
paths.php
+25
-9
phpunit.php
phpunit.php
+6
-6
index.php
public/index.php
+2
-2
No files found.
application/bundle.php
View file @
97fcea1e
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
*/
*/
Autoloader
::
psr
(
array
(
Autoloader
::
psr
(
array
(
$GLOBALS
[
'APP_PATH'
]
.
'models'
,
path
(
'app'
)
.
'models'
,
$GLOBALS
[
'APP_PATH'
]
.
'libraries'
,
path
(
'app'
)
.
'libraries'
,
));
));
/*
/*
...
@@ -37,6 +37,6 @@ Autoloader::psr(array(
...
@@ -37,6 +37,6 @@ Autoloader::psr(array(
*/
*/
Autoloader
::
map
(
array
(
Autoloader
::
map
(
array
(
//'User' =>
$GLOBALS['APP_PATH']
.'models/user.php',
//'User' =>
path('app')
.'models/user.php',
//'Role' =>
$GLOBALS['APP_PATH']
.'models/role.php',
//'Role' =>
path('app')
.'models/role.php',
));
));
\ No newline at end of file
artisan
View file @
97fcea1e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Laravel - A PHP Framework For Web Artisans
* Laravel - A PHP Framework For Web Artisans
*
*
* @package Laravel
* @package Laravel
* @version
2.2.0 (Beta 1)
* @version
3.0.0
* @author Taylor Otwell <taylorotwell@gmail.com>
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
* @link http://laravel.com
*/
*/
...
@@ -16,9 +16,9 @@ require 'paths.php';
...
@@ -16,9 +16,9 @@ require 'paths.php';
// --------------------------------------------------------------
// --------------------------------------------------------------
// Bootstrap the Laravel core.
// Bootstrap the Laravel core.
// --------------------------------------------------------------
// --------------------------------------------------------------
require
$GLOBALS
[
'SYS_PATH'
]
.
'core.php'
;
require
path
(
'sys'
)
.
'core.php'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// Launch the Laravel "Artisan" CLI.
// Launch the Laravel "Artisan" CLI.
// --------------------------------------------------------------
// --------------------------------------------------------------
require
$GLOBALS
[
'SYS_PATH'
]
.
'cli/artisan'
.
EXT
;
require
path
(
'sys'
)
.
'cli/artisan'
.
EXT
;
\ No newline at end of file
\ No newline at end of file
laravel/asset.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
class
Asset
{
class
Asset
{
...
...
laravel/autoloader.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
class
Autoloader
{
class
Autoloader
{
...
@@ -62,7 +62,7 @@ class Autoloader {
...
@@ -62,7 +62,7 @@ class Autoloader {
if
(
$namespace
==
'Laravel'
)
if
(
$namespace
==
'Laravel'
)
{
{
return
static
::
load_psr
(
$class
,
$GLOBALS
[
'BASE_PATH'
]
);
return
static
::
load_psr
(
$class
,
path
(
'base'
)
);
}
}
// If the class namespace is mapped to a directory, we will load the class
// If the class namespace is mapped to a directory, we will load the class
...
@@ -149,7 +149,7 @@ class Autoloader {
...
@@ -149,7 +149,7 @@ class Autoloader {
*
*
* <code>
* <code>
* // Register a class mapping with the Autoloader
* // Register a class mapping with the Autoloader
* Autoloader::map(array('User' =>
$GLOBALS['APP_PATH']
.'models/user.php'));
* Autoloader::map(array('User' =>
path('app')
.'models/user.php'));
* </code>
* </code>
*
*
* @param array $mappings
* @param array $mappings
...
...
laravel/blade.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
class
Blade
{
class
Blade
{
...
...
laravel/bundle.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
class
Bundle
{
class
Bundle
{
...
@@ -51,7 +51,7 @@ class Bundle {
...
@@ -51,7 +51,7 @@ class Bundle {
// We will trim the trailing slash from the location and add it back so
// We will trim the trailing slash from the location and add it back so
// we don't have to worry about the developer adding or not adding it
// we don't have to worry about the developer adding or not adding it
// to the location path for the bundle.
// to the location path for the bundle.
$config
[
'location'
]
=
$GLOBALS
[
'BUNDLE_PATH'
]
.
rtrim
(
$config
[
'location'
],
DS
)
.
DS
;
$config
[
'location'
]
=
path
(
'bundle'
)
.
rtrim
(
$config
[
'location'
],
DS
)
.
DS
;
static
::
$bundles
[
$bundle
]
=
array_merge
(
$defaults
,
$config
);
static
::
$bundles
[
$bundle
]
=
array_merge
(
$defaults
,
$config
);
}
}
...
@@ -173,7 +173,7 @@ class Bundle {
...
@@ -173,7 +173,7 @@ class Bundle {
* // Returns the bundle path for the "admin" bundle
* // Returns the bundle path for the "admin" bundle
* $path = Bundle::path('admin');
* $path = Bundle::path('admin');
*
*
* // Returns the
$GLOBALS['APP_PATH']
constant as the default bundle
* // Returns the
path('app')
constant as the default bundle
* $path = Bundle::path('application');
* $path = Bundle::path('application');
* </code>
* </code>
*
*
...
@@ -182,7 +182,7 @@ class Bundle {
...
@@ -182,7 +182,7 @@ class Bundle {
*/
*/
public
static
function
path
(
$bundle
)
public
static
function
path
(
$bundle
)
{
{
return
(
$bundle
==
DEFAULT_BUNDLE
)
?
$GLOBALS
[
'APP_PATH'
]
:
static
::
$bundles
[
$bundle
][
'location'
];
return
(
$bundle
==
DEFAULT_BUNDLE
)
?
path
(
'app'
)
:
static
::
$bundles
[
$bundle
][
'location'
];
}
}
/**
/**
...
...
laravel/cache.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
class
Cache
{
class
Cache
{
...
@@ -51,7 +51,7 @@ class Cache {
...
@@ -51,7 +51,7 @@ class Cache {
return
new
Cache\Drivers\APC
(
Config
::
get
(
'cache.key'
));
return
new
Cache\Drivers\APC
(
Config
::
get
(
'cache.key'
));
case
'file'
:
case
'file'
:
return
new
Cache\Drivers\File
(
$GLOBALS
[
'STORAGE_PATH'
]
.
'cache'
.
DS
);
return
new
Cache\Drivers\File
(
path
(
'storage'
)
.
'cache'
.
DS
);
case
'memcached'
:
case
'memcached'
:
return
new
Cache\Drivers\Memcached
(
Memcached
::
connection
(),
Config
::
get
(
'cache.key'
));
return
new
Cache\Drivers\Memcached
(
Memcached
::
connection
(),
Config
::
get
(
'cache.key'
));
...
...
laravel/cli/artisan.php
View file @
97fcea1e
<?php
namespace
Laravel\CLI
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel\CLI
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
use
Laravel\Bundle
;
use
Laravel\Bundle
;
use
Laravel\Config
;
use
Laravel\Config
;
...
@@ -44,7 +44,7 @@ if (isset($_SERVER['cli']['db']))
...
@@ -44,7 +44,7 @@ if (isset($_SERVER['cli']['db']))
* us to seamlessly add tasks to the CLI so that the Task class
* us to seamlessly add tasks to the CLI so that the Task class
* doesn't have to worry about how to resolve core tasks.
* doesn't have to worry about how to resolve core tasks.
*/
*/
require
$GLOBALS
[
'SYS_PATH'
]
.
'cli/dependencies'
.
EXT
;
require
path
(
'sys'
)
.
'cli/dependencies'
.
EXT
;
/**
/**
* We will wrap the command execution in a try / catch block and
* We will wrap the command execution in a try / catch block and
...
...
laravel/cli/tasks/bundle/bundler.php
View file @
97fcea1e
<?php
namespace
Laravel\CLI\Tasks\Bundle
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel\CLI\Tasks\Bundle
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
use
Laravel\IoC
;
use
Laravel\IoC
;
use
Laravel\Bundle
;
use
Laravel\Bundle
;
...
@@ -16,7 +16,7 @@ class Bundler extends Task {
...
@@ -16,7 +16,7 @@ class Bundler extends Task {
{
{
foreach
(
$this
->
get
(
$bundles
)
as
$bundle
)
foreach
(
$this
->
get
(
$bundles
)
as
$bundle
)
{
{
if
(
is_dir
(
$GLOBALS
[
'BUNDLE_PATH'
]
.
$bundle
[
'name'
]))
if
(
is_dir
(
path
(
'bundle'
)
.
$bundle
[
'name'
]))
{
{
echo
"Bundle
{
$bundle
[
'name'
]
}
is already installed."
;
echo
"Bundle
{
$bundle
[
'name'
]
}
is already installed."
;
...
...
laravel/cli/tasks/bundle/providers/github.php
View file @
97fcea1e
...
@@ -17,7 +17,7 @@ class Github implements Provider {
...
@@ -17,7 +17,7 @@ class Github implements Provider {
// a location outside of the Git repository, so we don't need
// a location outside of the Git repository, so we don't need
// the full bundle path. We'll just take the basename in case
// the full bundle path. We'll just take the basename in case
// the bundle directory has been renamed.
// the bundle directory has been renamed.
$path
=
basename
(
$GLOBALS
[
'BUNDLE_PATH'
]
)
.
'/'
;
$path
=
basename
(
path
(
'bundle'
)
)
.
'/'
;
passthru
(
'git submodule add '
.
$repository
.
' '
.
$path
.
$bundle
[
'name'
]);
passthru
(
'git submodule add '
.
$repository
.
' '
.
$path
.
$bundle
[
'name'
]);
...
...
laravel/cli/tasks/bundle/publisher.php
View file @
97fcea1e
...
@@ -16,7 +16,7 @@ class Publisher {
...
@@ -16,7 +16,7 @@ class Publisher {
{
{
$path
=
Bundle
::
path
(
$bundle
);
$path
=
Bundle
::
path
(
$bundle
);
$this
->
move
(
$path
.
'public'
,
$GLOBALS
[
'PUBLIC_PATH'
]
.
'bundles'
.
DS
.
$bundle
);
$this
->
move
(
$path
.
'public'
,
path
(
'public'
)
.
'bundles'
.
DS
.
$bundle
);
echo
"Assets published for bundle [
$bundle
]."
.
PHP_EOL
;
echo
"Assets published for bundle [
$bundle
]."
.
PHP_EOL
;
}
}
...
@@ -41,7 +41,7 @@ class Publisher {
...
@@ -41,7 +41,7 @@ class Publisher {
*/
*/
protected
function
to
(
$bundle
)
protected
function
to
(
$bundle
)
{
{
return
$GLOBALS
[
'PUBLIC_PATH'
]
.
'bundles'
.
DS
.
$bundle
.
DS
;
return
path
(
'public'
)
.
'bundles'
.
DS
.
$bundle
.
DS
;
}
}
/**
/**
...
...
laravel/cli/tasks/key.php
View file @
97fcea1e
...
@@ -19,7 +19,7 @@ class Key extends Task {
...
@@ -19,7 +19,7 @@ class Key extends Task {
*/
*/
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
path
=
$GLOBALS
[
'APP_PATH'
]
.
'config/application'
.
EXT
;
$this
->
path
=
path
(
'app'
)
.
'config/application'
.
EXT
;
}
}
/**
/**
...
...
laravel/cli/tasks/migrate/migrator.php
View file @
97fcea1e
...
@@ -222,7 +222,7 @@ class Migrator extends Task {
...
@@ -222,7 +222,7 @@ class Migrator extends Task {
*/
*/
protected
function
stub
(
$bundle
,
$migration
)
protected
function
stub
(
$bundle
,
$migration
)
{
{
$stub
=
File
::
get
(
$GLOBALS
[
'SYS_PATH'
]
.
'cli/tasks/migrate/stub'
.
EXT
);
$stub
=
File
::
get
(
path
(
'sys'
)
.
'cli/tasks/migrate/stub'
.
EXT
);
// The class name is formatted simialrly to tasks and controllers,
// The class name is formatted simialrly to tasks and controllers,
// where the bundle name is prefixed to the class if it is not in
// where the bundle name is prefixed to the class if it is not in
...
...
laravel/cli/tasks/session/manager.php
View file @
97fcea1e
...
@@ -34,7 +34,7 @@ class Manager extends Task {
...
@@ -34,7 +34,7 @@ class Manager extends Task {
// generated on the database.
// generated on the database.
$migration
=
$migrator
->
make
(
array
(
'create_session_table'
));
$migration
=
$migrator
->
make
(
array
(
'create_session_table'
));
$stub
=
$GLOBALS
[
'SYS_PATH'
]
.
'cli/tasks/session/migration'
.
EXT
;
$stub
=
path
(
'sys'
)
.
'cli/tasks/session/migration'
.
EXT
;
File
::
put
(
$migration
,
File
::
get
(
$stub
));
File
::
put
(
$migration
,
File
::
get
(
$stub
));
...
@@ -42,7 +42,7 @@ class Manager extends Task {
...
@@ -42,7 +42,7 @@ class Manager extends Task {
// Since the developer is requesting that the session table be
// Since the developer is requesting that the session table be
// created on the database, we'll set the driver to database
// created on the database, we'll set the driver to database
// to save an extra step for the developer.
// to save an extra step for the developer.
$config
=
File
::
get
(
$GLOBALS
[
'APP_PATH'
]
.
'config/session'
.
EXT
);
$config
=
File
::
get
(
path
(
'app'
)
.
'config/session'
.
EXT
);
$config
=
str_replace
(
$config
=
str_replace
(
"'driver' => '',"
,
"'driver' => '',"
,
...
@@ -50,7 +50,7 @@ class Manager extends Task {
...
@@ -50,7 +50,7 @@ class Manager extends Task {
$config
$config
);
);
File
::
put
(
$GLOBALS
[
'APP_PATH'
]
.
'config/session'
.
EXT
,
$config
);
File
::
put
(
path
(
'app'
)
.
'config/session'
.
EXT
,
$config
);
echo
PHP_EOL
;
echo
PHP_EOL
;
...
...
laravel/cli/tasks/test/runner.php
View file @
97fcea1e
...
@@ -23,7 +23,7 @@ class Runner extends Task {
...
@@ -23,7 +23,7 @@ class Runner extends Task {
*/
*/
public
function
core
()
public
function
core
()
{
{
if
(
!
is_dir
(
$GLOBALS
[
'BUNDLE_PATH'
]
.
'laravel-tests'
))
if
(
!
is_dir
(
path
(
'bundle'
)
.
'laravel-tests'
))
{
{
throw
new
\Exception
(
"The bundle [laravel-tests] has not been installed!"
);
throw
new
\Exception
(
"The bundle [laravel-tests] has not been installed!"
);
}
}
...
@@ -31,9 +31,9 @@ class Runner extends Task {
...
@@ -31,9 +31,9 @@ class Runner extends Task {
// When testing the Laravel core, we will just stub the path directly
// When testing the Laravel core, we will just stub the path directly
// so the test bundle is not required to be registered in the bundle
// so the test bundle is not required to be registered in the bundle
// configuration, as it is kind of a unique bundle.
// configuration, as it is kind of a unique bundle.
$this
->
stub
(
$GLOBALS
[
'BUNDLE_PATH'
]
.
'laravel-tests/cases'
);
$this
->
stub
(
path
(
'bundle'
)
.
'laravel-tests/cases'
);
$path
=
$GLOBALS
[
'BUNDLE_PATH'
]
.
'laravel-tests/'
;
$path
=
path
(
'bundle'
)
.
'laravel-tests/'
;
$this
->
test
();
$this
->
test
();
}
}
...
@@ -76,9 +76,9 @@ class Runner extends Task {
...
@@ -76,9 +76,9 @@ class Runner extends Task {
// We'll simply fire off PHPUnit with the configuration switch
// We'll simply fire off PHPUnit with the configuration switch
// pointing to our temporary configuration file. This allows
// pointing to our temporary configuration file. This allows
// us to flexibly run tests for any setup.
// us to flexibly run tests for any setup.
passthru
(
'phpunit -c '
.
$GLOBALS
[
'BASE_PATH'
]
.
'phpunit.xml'
);
passthru
(
'phpunit -c '
.
path
(
'base'
)
.
'phpunit.xml'
);
@
unlink
(
$GLOBALS
[
'BASE_PATH'
]
.
'phpunit.xml'
);
@
unlink
(
path
(
'base'
)
.
'phpunit.xml'
);
}
}
/**
/**
...
@@ -89,11 +89,11 @@ class Runner extends Task {
...
@@ -89,11 +89,11 @@ class Runner extends Task {
*/
*/
protected
function
stub
(
$directory
)
protected
function
stub
(
$directory
)
{
{
$stub
=
File
::
get
(
$GLOBALS
[
'SYS_PATH'
]
.
'cli/tasks/test/stub.xml'
);
$stub
=
File
::
get
(
path
(
'sys'
)
.
'cli/tasks/test/stub.xml'
);
$stub
=
str_replace
(
'{{directory}}'
,
$directory
,
$stub
);
$stub
=
str_replace
(
'{{directory}}'
,
$directory
,
$stub
);
File
::
put
(
$GLOBALS
[
'BASE_PATH'
]
.
'phpunit.xml'
,
$stub
);
File
::
put
(
path
(
'base'
)
.
'phpunit.xml'
,
$stub
);
}
}
}
}
\ No newline at end of file
laravel/config.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
use
Closure
;
use
Closure
;
...
...
laravel/cookie.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
use
Closure
;
use
Closure
;
...
...
laravel/core.php
View file @
97fcea1e
...
@@ -17,10 +17,10 @@ define('MB_STRING', (int) function_exists('mb_get_info'));
...
@@ -17,10 +17,10 @@ define('MB_STRING', (int) function_exists('mb_get_info'));
* These are typically classes that the auto-loader relies upon to
* These are typically classes that the auto-loader relies upon to
* load classes, such as the array and configuration classes.
* load classes, such as the array and configuration classes.
*/
*/
require
$GLOBALS
[
'SYS_PATH'
]
.
'bundle'
.
EXT
;
require
path
(
'sys'
)
.
'bundle'
.
EXT
;
require
$GLOBALS
[
'SYS_PATH'
]
.
'config'
.
EXT
;
require
path
(
'sys'
)
.
'config'
.
EXT
;
require
$GLOBALS
[
'SYS_PATH'
]
.
'helpers'
.
EXT
;
require
path
(
'sys'
)
.
'helpers'
.
EXT
;
require
$GLOBALS
[
'SYS_PATH'
]
.
'autoloader'
.
EXT
;
require
path
(
'sys'
)
.
'autoloader'
.
EXT
;
/**
/**
* Register the Autoloader's "load" method on the auto-loader stack.
* Register the Autoloader's "load" method on the auto-loader stack.
...
@@ -42,7 +42,7 @@ Autoloader::$aliases = Config::get('application.aliases');
...
@@ -42,7 +42,7 @@ Autoloader::$aliases = Config::get('application.aliases');
* file within the bundles directory. This informs the framework
* file within the bundles directory. This informs the framework
* where the bundle lives and which URIs it responds to.
* where the bundle lives and which URIs it responds to.
*/
*/
$bundles
=
require
$GLOBALS
[
'BUNDLE_PATH'
]
.
'bundles'
.
EXT
;
$bundles
=
require
path
(
'bundle'
)
.
'bundles'
.
EXT
;
foreach
(
$bundles
as
$bundle
=>
$value
)
foreach
(
$bundles
as
$bundle
=>
$value
)
{
{
...
...
laravel/crypter.php
View file @
97fcea1e
<?php
namespace
Laravel
;
isset
(
$GLOBALS
[
'APP_PATH'
]
)
or
die
(
'No direct script access.'
);
<?php
namespace
Laravel
;
defined
(
'DS'
)
or
die
(
'No direct script access.'
);
if
(
trim
(
Config
::
get
(
'application.key'
))
===
''
)
if
(
trim
(
Config
::
get
(
'application.key'
))
===
''
)
{
{
...
...
laravel/database/connectors/sqlite.php
View file @
97fcea1e
...
@@ -24,7 +24,7 @@ class SQLite extends Connector {
...
@@ -24,7 +24,7 @@ class SQLite extends Connector {
// SQLite databases will be created automatically if they do not exist, so we
// SQLite databases will be created automatically if they do not exist, so we
// will not check for the existence of the database file before establishing
// will not check for the existence of the database file before establishing
// the PDO connection to the database.
// the PDO connection to the database.
$path
=
$GLOBALS
[
'STORAGE_PATH'
]
.
'database'
.
DS
.
$config
[
'database'
]
.
'.sqlite'
;
$path
=
path
(
'storage'
)
.
'database'
.
DS
.
$config
[
'database'
]
.
'.sqlite'
;
return
new
PDO
(
'sqlite:'
.
$path
,
null
,
null
,
$options
);
return
new
PDO
(
'sqlite:'
.
$path
,
null
,
null
,
$options
);
}
}
...
...
laravel/file.php
View file @
97fcea1e
...
@@ -18,10 +18,10 @@ class File {
...
@@ -18,10 +18,10 @@ class File {
*
*
* <code>
* <code>
* // Get the contents of a file
* // Get the contents of a file
* $contents = File::get(
$GLOBALS['APP_PATH']
.'routes'.EXT);
* $contents = File::get(
path('app')
.'routes'.EXT);
*
*
* // Get the contents of a file or return a default value if it doesn't exist
* // Get the contents of a file or return a default value if it doesn't exist
* $contents = File::get(
$GLOBALS['APP_PATH']
.'routes'.EXT, 'Default Value');
* $contents = File::get(
path('app')
.'routes'.EXT, 'Default Value');
* </code>
* </code>
*
*
* @param string $path
* @param string $path
...
...
laravel/helpers.php
View file @
97fcea1e
<?php
<?php
/**
* Get one of the global paths.
*
* @param string $path
* @return string
*/
function
path
(
$path
)
{
return
$GLOBALS
[
strtoupper
(
$path
)
.
'_PATH'
];
}
/**
/**
* Convert HTML characters to entities.
* Convert HTML characters to entities.
*
*
...
@@ -37,7 +26,7 @@ function __($key, $replacements = array(), $language = null)
...
@@ -37,7 +26,7 @@ function __($key, $replacements = array(), $language = null)
return
Laravel\Lang
::
line
(
$key
,
$replacements
,
$language
);
return
Laravel\Lang
::
line
(
$key
,
$replacements
,
$language
);
}
}
/**
/**
a
* Get an item from an array using "dot" notation.
* Get an item from an array using "dot" notation.
*
*
* <code>
* <code>
...
...
laravel/laravel.php
View file @
97fcea1e
...
@@ -12,8 +12,8 @@ require 'core.php';
...
@@ -12,8 +12,8 @@ require 'core.php';
* default timezone used by all date / timezone functions throughout
* default timezone used by all date / timezone functions throughout
* the entire application.
* the entire application.
*/
*/
date_default_timezone_set
(
Config
::
get
(
'application.timezone'
));
date_default_timezone_set
(
Config
::
get
(
'application.timezone'
));
/**
/**
* Register the PHP exception handler. The framework throws exceptions
* Register the PHP exception handler. The framework throws exceptions
* on every error that cannot be handled. All of those exceptions will
* on every error that cannot be handled. All of those exceptions will
...
...
laravel/log.php
View file @
97fcea1e
...
@@ -43,7 +43,7 @@ class Log {
...
@@ -43,7 +43,7 @@ class Log {
{
{
$message
=
date
(
'Y-m-d H:i:s'
)
.
' '
.
Str
::
upper
(
$type
)
.
" -
{
$message
}
"
.
PHP_EOL
;
$message
=
date
(
'Y-m-d H:i:s'
)
.
' '
.
Str
::
upper
(
$type
)
.
" -
{
$message
}
"
.
PHP_EOL
;
File
::
append
(
$GLOBALS
[
'STORAGE_PATH'
]
.
'logs/'
.
date
(
'Y-m-d'
)
.
'.log'
,
$message
);
File
::
append
(
path
(
'storage'
)
.
'logs/'
.
date
(
'Y-m-d'
)
.
'.log'
,
$message
);
}
}
/**
/**
...
...
laravel/session.php
View file @
97fcea1e
...
@@ -52,7 +52,7 @@ class Session {
...
@@ -52,7 +52,7 @@ class Session {
return
new
Session\Drivers\Database
(
Database
::
connection
());
return
new
Session\Drivers\Database
(
Database
::
connection
());
case
'file'
:
case
'file'
:
return
new
Session\Drivers\File
(
$GLOBALS
[
'STORAGE_PATH'
]
.
'sessions'
.
DS
);
return
new
Session\Drivers\File
(
path
(
'storage'
)
.
'sessions'
.
DS
);
case
'memcached'
:
case
'memcached'
:
return
new
Session\Drivers\Memcached
(
Cache
::
driver
(
'memcached'
));
return
new
Session\Drivers\Memcached
(
Cache
::
driver
(
'memcached'
));
...
...
laravel/view.php
View file @
97fcea1e
...
@@ -261,7 +261,7 @@ class View implements ArrayAccess {
...
@@ -261,7 +261,7 @@ class View implements ArrayAccess {
// hash of their path. This allows us to easily store the views in
// hash of their path. This allows us to easily store the views in
// the directory without worrying about re-creating the entire
// the directory without worrying about re-creating the entire
// application view directory structure.
// application view directory structure.
$compiled
=
$GLOBALS
[
'STORAGE_PATH'
]
.
'views/'
.
md5
(
$this
->
path
);
$compiled
=
path
(
'storage'
)
.
'views/'
.
md5
(
$this
->
path
);
// The view will only be re-compiled if the view has been modified
// The view will only be re-compiled if the view has been modified
// since the last compiled version of the view was created or no
// since the last compiled version of the view was created or no
...
...
paths.php
View file @
97fcea1e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Laravel - A PHP Framework For Web Artisans
* Laravel - A PHP Framework For Web Artisans
*
*
* @package Laravel
* @package Laravel
* @version
2.2.0 (Beta 1)
* @version
3.0.0
* @author Taylor Otwell <taylorotwell@gmail.com>
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
* @link http://laravel.com
*/
*/
...
@@ -24,38 +24,38 @@ if ( ! defined('DS'))
...
@@ -24,38 +24,38 @@ if ( ! defined('DS'))
// --------------------------------------------------------------
// --------------------------------------------------------------
// Define the path to the base directory.
// Define the path to the base directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$GLOBALS
[
'
BASE_PATH
'
]
=
__DIR__
.
DS
;
$GLOBALS
[
'
laravel_paths'
][
'base
'
]
=
__DIR__
.
DS
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the application directory.
// The path to the application directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$paths
[
'
APP_PATH
'
]
=
'application'
;
$paths
[
'
app
'
]
=
'application'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the Laravel directory.
// The path to the Laravel directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$paths
[
'
SYS_PATH
'
]
=
'laravel'
;
$paths
[
'
sys
'
]
=
'laravel'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the bundles directory.
// The path to the bundles directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$paths
[
'
BUNDLE_PATH
'
]
=
'bundles'
;
$paths
[
'
bundle
'
]
=
'bundles'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the storage directory.
// The path to the storage directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
$paths
[
'
STORAGE_PATH
'
]
=
'storage'
;
$paths
[
'
storage
'
]
=
'storage'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// The path to the public directory.
// The path to the public directory.
// --------------------------------------------------------------
// --------------------------------------------------------------
if
(
$web
)
if
(
$web
)
{
{
$GLOBALS
[
'
PUBLIC_PATH
'
]
=
realpath
(
''
)
.
DS
;
$GLOBALS
[
'
laravel_paths'
][
'public
'
]
=
realpath
(
''
)
.
DS
;
}
}
else
else
{
{
$paths
[
'
PUBLIC
'
]
=
'public'
;
$paths
[
'
public
'
]
=
'public'
;
}
}
// --------------------------------------------------------------
// --------------------------------------------------------------
...
@@ -65,5 +65,21 @@ foreach ($paths as $name => $path)
...
@@ -65,5 +65,21 @@ foreach ($paths as $name => $path)
{
{
if
(
$web
)
$path
=
"../
{
$path
}
"
;
if
(
$web
)
$path
=
"../
{
$path
}
"
;
$GLOBALS
[
$name
]
=
realpath
(
$path
)
.
DS
;
$GLOBALS
[
'laravel_paths'
][
$name
]
=
realpath
(
$path
)
.
DS
;
}
// --------------------------------------------------------------
// Define a global path helper function.
// --------------------------------------------------------------
function
path
(
$path
)
{
return
$GLOBALS
[
'laravel_paths'
][
$path
];
}
// --------------------------------------------------------------
// Define a global path setter function.
// --------------------------------------------------------------
function
set_path
(
$path
,
$value
)
{
$GLOBALS
[
'laravel_paths'
][
$path
]
=
$value
;
}
}
\ No newline at end of file
phpunit.php
View file @
97fcea1e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Laravel - A PHP Framework For Web Artisans
* Laravel - A PHP Framework For Web Artisans
*
*
* @package Laravel
* @package Laravel
* @version
2.2.0 (Beta 1)
* @version
3.0.0
* @author Taylor Otwell <taylorotwell@gmail.com>
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
* @link http://laravel.com
*/
*/
...
@@ -25,19 +25,19 @@ $config = file_get_contents('phpunit.xml');
...
@@ -25,19 +25,19 @@ $config = file_get_contents('phpunit.xml');
if
(
strpos
(
$config
,
'laravel-tests'
)
!==
false
)
if
(
strpos
(
$config
,
'laravel-tests'
)
!==
false
)
{
{
$path
=
$GLOBALS
[
'BUNDLE_PATH'
]
.
'laravel-tests'
.
DS
;
$path
=
path
(
'bundle'
)
.
'laravel-tests'
.
DS
;
$GLOBALS
[
'APP_PATH'
]
=
$path
.
'application'
.
DS
;
set_path
(
'app'
,
$path
.
'application'
.
DS
)
;
$GLOBALS
[
'BUNDLE_PATH'
]
=
$path
.
'bundles'
.
DS
;
set_path
(
'bundle'
,
$path
.
'bundles'
.
DS
)
;
$GLOBALS
[
'STORAGE_PATH'
]
=
$path
.
'storage'
.
DS
;
set_path
(
'storage'
,
$path
.
'storage'
.
DS
)
;
}
}
// --------------------------------------------------------------
// --------------------------------------------------------------
// Bootstrap the Laravel core.
// Bootstrap the Laravel core.
// --------------------------------------------------------------
// --------------------------------------------------------------
require
$GLOBALS
[
'SYS_PATH'
]
.
'core.php'
;
require
path
(
'sys'
)
.
'core.php'
;
// --------------------------------------------------------------
// --------------------------------------------------------------
// Start the default bundle.
// Start the default bundle.
...
...
public/index.php
View file @
97fcea1e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Laravel - A PHP Framework For Web Artisans
* Laravel - A PHP Framework For Web Artisans
*
*
* @package Laravel
* @package Laravel
* @version 3.0.0
(Beta 2)
* @version 3.0.0
* @author Taylor Otwell <taylorotwell@gmail.com>
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
* @link http://laravel.com
*/
*/
...
@@ -31,4 +31,4 @@ unset($web);
...
@@ -31,4 +31,4 @@ unset($web);
// --------------------------------------------------------------
// --------------------------------------------------------------
// Launch Laravel.
// Launch Laravel.
// --------------------------------------------------------------
// --------------------------------------------------------------
require
$GLOBALS
[
'SYS_PATH'
]
.
'laravel.php'
;
require
path
(
'sys'
)
.
'laravel.php'
;
\ No newline at end of file
\ 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