protected $sectionStack =
[];
public function __construct(ViewConfig
$config, ?string
$viewPath = null, ?FileLocator
$loader = null, ?bool
$debug = null, ?LoggerInterface
$logger = null
) { $this->config =
$config;
$this->viewPath =
rtrim($viewPath, '\\/ '
) . DIRECTORY_SEPARATOR;
$this->loader =
$loader ?? Services::
locator();
$this->logger =
$logger ?? Services::
logger();
$this->debug =
$debug ?? CI_DEBUG;
$this->saveData =
(bool) $config->saveData;
} /**
* Builds the output based upon a file name and any
* data that has already been set.
*
* Valid $options:
* - cache Number of seconds to cache for
* - cache_name Name to use for cache
*
* @param string $view File name of the view source
* @param array|null $options Reserved for 3rd-party uses since
* it might be needed to pass additional info
* to other template engines.
* @param bool|null $saveData If true, saves data for subsequent calls,
* if false, cleans the data after displaying,
* if null, uses the config setting.
*/