Browse Source

Add missing property to Controller.

This property was lost in the shuffle but should exist on Controller, as
it is modified by methods like setRequest().
mark_story 11 years ago
parent
commit
98ff98e2b3
1 changed files with 18 additions and 10 deletions
  1. 18 10
      src/Controller/Controller.php

+ 18 - 10
src/Controller/Controller.php

@@ -173,6 +173,24 @@ class Controller implements EventListener {
 	public $viewClass = 'Cake\View\View';
 
 /**
+ * The path to this controllers view templates.
+ * Example `Articles`
+ *
+ * Set automatically using conventions in Controller::__construct().
+ *
+ * @var string
+ */
+	public $viewPath;
+
+/**
+ * The name of the view file to render. The name specified
+ * is the filename in /app/Template/<SubFolder> without the .ctp extension.
+ *
+ * @var string
+ */
+	public $view = null;
+
+/**
  * Instance of the View created during rendering. Won't be set until after
  * Controller::render() is called.
  *
@@ -214,16 +232,6 @@ class Controller implements EventListener {
 	public $methods = array();
 
 /**
- * The path to this controllers view templates.
- * Example `Articles`
- *
- * Set automatically using conventions in Controller::__construct().
- *
- * @var string
- */
-	public $viewPath;
-
-/**
  * Constructor.
  *
  * Sets a number of properties based on conventions if they are empty. To override the