Kohana v3.3.2
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Arr extends Kohana_Arr {}
|
||||
class Arr extends Kohana_Arr {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Config extends Kohana_Config {}
|
||||
class Config extends Kohana_Config {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Config_File extends Kohana_Config_File {}
|
||||
class Config_File extends Kohana_Config_File {}
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
|
||||
class Config_Group extends Kohana_Config_Group {}
|
||||
class Config_Group extends Kohana_Config_Group {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class File extends Kohana_File {}
|
||||
class File extends Kohana_File {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTML extends Kohana_HTML {}
|
||||
class HTML extends Kohana_HTML {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
abstract class HTTP extends Kohana_HTTP {}
|
||||
abstract class HTTP extends Kohana_HTTP {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception extends Kohana_HTTP_Exception {}
|
||||
class HTTP_Exception extends Kohana_HTTP_Exception {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_300 extends Kohana_HTTP_Exception_300 {}
|
||||
class HTTP_Exception_300 extends Kohana_HTTP_Exception_300 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_301 extends Kohana_HTTP_Exception_301 {}
|
||||
class HTTP_Exception_301 extends Kohana_HTTP_Exception_301 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_302 extends Kohana_HTTP_Exception_302 {}
|
||||
class HTTP_Exception_302 extends Kohana_HTTP_Exception_302 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_303 extends Kohana_HTTP_Exception_303 {}
|
||||
class HTTP_Exception_303 extends Kohana_HTTP_Exception_303 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_304 extends Kohana_HTTP_Exception_304 {}
|
||||
class HTTP_Exception_304 extends Kohana_HTTP_Exception_304 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_305 extends Kohana_HTTP_Exception_305 {}
|
||||
class HTTP_Exception_305 extends Kohana_HTTP_Exception_305 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_307 extends Kohana_HTTP_Exception_307 {}
|
||||
class HTTP_Exception_307 extends Kohana_HTTP_Exception_307 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_400 extends Kohana_HTTP_Exception_400 {}
|
||||
class HTTP_Exception_400 extends Kohana_HTTP_Exception_400 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_401 extends Kohana_HTTP_Exception_401 {}
|
||||
class HTTP_Exception_401 extends Kohana_HTTP_Exception_401 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_402 extends Kohana_HTTP_Exception_402 {}
|
||||
class HTTP_Exception_402 extends Kohana_HTTP_Exception_402 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_403 extends Kohana_HTTP_Exception_403 {}
|
||||
class HTTP_Exception_403 extends Kohana_HTTP_Exception_403 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {}
|
||||
class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_405 extends Kohana_HTTP_Exception_405 {}
|
||||
class HTTP_Exception_405 extends Kohana_HTTP_Exception_405 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_406 extends Kohana_HTTP_Exception_406 {}
|
||||
class HTTP_Exception_406 extends Kohana_HTTP_Exception_406 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_407 extends Kohana_HTTP_Exception_407 {}
|
||||
class HTTP_Exception_407 extends Kohana_HTTP_Exception_407 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_408 extends Kohana_HTTP_Exception_408 {}
|
||||
class HTTP_Exception_408 extends Kohana_HTTP_Exception_408 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_409 extends Kohana_HTTP_Exception_409 {}
|
||||
class HTTP_Exception_409 extends Kohana_HTTP_Exception_409 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_410 extends Kohana_HTTP_Exception_410 {}
|
||||
class HTTP_Exception_410 extends Kohana_HTTP_Exception_410 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_411 extends Kohana_HTTP_Exception_411 {}
|
||||
class HTTP_Exception_411 extends Kohana_HTTP_Exception_411 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_412 extends Kohana_HTTP_Exception_412 {}
|
||||
class HTTP_Exception_412 extends Kohana_HTTP_Exception_412 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_413 extends Kohana_HTTP_Exception_413 {}
|
||||
class HTTP_Exception_413 extends Kohana_HTTP_Exception_413 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_414 extends Kohana_HTTP_Exception_414 {}
|
||||
class HTTP_Exception_414 extends Kohana_HTTP_Exception_414 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_415 extends Kohana_HTTP_Exception_415 {}
|
||||
class HTTP_Exception_415 extends Kohana_HTTP_Exception_415 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_416 extends Kohana_HTTP_Exception_416 {}
|
||||
class HTTP_Exception_416 extends Kohana_HTTP_Exception_416 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_417 extends Kohana_HTTP_Exception_417 {}
|
||||
class HTTP_Exception_417 extends Kohana_HTTP_Exception_417 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_500 extends Kohana_HTTP_Exception_500 {}
|
||||
class HTTP_Exception_500 extends Kohana_HTTP_Exception_500 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_501 extends Kohana_HTTP_Exception_501 {}
|
||||
class HTTP_Exception_501 extends Kohana_HTTP_Exception_501 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_502 extends Kohana_HTTP_Exception_502 {}
|
||||
class HTTP_Exception_502 extends Kohana_HTTP_Exception_502 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_503 extends Kohana_HTTP_Exception_503 {}
|
||||
class HTTP_Exception_503 extends Kohana_HTTP_Exception_503 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_504 extends Kohana_HTTP_Exception_504 {}
|
||||
class HTTP_Exception_504 extends Kohana_HTTP_Exception_504 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Exception_505 extends Kohana_HTTP_Exception_505 {}
|
||||
class HTTP_Exception_505 extends Kohana_HTTP_Exception_505 {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
abstract class HTTP_Exception_Expected extends Kohana_HTTP_Exception_Expected {}
|
||||
abstract class HTTP_Exception_Expected extends Kohana_HTTP_Exception_Expected {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
abstract class HTTP_Exception_Redirect extends Kohana_HTTP_Exception_Redirect {}
|
||||
abstract class HTTP_Exception_Redirect extends Kohana_HTTP_Exception_Redirect {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class HTTP_Header extends Kohana_HTTP_Header {}
|
||||
class HTTP_Header extends Kohana_HTTP_Header {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
interface HTTP_Message extends Kohana_HTTP_Message {}
|
||||
interface HTTP_Message extends Kohana_HTTP_Message {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
interface HTTP_Request extends Kohana_HTTP_Request {}
|
||||
interface HTTP_Request extends Kohana_HTTP_Request {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
interface HTTP_Response extends Kohana_HTTP_Response {}
|
||||
interface HTTP_Response extends Kohana_HTTP_Response {}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
|
||||
class Inflector extends Kohana_Inflector {}
|
||||
class Inflector extends Kohana_Inflector {}
|
||||
|
@@ -207,8 +207,13 @@ class Kohana_Arr {
|
||||
$delimiter = Arr::$delimiter;
|
||||
}
|
||||
|
||||
// Split the keys by delimiter
|
||||
$keys = explode($delimiter, $path);
|
||||
// The path has already been separated into keys
|
||||
$keys = $path;
|
||||
if ( ! is_array($path))
|
||||
{
|
||||
// Split the keys by delimiter
|
||||
$keys = explode($delimiter, $path);
|
||||
}
|
||||
|
||||
// Set current $array to inner-most array path
|
||||
while (count($keys) > 1)
|
||||
@@ -283,7 +288,7 @@ class Kohana_Arr {
|
||||
*
|
||||
* // Get the values "username", "password" from $_POST
|
||||
* $auth = Arr::extract($_POST, array('username', 'password'));
|
||||
*
|
||||
*
|
||||
* // Get the value "level1.level2a" from $data
|
||||
* $data = array('level1' => array('level2a' => 'value 1', 'level2b' => 'value 2'));
|
||||
* Arr::extract($data, array('level1.level2a', 'password'));
|
||||
@@ -617,4 +622,4 @@ class Kohana_Arr {
|
||||
return $flat;
|
||||
}
|
||||
|
||||
} // End arr
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* Wrapper for configuration arrays. Multiple configuration readers can be
|
||||
* attached to allow loading configuration from files, database, etc.
|
||||
*
|
||||
* Configuration directives cascade across config sources in the same way that
|
||||
* Configuration directives cascade across config sources in the same way that
|
||||
* files cascade across the filesystem.
|
||||
*
|
||||
* Directives from sources high in the sources list will override ones from those
|
||||
@@ -74,9 +74,9 @@ class Kohana_Config {
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a configuration group. Searches all the config sources, merging all the
|
||||
* directives found into a single config group. Any changes made to the config
|
||||
* in this group will be mirrored across all writable sources.
|
||||
* Load a configuration group. Searches all the config sources, merging all the
|
||||
* directives found into a single config group. Any changes made to the config
|
||||
* in this group will be mirrored across all writable sources.
|
||||
*
|
||||
* $array = $config->load($name);
|
||||
*
|
||||
@@ -146,7 +146,7 @@ class Kohana_Config {
|
||||
|
||||
/**
|
||||
* Copy one configuration group to all of the other writers.
|
||||
*
|
||||
*
|
||||
* $config->copy($name);
|
||||
*
|
||||
* @param string $group configuration group name
|
||||
@@ -181,7 +181,7 @@ class Kohana_Config {
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Copy each value in the config
|
||||
$source->write($group, $key, $value);
|
||||
}
|
||||
@@ -189,4 +189,4 @@ class Kohana_Config {
|
||||
return $this;
|
||||
}
|
||||
|
||||
} // End Kohana_Config
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @copyright (c) 2009-2012 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
class Kohana_Config_File extends Kohana_Config_File_Reader
|
||||
class Kohana_Config_File extends Kohana_Config_File_Reader
|
||||
{
|
||||
// @see Kohana_Config_File_Reader
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
/**
|
||||
* File-based configuration reader. Multiple configuration directories can be
|
||||
* used by attaching multiple instances of this class to [Kohana_Config].
|
||||
@@ -53,4 +53,4 @@ class Kohana_Config_File_Reader implements Kohana_Config_Reader {
|
||||
return $config;
|
||||
}
|
||||
|
||||
} // End Kohana_Config
|
||||
}
|
||||
|
@@ -4,15 +4,15 @@
|
||||
* The group wrapper acts as an interface to all the config directives
|
||||
* gathered from across the system.
|
||||
*
|
||||
* This is the object returned from Kohana_Config::load
|
||||
* This is the object returned from Kohana_Config::load
|
||||
*
|
||||
* Any modifications to configuration items should be done through an instance of this object
|
||||
*
|
||||
* @package Kohana
|
||||
* @category Configuration
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2012-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
class Kohana_Config_Group extends ArrayObject {
|
||||
|
||||
@@ -31,7 +31,7 @@ class Kohana_Config_Group extends ArrayObject {
|
||||
protected $_group_name = '';
|
||||
|
||||
/**
|
||||
* Constructs the group object. Kohana_Config passes the config group
|
||||
* Constructs the group object. Kohana_Config passes the config group
|
||||
* and its config items to the object here.
|
||||
*
|
||||
* @param Kohana_Config $instance "Owning" instance of Kohana_Config
|
||||
@@ -77,7 +77,7 @@ class Kohana_Config_Group extends ArrayObject {
|
||||
{
|
||||
return $this->_group_name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a variable from the configuration or return the default value.
|
||||
*
|
||||
@@ -110,7 +110,7 @@ class Kohana_Config_Group extends ArrayObject {
|
||||
|
||||
/**
|
||||
* Overrides ArrayObject::offsetSet()
|
||||
* This method is called when config is changed via
|
||||
* This method is called when config is changed via
|
||||
*
|
||||
* $config->var = 'asd';
|
||||
*
|
||||
@@ -127,4 +127,5 @@ class Kohana_Config_Group extends ArrayObject {
|
||||
|
||||
return parent::offsetSet($key, $value);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -11,9 +11,9 @@
|
||||
*/
|
||||
interface Kohana_Config_Reader extends Kohana_Config_Source
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Tries to load the specificed configuration group
|
||||
* Tries to load the specified configuration group
|
||||
*
|
||||
* Returns FALSE if group does not exist or an array if it does
|
||||
*
|
||||
@@ -21,5 +21,5 @@ interface Kohana_Config_Reader extends Kohana_Config_Source
|
||||
* @return boolean|array
|
||||
*/
|
||||
public function load($group);
|
||||
|
||||
|
||||
}
|
||||
|
@@ -7,8 +7,8 @@
|
||||
* @package Kohana
|
||||
* @category Configuration
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2012-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
|
||||
interface Kohana_Config_Source {}
|
||||
|
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* Interface for config writers
|
||||
*
|
||||
* Specifies the methods that a config writer must implement
|
||||
*
|
||||
* Specifies the methods that a config writer must implement
|
||||
*
|
||||
* @package Kohana
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2008-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
interface Kohana_Config_Writer extends Kohana_Config_Source
|
||||
{
|
||||
/**
|
||||
* Writes the passed config for $group
|
||||
*
|
||||
* Returns chainable instance on success or throws
|
||||
* Returns chainable instance on success or throws
|
||||
* Kohana_Config_Exception on failure
|
||||
*
|
||||
* @param string $group The config group
|
||||
@@ -24,4 +24,5 @@ interface Kohana_Config_Writer extends Kohana_Config_Source
|
||||
* @return boolean
|
||||
*/
|
||||
public function write($group, $key, $config);
|
||||
|
||||
}
|
||||
|
@@ -51,15 +51,15 @@ abstract class Kohana_Controller {
|
||||
|
||||
/**
|
||||
* Executes the given action and calls the [Controller::before] and [Controller::after] methods.
|
||||
*
|
||||
*
|
||||
* Can also be used to catch exceptions from actions in a single place.
|
||||
*
|
||||
*
|
||||
* 1. Before the controller action is called, the [Controller::before] method
|
||||
* will be called.
|
||||
* 2. Next the controller action will be called.
|
||||
* 3. After the controller action is called, the [Controller::after] method
|
||||
* will be called.
|
||||
*
|
||||
*
|
||||
* @throws HTTP_Exception_404
|
||||
* @return Response
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ abstract class Kohana_Controller {
|
||||
* Automatically executed after the controller action. Can be used to apply
|
||||
* transformation to the response, add extra output, and execute
|
||||
* other custom code.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function after()
|
||||
@@ -124,16 +124,16 @@ abstract class Kohana_Controller {
|
||||
*/
|
||||
public static function redirect($uri = '', $code = 302)
|
||||
{
|
||||
return HTTP::redirect($uri, $code);
|
||||
return HTTP::redirect( (string) $uri, $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the browser cache to see the response needs to be returned,
|
||||
* execution will halt and a 304 Not Modified will be sent if the
|
||||
* browser cache is up to date.
|
||||
*
|
||||
*
|
||||
* $this->check_cache(sha1($content));
|
||||
*
|
||||
*
|
||||
* @param string $etag Resource Etag
|
||||
* @return Response
|
||||
*/
|
||||
@@ -142,4 +142,4 @@ abstract class Kohana_Controller {
|
||||
return HTTP::check_cache($this->request, $this->response, $etag);
|
||||
}
|
||||
|
||||
} // End Controller
|
||||
}
|
||||
|
@@ -47,4 +47,4 @@ abstract class Kohana_Controller_Template extends Controller {
|
||||
parent::after();
|
||||
}
|
||||
|
||||
} // End Controller_Template
|
||||
}
|
||||
|
@@ -124,7 +124,6 @@ class Kohana_Cookie {
|
||||
*
|
||||
* @param string $name cookie name
|
||||
* @return boolean
|
||||
* @uses Cookie::set
|
||||
*/
|
||||
public static function delete($name)
|
||||
{
|
||||
@@ -149,7 +148,7 @@ class Kohana_Cookie {
|
||||
// Require a valid salt
|
||||
if ( ! Cookie::$salt)
|
||||
{
|
||||
throw new Kohana_Exception('A valid cookie salt is required. Please set Cookie::$salt.');
|
||||
throw new Kohana_Exception('A valid cookie salt is required. Please set Cookie::$salt in your bootstrap.php. For more information check the documentation');
|
||||
}
|
||||
|
||||
// Determine the user agent
|
||||
@@ -158,4 +157,4 @@ class Kohana_Cookie {
|
||||
return sha1($agent.$name.$value.Cookie::$salt);
|
||||
}
|
||||
|
||||
} // End cookie
|
||||
}
|
||||
|
@@ -16,8 +16,8 @@
|
||||
class Kohana_Core {
|
||||
|
||||
// Release version and codename
|
||||
const VERSION = '3.3.0';
|
||||
const CODENAME = 'badius';
|
||||
const VERSION = '3.3.1';
|
||||
const CODENAME = 'peregrinus';
|
||||
|
||||
// Common environment type constants for consistency and convenience
|
||||
const PRODUCTION = 10;
|
||||
@@ -383,7 +383,7 @@ class Kohana_Core {
|
||||
|
||||
/**
|
||||
* Reverts the effects of the `register_globals` PHP setting by unsetting
|
||||
* all global varibles except for the default super globals (GPCS, etc),
|
||||
* all global variables except for the default super globals (GPCS, etc),
|
||||
* which is a [potential security hole.][ref-wikibooks]
|
||||
*
|
||||
* This is called automatically by [Kohana::init] if `register_globals` is
|
||||
@@ -521,7 +521,7 @@ class Kohana_Core {
|
||||
/**
|
||||
* Provides auto-loading support of classes that follow Kohana's old class
|
||||
* naming conventions.
|
||||
*
|
||||
*
|
||||
* This is included for compatibility purposes with older modules.
|
||||
*
|
||||
* @param string $class Class name
|
||||
@@ -927,7 +927,7 @@ class Kohana_Core {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a message from a file. Messages are arbitary strings that are stored
|
||||
* Get a message from a file. Messages are arbitrary strings that are stored
|
||||
* in the `messages/` directory and reference by a key. Translation is not
|
||||
* performed on the returned values. See [message files](kohana/files/messages)
|
||||
* for more information.
|
||||
@@ -1037,7 +1037,7 @@ class Kohana_Core {
|
||||
|
||||
/**
|
||||
* Generates a version string based on the variables defined above.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function version()
|
||||
@@ -1045,4 +1045,4 @@ class Kohana_Core {
|
||||
return 'Kohana Framework '.Kohana::VERSION.' ('.Kohana::CODENAME.')';
|
||||
}
|
||||
|
||||
} // End Kohana
|
||||
}
|
||||
|
@@ -600,4 +600,4 @@ class Kohana_Date {
|
||||
return $time->format($timestamp_format);
|
||||
}
|
||||
|
||||
} // End date
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@
|
||||
* @package Kohana
|
||||
* @category Base
|
||||
* @author Kohana Team
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2008-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
class Kohana_Debug {
|
||||
|
||||
|
@@ -210,4 +210,4 @@ class Kohana_Encrypt {
|
||||
return rtrim(mcrypt_decrypt($this->_cipher, $this->_key, $data, $this->_mode, $iv), "\0");
|
||||
}
|
||||
|
||||
} // End Encrypt
|
||||
}
|
||||
|
@@ -182,4 +182,4 @@ class Kohana_Feed {
|
||||
return $feed;
|
||||
}
|
||||
|
||||
} // End Feed
|
||||
}
|
||||
|
@@ -163,16 +163,16 @@ class Kohana_File {
|
||||
// Write files in 8k blocks
|
||||
$block_size = 1024 * 8;
|
||||
|
||||
// Total number of peices
|
||||
$peices = 0;
|
||||
// Total number of pieces
|
||||
$pieces = 0;
|
||||
|
||||
while ( ! feof($file))
|
||||
{
|
||||
// Create another piece
|
||||
$peices += 1;
|
||||
$pieces += 1;
|
||||
|
||||
// Create a new file piece
|
||||
$piece = str_pad($peices, 3, '0', STR_PAD_LEFT);
|
||||
$piece = str_pad($pieces, 3, '0', STR_PAD_LEFT);
|
||||
$piece = fopen($filename.'.'.$piece, 'wb+');
|
||||
|
||||
// Number of bytes read
|
||||
@@ -195,7 +195,7 @@ class Kohana_File {
|
||||
// Close the file
|
||||
fclose($file);
|
||||
|
||||
return $peices;
|
||||
return $pieces;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,7 +214,7 @@ class Kohana_File {
|
||||
// Read files in 8k blocks
|
||||
$block_size = 1024 * 8;
|
||||
|
||||
// Total number of peices
|
||||
// Total number of pieces
|
||||
$pieces = 0;
|
||||
|
||||
while (is_file($piece = $filename.'.'.str_pad($pieces + 1, 3, '0', STR_PAD_LEFT)))
|
||||
@@ -231,11 +231,11 @@ class Kohana_File {
|
||||
fwrite($file, fread($piece, $block_size));
|
||||
}
|
||||
|
||||
// Close the peice
|
||||
// Close the piece
|
||||
fclose($piece);
|
||||
}
|
||||
|
||||
return $pieces;
|
||||
}
|
||||
|
||||
} // End file
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Form helper class. Unless otherwise noted, all generated HTML will be made
|
||||
* safe using the [HTML::chars] method. This prevents against simple XSS
|
||||
* attacks that could otherwise be trigged by inserting HTML characters into
|
||||
* attacks that could otherwise be triggered by inserting HTML characters into
|
||||
* form fields.
|
||||
*
|
||||
* @package Kohana
|
||||
@@ -431,4 +431,4 @@ class Kohana_Form {
|
||||
return '<label'.HTML::attributes($attributes).'>'.$text.'</label>';
|
||||
}
|
||||
|
||||
} // End form
|
||||
}
|
||||
|
@@ -144,4 +144,4 @@ class Kohana_Fragment {
|
||||
Kohana::cache(Fragment::_cache_key($name, $i18n), NULL, -3600);
|
||||
}
|
||||
|
||||
} // End Fragment
|
||||
}
|
||||
|
@@ -342,4 +342,4 @@ class Kohana_HTML {
|
||||
return $compiled;
|
||||
}
|
||||
|
||||
} // End html
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@
|
||||
* @category HTTP
|
||||
* @author Kohana Team
|
||||
* @since 3.1.0
|
||||
* @copyright (c) 2008-2012 Kohana Team
|
||||
* @license http://kohanaphp.com/license
|
||||
* @copyright (c) 2008-2014 Kohana Team
|
||||
* @license http://kohanaframework.org/license
|
||||
*/
|
||||
abstract class Kohana_HTTP {
|
||||
|
||||
@@ -44,7 +44,7 @@ abstract class Kohana_HTTP {
|
||||
* Checks the browser cache to see the response needs to be returned,
|
||||
* execution will halt and a 304 Not Modified will be sent if the
|
||||
* browser cache is up to date.
|
||||
*
|
||||
*
|
||||
* @param Request $request Request
|
||||
* @param Response $response Response
|
||||
* @param string $etag Resource ETag
|
||||
@@ -214,4 +214,5 @@ abstract class Kohana_HTTP {
|
||||
|
||||
return implode('&', $encoded);
|
||||
}
|
||||
} // End Kohana_HTTP
|
||||
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ abstract class Kohana_HTTP_Exception extends Kohana_Exception {
|
||||
|
||||
/**
|
||||
* Creates an HTTP_Exception of the specified type.
|
||||
*
|
||||
*
|
||||
* @param integer $code the http status code
|
||||
* @param string $message status message, custom content to display with error
|
||||
* @param array $variables translation variables
|
||||
@@ -13,7 +13,7 @@ abstract class Kohana_HTTP_Exception extends Kohana_Exception {
|
||||
public static function factory($code, $message = NULL, array $variables = NULL, Exception $previous = NULL)
|
||||
{
|
||||
$class = 'HTTP_Exception_'.$code;
|
||||
|
||||
|
||||
return new $class($message, $variables, $previous);
|
||||
}
|
||||
|
||||
@@ -44,15 +44,15 @@ abstract class Kohana_HTTP_Exception extends Kohana_Exception {
|
||||
|
||||
/**
|
||||
* Store the Request that triggered this exception.
|
||||
*
|
||||
*
|
||||
* @param Request $request Request object that triggered this exception.
|
||||
* @return Response
|
||||
* @return HTTP_Exception
|
||||
*/
|
||||
public function request(Request $request = NULL)
|
||||
{
|
||||
if ($request === NULL)
|
||||
return $this->_request;
|
||||
|
||||
|
||||
$this->_request = $request;
|
||||
|
||||
return $this;
|
||||
@@ -60,7 +60,7 @@ abstract class Kohana_HTTP_Exception extends Kohana_Exception {
|
||||
|
||||
/**
|
||||
* Generate a Response for the current Exception
|
||||
*
|
||||
*
|
||||
* @uses Kohana_Exception::response()
|
||||
* @return Response
|
||||
*/
|
||||
@@ -69,4 +69,4 @@ abstract class Kohana_HTTP_Exception extends Kohana_Exception {
|
||||
return Kohana_Exception::response($this);
|
||||
}
|
||||
|
||||
} // End Kohana_HTTP_Exception
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_300 extends HTTP_Exception_Redirect {
|
||||
*/
|
||||
protected $_code = 300;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_301 extends HTTP_Exception_Redirect {
|
||||
*/
|
||||
protected $_code = 301;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_302 extends HTTP_Exception_Redirect {
|
||||
*/
|
||||
protected $_code = 302;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_303 extends HTTP_Exception_Redirect {
|
||||
*/
|
||||
protected $_code = 303;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -6,5 +6,5 @@ class Kohana_HTTP_Exception_304 extends HTTP_Exception_Expected {
|
||||
* @var integer HTTP 304 Not Modified
|
||||
*/
|
||||
protected $_code = 304;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ class Kohana_HTTP_Exception_305 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Specifies the proxy to replay this request via
|
||||
*
|
||||
*
|
||||
* @param string $location URI of the proxy
|
||||
*/
|
||||
public function location($uri = NULL)
|
||||
@@ -24,7 +24,7 @@ class Kohana_HTTP_Exception_305 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
@@ -38,4 +38,5 @@ class Kohana_HTTP_Exception_305 extends HTTP_Exception_Expected {
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_307 extends HTTP_Exception_Redirect {
|
||||
*/
|
||||
protected $_code = 307;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_400 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 400;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -9,14 +9,14 @@ class Kohana_HTTP_Exception_401 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Specifies the WWW-Authenticate challenge.
|
||||
*
|
||||
*
|
||||
* @param string $challenge WWW-Authenticate challenge (eg `Basic realm="Control Panel"`)
|
||||
*/
|
||||
public function authenticate($challenge = NULL)
|
||||
{
|
||||
if ($challenge === NULL)
|
||||
return $this->headers('www-authenticate');
|
||||
|
||||
|
||||
$this->headers('www-authenticate', $challenge);
|
||||
|
||||
return $this;
|
||||
@@ -24,7 +24,7 @@ class Kohana_HTTP_Exception_401 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
@@ -35,4 +35,5 @@ class Kohana_HTTP_Exception_401 extends HTTP_Exception_Expected {
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_402 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 402;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_403 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 403;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_404 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 404;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ class Kohana_HTTP_Exception_405 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Specifies the list of allowed HTTP methods
|
||||
*
|
||||
*
|
||||
* @param array $methods List of allowed methods
|
||||
*/
|
||||
public function allowed($methods)
|
||||
@@ -26,7 +26,7 @@ class Kohana_HTTP_Exception_405 extends HTTP_Exception_Expected {
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
@@ -38,4 +38,4 @@ class Kohana_HTTP_Exception_405 extends HTTP_Exception_Expected {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_406 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 406;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_407 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 407;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_408 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 408;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_409 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 409;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_410 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 410;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_411 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 411;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_412 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 412;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_413 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 413;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_414 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 414;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_415 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 415;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_416 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 416;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_417 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 417;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_500 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 500;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_501 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 501;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_502 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 502;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_503 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 503;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_504 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 504;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,4 +7,4 @@ class Kohana_HTTP_Exception_505 extends HTTP_Exception {
|
||||
*/
|
||||
protected $_code = 505;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php defined('SYSPATH') OR die('No direct script access.');
|
||||
/**
|
||||
* "Expected" HTTP exception class. Used for all [HTTP_Exception]'s where a standard
|
||||
* Kohana error page should never be shown.
|
||||
*
|
||||
* Kohana error page should never be shown.
|
||||
*
|
||||
* Eg [HTTP_Exception_301], [HTTP_Exception_302] etc
|
||||
*
|
||||
* @package Kohana
|
||||
@@ -39,7 +39,7 @@ abstract class Kohana_HTTP_Exception_Expected extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* Gets and sets headers to the [Response].
|
||||
*
|
||||
*
|
||||
* @see [Response::headers]
|
||||
* @param mixed $key
|
||||
* @param string $value
|
||||
@@ -57,7 +57,7 @@ abstract class Kohana_HTTP_Exception_Expected extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* Validate this exception contains everything needed to continue.
|
||||
*
|
||||
*
|
||||
* @throws Kohana_Exception
|
||||
* @return bool
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ abstract class Kohana_HTTP_Exception_Expected extends HTTP_Exception {
|
||||
|
||||
/**
|
||||
* Generate a Response for the current Exception
|
||||
*
|
||||
*
|
||||
* @uses Kohana_Exception::response()
|
||||
* @return Response
|
||||
*/
|
||||
@@ -79,4 +79,4 @@ abstract class Kohana_HTTP_Exception_Expected extends HTTP_Exception {
|
||||
return $this->_response;
|
||||
}
|
||||
|
||||
} // End Kohana_HTTP_Exception
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user