From 980d7c5f20f4792d0be49285c7b2ffde8c8d9fe5 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 28 Sep 2016 22:28:55 +0200 Subject: [PATCH] added setAutoRefresh() --- src/RobotLoader/RobotLoader.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/RobotLoader/RobotLoader.php b/src/RobotLoader/RobotLoader.php index b4ccc77..90b2551 100644 --- a/src/RobotLoader/RobotLoader.php +++ b/src/RobotLoader/RobotLoader.php @@ -27,7 +27,7 @@ class RobotLoader /** @var string|array comma separated wildcards */ public $acceptFiles = '*.php, *.php5'; - /** @var bool */ + /** @var bool @deprecated */ public $autoRebuild = TRUE; /** @var array */ @@ -335,6 +335,17 @@ private function scanPhp($code) /********************* caching ****************d*g**/ + /** + * Sets auto-refresh mode. + * @return self + */ + public function setAutoRefresh($on = TRUE) + { + $this->autoRebuild = (bool) $on; + return $this; + } + + /** * @return self */