|
|
@@ -94,7 +94,7 @@ class View implements EventDispatcherInterface
|
|
|
*
|
|
|
* @var \Cake\View\ViewBlock
|
|
|
*/
|
|
|
- public $Blocks;
|
|
|
+ protected $Blocks;
|
|
|
|
|
|
/**
|
|
|
* The name of the plugin.
|
|
|
@@ -1211,6 +1211,15 @@ class View implements EventDispatcherInterface
|
|
|
return $this->{$method}();
|
|
|
}
|
|
|
|
|
|
+ if ($name === 'Blocks') {
|
|
|
+ deprecationWarning(
|
|
|
+ 'View::$Blocks is protected now. ' .
|
|
|
+ 'Use one of the wrapper methods like View::fetch() etc. instead.'
|
|
|
+ );
|
|
|
+
|
|
|
+ return $this->Blocks;
|
|
|
+ }
|
|
|
+
|
|
|
$registry = $this->helpers();
|
|
|
if (isset($registry->{$name})) {
|
|
|
$this->{$name} = $registry->{$name};
|