public function compile() { if ($this->needRecompile) { // calling parent::setPath just to let it set compiled=null. the parent $path field is never used parent::setPath($this->getPath()); } return parent::compile(); }