DotsUnited\BundleFu\Bundle::start PHP Method

start() public method

Start capturing and bundling current output.
public start ( array $options = [] ) : Bundle
$options array
return Bundle
    public function start(array $options = array())
    {
        $currentBundleOptions = array('docroot' => $this->getDocRoot(), 'bypass' => $this->getBypass());
        $this->currentBundleOptions = array_merge($currentBundleOptions, $options);
        ob_start();
        return $this;
    }

Usage Example

Example #1
0
 public function testEndWithoutSettingDocRootFirstShouldThrowException()
 {
     $this->setExpectedException('\\RuntimeException', 'Please set a document root either with setDocRoot() or via runtime through bundle options.');
     $bundle = new Bundle();
     $bundle->start();
     $bundle->end();
 }