Skip to content

Commit bd113e6

Browse files
committed
Update docblock to use term "template" where applicable.
1 parent 06373d3 commit bd113e6

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/View/View.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
* in from the controller to render the results of the controller action. Often this is HTML,
3838
* but can also take the form of JSON, XML, PDF's or streaming files.
3939
*
40-
* CakePHP uses a two-step-view pattern. This means that the view content is rendered first,
41-
* and then inserted into the selected layout. This also means you can pass data from the view to the
40+
* CakePHP uses a two-step-view pattern. This means that the template content is rendered first,
41+
* and then inserted into the selected layout. This also means you can pass data from the template to the
4242
* layout using `$this->set()`
4343
*
4444
* View class supports using plugins as themes. You can set
@@ -126,7 +126,7 @@ class View implements EventDispatcherInterface
126126
public $template = null;
127127

128128
/**
129-
* The name of the layout file to render the view inside of. The name specified
129+
* The name of the layout file to render the template inside of. The name specified
130130
* is the filename of the layout in /app/Template/Layout without the .ctp
131131
* extension.
132132
*
@@ -143,7 +143,7 @@ class View implements EventDispatcherInterface
143143

144144
/**
145145
* Turns on or off CakePHP's conventional mode of applying layout files. On by default.
146-
* Setting to off means that layouts will not be automatically applied to rendered views.
146+
* Setting to off means that layouts will not be automatically applied to rendered templates.
147147
*
148148
* @var bool
149149
*/
@@ -157,7 +157,7 @@ class View implements EventDispatcherInterface
157157
protected $_ext = '.ctp';
158158

159159
/**
160-
* Sub-directory for this view file. This is often used for extension based routing.
160+
* Sub-directory for this template file. This is often used for extension based routing.
161161
* Eg. With an `xml` extension, $subDir would be `xml/`
162162
*
163163
* @var string
@@ -377,7 +377,7 @@ public function layoutPath($path = null)
377377
/**
378378
* Turns on or off CakePHP's conventional mode of applying layout files.
379379
* On by default. Setting to off means that layouts will not be
380-
* automatically applied to rendered views.
380+
* automatically applied to rendered templates.
381381
*
382382
* @param bool $autoLayout Boolean to turn on/off. If null returns current value.
383383
* @return bool|void
@@ -423,7 +423,7 @@ public function template($name = null)
423423
}
424424

425425
/**
426-
* Get/set the name of the layout file to render the view inside of.
426+
* Get/set the name of the layout file to render the template inside of.
427427
* The name specified is the filename of the layout in /app/Template/Layout
428428
* without the .ctp extension.
429429
*
@@ -532,21 +532,21 @@ public function elementExists($name)
532532
}
533533

534534
/**
535-
* Renders view for given view file and layout.
535+
* Renders view for given template file and layout.
536536
*
537-
* Render triggers helper callbacks, which are fired before and after the view are rendered,
537+
* Render triggers helper callbacks, which are fired before and after the template are rendered,
538538
* as well as before and after the layout. The helper callbacks are called:
539539
*
540540
* - `beforeRender`
541541
* - `afterRender`
542542
* - `beforeLayout`
543543
* - `afterLayout`
544544
*
545-
* If View::$autoRender is false and no `$layout` is provided, the view will be returned bare.
545+
* If View::$autoRender is false and no `$layout` is provided, the template will be returned bare.
546546
*
547-
* View and layout names can point to plugin views/layouts. Using the `Plugin.view` syntax
548-
* a plugin view/layout can be used instead of the app ones. If the chosen plugin is not found
549-
* the view will be located along the regular view path cascade.
547+
* Template and layout names can point to plugin templates/layouts. Using the `Plugin.template` syntax
548+
* a plugin template/layout can be used instead of the app ones. If the chosen plugin is not found
549+
* the template will be located along the regular view path cascade.
550550
*
551551
* @param string|null $view Name of view file to use
552552
* @param string|null $layout Layout to use.
@@ -582,7 +582,7 @@ public function render($view = null, $layout = null)
582582
* Renders a layout. Returns output from _render(). Returns false on error.
583583
* Several variables are created for use in layout.
584584
*
585-
* @param string $content Content to render in a view, wrapped by the surrounding layout.
585+
* @param string $content Content to render in a template, wrapped by the surrounding layout.
586586
* @param string|null $layout Layout name
587587
* @return mixed Rendered output, or false on error
588588
* @throws \Cake\Core\Exception\Exception if there is an error in the view.
@@ -762,12 +762,12 @@ public function exists($name)
762762
}
763763

764764
/**
765-
* Provides view or element extension/inheritance. Views can extends a
765+
* Provides template or element extension/inheritance. Views can extends a
766766
* parent view and populate blocks in the parent template.
767767
*
768-
* @param string $name The view or element to 'extend' the current one with.
768+
* @param string $name The template or element to 'extend' the current one with.
769769
* @return void
770-
* @throws \LogicException when you extend a view with itself or make extend loops.
770+
* @throws \LogicException when you extend a template with itself or make extend loops.
771771
* @throws \LogicException when you extend an element which doesn't exist
772772
*/
773773
public function extend($name)
@@ -893,8 +893,8 @@ public function loadHelpers()
893893
}
894894

895895
/**
896-
* Renders and returns output for given view filename with its
897-
* array of data. Handles parent/extended views.
896+
* Renders and returns output for given template filename with its
897+
* array of data. Handles parent/extended templates.
898898
*
899899
* @param string $viewFile Filename of the view
900900
* @param array $data Data to include in rendered view. If empty the current

0 commit comments

Comments
 (0)