Skip to content
Permalink
Browse files

Deprecate public properties that have accessor methods.

This is only the beginning of the public property deprecations. More
properties will be deprecated as new accessor methods are introduced.

Refs #9325
  • Loading branch information...
markstory committed Aug 25, 2016
1 parent 477e756 commit 9ed5925dbc604ddd0f4b61aa1c3bd9a23bf9d0ff
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/Network/Request.php
@@ -23,10 +23,6 @@
/**
* A class that helps wrap Request information and particulars about a single request.
* Provides methods commonly used to introspect on the request headers and request body.
*
* Has both an Array and Object interface. You can access framework parameters using indexes:
*
* `$request['controller']` or `$request->controller`.
*/
class Request implements ArrayAccess
{
@@ -35,6 +31,7 @@ class Request implements ArrayAccess
* Array of parameters parsed from the URL.
*
* @var array
* @deprecated 3.4.0 This public property will be removed in 4.0.0. Use param() instead.
*/
public $params = [
'plugin' => null,
@@ -50,20 +47,23 @@ class Request implements ArrayAccess
* data.
*
* @var array
* @deprecated 3.4.0 This public property will be removed in 4.0.0. Use data() instead.
*/
public $data = [];
/**
* Array of querystring arguments
*
* @var array
* @deprecated 3.4.0 This public property will be removed in 4.0.0. Use query() instead.
*/
public $query = [];
/**
* Array of cookie data.
*
* @var array
* @deprecated 3.4.0 This public property will be removed in 4.0.0. Use cookie() instead.
*/
public $cookies = [];
@@ -597,6 +597,8 @@ public function __call($name, $params)
*
* @param string $name The property being accessed.
* @return mixed Either the value of the parameter or null.
* @deprecated 3.4.0 Accessing routing parameters through __get will removed in 4.0.0.
* Use param() instead.
*/
public function __get($name)
{
@@ -613,6 +615,8 @@ public function __get($name)
*
* @param string $name The property being accessed.
* @return bool Existence
* @deprecated 3.4.0 Accessing routing parameters through __isset will removed in 4.0.0.
* Use param() instead.
*/
public function __isset($name)
{

0 comments on commit 9ed5925

Please sign in to comment.
You can’t perform that action at this time.