update v 1.0.7.5
This commit is contained in:
		| @@ -1,158 +1,156 @@ | ||||
| <?php namespace Illuminate\Config; | ||||
| <?php | ||||
|  | ||||
| namespace Illuminate\Config; | ||||
|  | ||||
| use ArrayAccess; | ||||
| use Illuminate\Support\Arr; | ||||
| use Illuminate\Contracts\Config\Repository as ConfigContract; | ||||
|  | ||||
| class Repository implements ArrayAccess, ConfigContract { | ||||
| class Repository implements ArrayAccess, ConfigContract | ||||
| { | ||||
|     /** | ||||
|      * All of the configuration items. | ||||
|      * | ||||
|      * @var array | ||||
|      */ | ||||
|     protected $items = []; | ||||
|  | ||||
| 	/** | ||||
| 	 * All of the configuration items. | ||||
| 	 * | ||||
| 	 * @var array | ||||
| 	 */ | ||||
| 	protected $items = []; | ||||
|     /** | ||||
|      * Create a new configuration repository. | ||||
|      * | ||||
|      * @param  array  $items | ||||
|      * @return void | ||||
|      */ | ||||
|     public function __construct(array $items = []) | ||||
|     { | ||||
|         $this->items = $items; | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Create a new configuration repository. | ||||
| 	 * | ||||
| 	 * @param  array  $items | ||||
| 	 * @return void | ||||
| 	 */ | ||||
| 	public function __construct(array $items = array()) | ||||
| 	{ | ||||
| 		$this->items = $items; | ||||
| 	} | ||||
|     /** | ||||
|      * Determine if the given configuration value exists. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @return bool | ||||
|      */ | ||||
|     public function has($key) | ||||
|     { | ||||
|         return Arr::has($this->items, $key); | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Determine if the given configuration value exists. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @return bool | ||||
| 	 */ | ||||
| 	public function has($key) | ||||
| 	{ | ||||
| 		return array_has($this->items, $key); | ||||
| 	} | ||||
|     /** | ||||
|      * Get the specified configuration value. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @param  mixed   $default | ||||
|      * @return mixed | ||||
|      */ | ||||
|     public function get($key, $default = null) | ||||
|     { | ||||
|         return Arr::get($this->items, $key, $default); | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Get the specified configuration value. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @param  mixed   $default | ||||
| 	 * @return mixed | ||||
| 	 */ | ||||
| 	public function get($key, $default = null) | ||||
| 	{ | ||||
| 		return array_get($this->items, $key, $default); | ||||
| 	} | ||||
|     /** | ||||
|      * Set a given configuration value. | ||||
|      * | ||||
|      * @param  array|string  $key | ||||
|      * @param  mixed   $value | ||||
|      * @return void | ||||
|      */ | ||||
|     public function set($key, $value = null) | ||||
|     { | ||||
|         if (is_array($key)) { | ||||
|             foreach ($key as $innerKey => $innerValue) { | ||||
|                 Arr::set($this->items, $innerKey, $innerValue); | ||||
|             } | ||||
|         } else { | ||||
|             Arr::set($this->items, $key, $value); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Set a given configuration value. | ||||
| 	 * | ||||
| 	 * @param  array|string  $key | ||||
| 	 * @param  mixed   $value | ||||
| 	 * @return void | ||||
| 	 */ | ||||
| 	public function set($key, $value = null) | ||||
| 	{ | ||||
| 		if (is_array($key)) | ||||
| 		{ | ||||
| 			foreach ($key as $innerKey => $innerValue) | ||||
| 			{ | ||||
| 				array_set($this->items, $innerKey, $innerValue); | ||||
| 			} | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			array_set($this->items, $key, $value); | ||||
| 		} | ||||
| 	} | ||||
|     /** | ||||
|      * Prepend a value onto an array configuration value. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @param  mixed  $value | ||||
|      * @return void | ||||
|      */ | ||||
|     public function prepend($key, $value) | ||||
|     { | ||||
|         $array = $this->get($key); | ||||
|  | ||||
| 	/** | ||||
| 	 * Prepend a value onto an array configuration value. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @param  mixed  $value | ||||
| 	 * @return void | ||||
| 	 */ | ||||
| 	public function prepend($key, $value) | ||||
| 	{ | ||||
| 		$array = $this->get($key); | ||||
|         array_unshift($array, $value); | ||||
|  | ||||
| 		array_unshift($array, $value); | ||||
|         $this->set($key, $array); | ||||
|     } | ||||
|  | ||||
| 		$this->set($key, $array); | ||||
| 	} | ||||
|     /** | ||||
|      * Push a value onto an array configuration value. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @param  mixed  $value | ||||
|      * @return void | ||||
|      */ | ||||
|     public function push($key, $value) | ||||
|     { | ||||
|         $array = $this->get($key); | ||||
|  | ||||
| 	/** | ||||
| 	 * Push a value onto an array configuration value. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @param  mixed  $value | ||||
| 	 * @return void | ||||
| 	 */ | ||||
| 	public function push($key, $value) | ||||
| 	{ | ||||
| 		$array = $this->get($key); | ||||
|         $array[] = $value; | ||||
|  | ||||
| 		$array[] = $value; | ||||
|         $this->set($key, $array); | ||||
|     } | ||||
|  | ||||
| 		$this->set($key, $array); | ||||
| 	} | ||||
|     /** | ||||
|      * Get all of the configuration items for the application. | ||||
|      * | ||||
|      * @return array | ||||
|      */ | ||||
|     public function all() | ||||
|     { | ||||
|         return $this->items; | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Get all of the configuration items for the application. | ||||
| 	 * | ||||
| 	 * @return array | ||||
| 	 */ | ||||
| 	public function all() | ||||
| 	{ | ||||
| 		return $this->items; | ||||
| 	} | ||||
|     /** | ||||
|      * Determine if the given configuration option exists. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @return bool | ||||
|      */ | ||||
|     public function offsetExists($key) | ||||
|     { | ||||
|         return $this->has($key); | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Determine if the given configuration option exists. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @return bool | ||||
| 	 */ | ||||
| 	public function offsetExists($key) | ||||
| 	{ | ||||
| 		return $this->has($key); | ||||
| 	} | ||||
|     /** | ||||
|      * Get a configuration option. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @return mixed | ||||
|      */ | ||||
|     public function offsetGet($key) | ||||
|     { | ||||
|         return $this->get($key); | ||||
|     } | ||||
|  | ||||
| 	/** | ||||
| 	 * Get a configuration option. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @return mixed | ||||
| 	 */ | ||||
| 	public function offsetGet($key) | ||||
| 	{ | ||||
| 		return $this->get($key); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Set a configuration option. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @param  mixed  $value | ||||
| 	 * @return void | ||||
| 	 */ | ||||
| 	public function offsetSet($key, $value) | ||||
| 	{ | ||||
| 		$this->set($key, $value); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Unset a configuration option. | ||||
| 	 * | ||||
| 	 * @param  string  $key | ||||
| 	 * @return void | ||||
| 	 */ | ||||
| 	public function offsetUnset($key) | ||||
| 	{ | ||||
| 		$this->set($key, null); | ||||
| 	} | ||||
|     /** | ||||
|      * Set a configuration option. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @param  mixed  $value | ||||
|      * @return void | ||||
|      */ | ||||
|     public function offsetSet($key, $value) | ||||
|     { | ||||
|         $this->set($key, $value); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Unset a configuration option. | ||||
|      * | ||||
|      * @param  string  $key | ||||
|      * @return void | ||||
|      */ | ||||
|     public function offsetUnset($key) | ||||
|     { | ||||
|         $this->set($key, null); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -14,9 +14,10 @@ | ||||
|         } | ||||
|     ], | ||||
|     "require": { | ||||
|         "php": ">=5.4.0", | ||||
|         "illuminate/contracts": "5.0.*", | ||||
|         "illuminate/support": "5.0.*" | ||||
|         "php": ">=5.5.9", | ||||
|         "illuminate/contracts": "5.2.*", | ||||
|         "illuminate/filesystem": "5.2.*", | ||||
|         "illuminate/support": "5.2.*" | ||||
|     }, | ||||
|     "autoload": { | ||||
|         "psr-4": { | ||||
| @@ -25,7 +26,7 @@ | ||||
|     }, | ||||
|     "extra": { | ||||
|         "branch-alias": { | ||||
|             "dev-master": "5.0-dev" | ||||
|             "dev-master": "5.2-dev" | ||||
|         } | ||||
|     }, | ||||
|     "minimum-stability": "dev" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sujit Prasad
					Sujit Prasad