fix function namespacing.
This commit is contained in:
parent
7b22f66a94
commit
16a62193fc
|
@ -1,9 +1,9 @@
|
||||||
<?php namespace Laravel;
|
<?php namespace Laravel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define all of the constants used by the framework. All of the
|
* Define all of the constants used by the framework. All of the core
|
||||||
* core paths will be defined, as well as all of the paths which
|
* paths will be defined, as well as all of the paths which derive
|
||||||
* derive from those core paths.
|
* from these core paths.
|
||||||
*/
|
*/
|
||||||
define('EXT', '.php');
|
define('EXT', '.php');
|
||||||
define('CRLF', chr(13).chr(10));
|
define('CRLF', chr(13).chr(10));
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
define('VIEW_PATH', APP_PATH.'views/');
|
define('VIEW_PATH', APP_PATH.'views/');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the Laravel environment configuration path. This path is
|
* Define the Laravel environment configuration path. This path is used
|
||||||
* used by the configuration class to load configuration options
|
* by the configuration class to load configuration options specific
|
||||||
* specific for the server environment.
|
* for the server environment.
|
||||||
*/
|
*/
|
||||||
$environment = '';
|
$environment = '';
|
||||||
|
|
||||||
|
@ -55,18 +55,18 @@
|
||||||
require SYS_PATH.'autoloader'.EXT;
|
require SYS_PATH.'autoloader'.EXT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a few of the core configuration files that are loaded for
|
* Load a few of the core configuration files that are loaded for every
|
||||||
* every request to the application. It is quicker to load them
|
* request to the application. It is quicker to load them manually each
|
||||||
* manually rather than parse the keys for every request.
|
* request rather than parse the keys for every request.
|
||||||
*/
|
*/
|
||||||
Config::load('application');
|
Config::load('application');
|
||||||
Config::load('container');
|
Config::load('container');
|
||||||
Config::load('session');
|
Config::load('session');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bootstrap the application inversion of control container.
|
* Bootstrap the application inversion of control container. The IoC
|
||||||
* The IoC container is responsible for resolving classes and
|
* container is responsible for resolving classes, and helps keep the
|
||||||
* their dependencies, and helps keep the framework flexible.
|
* framework flexible.
|
||||||
*/
|
*/
|
||||||
IoC::bootstrap();
|
IoC::bootstrap();
|
||||||
|
|
||||||
|
@ -78,15 +78,7 @@
|
||||||
spl_autoload_register(array('Laravel\\Autoloader', 'load'));
|
spl_autoload_register(array('Laravel\\Autoloader', 'load'));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define a few global convenience functions to make our lives
|
* Define a few global convenience functions to make our lives as
|
||||||
* as Laravel PHP developers a little more easy and enjoyable.
|
* Laravel PHP developers a little more easy and enjoyable.
|
||||||
*/
|
*/
|
||||||
function e($value)
|
require 'functions'.EXT;
|
||||||
{
|
|
||||||
return HTML::entities($value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function __($key, $replacements = array(), $language = null)
|
|
||||||
{
|
|
||||||
return Lang::line($key, $replacements, $language);
|
|
||||||
}
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php namespace Laravel;
|
<?php namespace Laravel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define a closure that will return a formatted error message
|
* Define a closure that will return the formatted error message when
|
||||||
* when given an exception. This function will be used by the
|
* when given an exception. This function will be used by all of error
|
||||||
* error handler to create a more readable message.
|
* handlers to create a more readable message.
|
||||||
*/
|
*/
|
||||||
$message = function($e)
|
$message = function($e)
|
||||||
{
|
{
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define a closure that will return a more readable version of
|
* Define a closure that will return a more readable version of the
|
||||||
* the severity of an exception. This function will be used by
|
* severity of an exception. This function will be used by the error
|
||||||
* the error handler when parsing exceptions.
|
* handler when parsing exceptions.
|
||||||
*/
|
*/
|
||||||
$severity = function($e)
|
$severity = function($e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert HTML characters to entities.
|
||||||
|
*
|
||||||
|
* The encoding specified in the application configuration file will be used.
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function e($value)
|
||||||
|
{
|
||||||
|
return HTML::entities($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a language line.
|
||||||
|
*
|
||||||
|
* @param string $key
|
||||||
|
* @param array $replacements
|
||||||
|
* @param string $language
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function __($key, $replacements = array(), $language = null)
|
||||||
|
{
|
||||||
|
return Lang::line($key, $replacements, $language);
|
||||||
|
}
|
Loading…
Reference in New Issue