/** * Prepares script to be executed or queued * * @return unknown */ public function prepare() { if ($this->_body) { return $this; } $this->_body = $this->_script->body; if (isNull($map = $this->_script->getMap())) { return $this; } $holders = $this->_collectDataFromMines(); foreach ($map->getItemList() as $item) { $this->_body = $item->replaceHolders($this->_body, $holders); } return $this; }