/** * Creates a Smarty object. * * @return Capsule initialized (cleared) Smarty context. * @throws Exception the execute method will catch * and rethrow as a <code>BuildException</code> */ public function initControlContext() { $this->context->clear(); foreach ($this->assignedVars as $var) { $this->context->put($var->getName(), $var->getValue()); } return $this->context; }