addSnippet() public method

public addSnippet ( $name, $content ) : mixed
return mixed
Beispiel #1
0
 public function leave()
 {
     if (!$this->renderingSnippets) {
         return;
     }
     list($name, $obStarted) = array_pop($this->stack);
     if ($this->nestingLevel > 0 && --$this->nestingLevel === 0) {
         $content = ob_get_clean();
         $this->bridge->addSnippet($name, $content);
     } elseif ($obStarted) {
         // dynamic snippet wrapper or snippet area
         ob_end_clean();
     }
 }