clear() 공개 메소드

Clears one or several or all variables.
public clear ( mixed $which = null ) : void
$which mixed String name of var, or array of names.
리턴 void
예제 #1
0
 /**
  * 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;
 }