Skip to content

Commit

Permalink
Deprecate public properties that have accessor methods.
Browse files Browse the repository at this point in the history
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 9ed5925
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Network/Request.php
Expand Up @@ -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
{
Expand All @@ -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,
Expand All @@ -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 = [];

Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down

0 comments on commit 9ed5925

Please sign in to comment.