Skip to content

Commit

Permalink
Add deprecation warnings in ViewBuilder that were missed before.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 24, 2018
1 parent e2d81d4 commit 2238046
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/View/ViewBuilder.php
Expand Up @@ -145,6 +145,7 @@ public function getTemplatePath()
*/
public function templatePath($path = null)
{
deprecationWarning('ViewBuilder::templatePath() is deprecated. Use ViewBuilder::setTemplatePath() or ViewBuilder::getTemplatePath() instead.');
if ($path !== null) {
return $this->setTemplatePath($path);
}
Expand Down Expand Up @@ -184,6 +185,7 @@ public function getLayoutPath()
*/
public function layoutPath($path = null)
{
deprecationWarning('ViewBuilder::layoutPath() is deprecated. Use ViewBuilder::setLayoutPath() or ViewBuilder::getLayoutPath() instead.');
if ($path !== null) {
return $this->setLayoutPath($path);
}
Expand Down Expand Up @@ -228,6 +230,7 @@ public function isAutoLayoutEnabled()
*/
public function autoLayout($enable = null)
{
deprecationWarning('ViewBuilder::autoLayout() is deprecated. Use ViewBuilder::enableAutoLayout() or ViewBuilder::isAutoLayoutEnable() instead.');
if ($enable !== null) {
return $this->enableAutoLayout($enable);
}
Expand Down Expand Up @@ -271,6 +274,7 @@ public function getPlugin()
*/
public function plugin($name = null)
{
deprecationWarning('ViewBuilder::plugin() is deprecated. Use ViewBuilder::setPlugin() or ViewBuilder::getPlugin() instead.');
if ($name !== null) {
return $this->setPlugin($name);
}
Expand Down Expand Up @@ -315,6 +319,7 @@ public function getHelpers()
*/
public function helpers(array $helpers = null, $merge = true)
{
deprecationWarning('ViewBuilder::helpers() is deprecated. Use ViewBuilder::setHelpers() or ViewBuilder::getHelpers() instead.');
if ($helpers !== null) {
return $this->setHelpers($helpers, $merge);
}
Expand Down Expand Up @@ -358,6 +363,7 @@ public function getTheme()
*/
public function theme($theme = null)
{
deprecationWarning('ViewBuilder::theme() is deprecated. Use ViewBuilder::setTheme() or ViewBuilder::getTheme() instead.');
if ($theme !== null) {
return $this->setTheme($theme);
}
Expand Down Expand Up @@ -400,6 +406,7 @@ public function getTemplate()
*/
public function template($name = null)
{
deprecationWarning('ViewBuilder::template() is deprecated. Use ViewBuilder::setTemplate() or ViewBuilder::getTemplate() instead.');
if ($name !== null) {
return $this->setTemplate($name);
}
Expand Down Expand Up @@ -443,6 +450,7 @@ public function getLayout()
*/
public function layout($name = null)
{
deprecationWarning('ViewBuilder::layout() is deprecated. Use ViewBuilder::setLayout() or ViewBuilder::getLayout() instead.');
if ($name !== null) {
return $this->setLayout($name);
}
Expand Down Expand Up @@ -491,6 +499,7 @@ public function getOptions()
*/
public function options(array $options = null, $merge = true)
{
deprecationWarning('ViewBuilder::options() is deprecated. Use ViewBuilder::setOptions() or ViewBuilder::getOptions() instead.');
if ($options !== null) {
return $this->setOptions($options, $merge);
}
Expand Down Expand Up @@ -530,6 +539,7 @@ public function getName()
*/
public function name($name = null)
{
deprecationWarning('ViewBuilder::name() is deprecated. Use ViewBuilder::setName() or ViewBuilder::getName() instead.');
if ($name !== null) {
return $this->setName($name);
}
Expand Down Expand Up @@ -577,6 +587,7 @@ public function getClassName()
*/
public function className($name = null)
{
deprecationWarning('ViewBuilder::className() is deprecated. Use ViewBuilder::setClassName() or ViewBuilder::getClassName() instead.');
if ($name !== null) {
return $this->setClassName($name);
}
Expand Down

0 comments on commit 2238046

Please sign in to comment.