Example #1
0
 /**
  * Start capture action
  *
  * @param  mixed  $captureType Type of capture
  * @param  string $type        Type of script
  * @param  array  $attrs       Attributes of capture
  * @return void
  */
 public function captureStart($captureType = Placeholder\Container\AbstractContainer::APPEND, $type = 'text/javascript', $attrs = array())
 {
     if ($this->_captureLock) {
         $e = new Placeholder\Container\Exception('Cannot nest headScript captures');
         $e->setView($this->view);
         throw $e;
     }
     $this->_captureLock = true;
     $this->_captureType = $captureType;
     $this->_captureScriptType = $type;
     $this->_captureScriptAttrs = $attrs;
     ob_start();
 }
Example #2
0
    /**
     * Start capture action
     *
     * @param  mixed $captureType
     * @param  string $typeOrAttrs
     * @return void
     */
    public function captureStart($type = Placeholder\Container\AbstractContainer::APPEND, $attrs = null)
    {
        if ($this->_captureLock) {
            $e = new Placeholder\Container\Exception('Cannot nest headStyle captures');
            $e->setView($this->view);
            throw $e;
        }

        $this->_captureLock        = true;
        $this->_captureAttrs       = $attrs;
        $this->_captureType        = $type;
        ob_start();
    }