protected function _modifyBootstrap($plugin)
{
$finder = "/\nPlugin::load\\((.|.\n|\n\\s\\s|\n\t|)+'{$plugin}'(.|.\n|)+\\);\n/";
$bootstrap = new File($this->bootstrap, false);
$contents = $bootstrap->read();
if (!preg_match("@\n\\s*Plugin::loadAll@", $contents)) {
$contents = preg_replace($finder, "", $contents);
$bootstrap->write($contents);
$this->out('');
$this->out(sprintf('%s modified', $this->bootstrap));
return true;
}
return false;
}