public function on_create() { parent::on_create(); $db = DB::getInstance(); $data = $this->getAttrs(); $desc = ''; $desc .= strip_tags($this->description); $data['description'] = $desc; $data['url'] = $this->getSpiderUrl(); unset($data['id']); $oRef = new ReflectionClass($this->getSpiderClassName()); $oSpider = $oRef->newInstance($data); $oSpider->save(); $this->spiderID = $oSpider->id; $this->save(); }