public function idfeed_add($options) { $this->cli->header('adding new idfeed'); if (count($options) < 2) { $this->cli->error('atleast two parameters (url, handle) should be given'); return; } if (!is_null(Kingboard_IdFeed::findByUrl($options[0]))) { $this->cli->error('a feed by this url allready exists!'); return; } $feed = new Kingboard_IdFeed(); $feed->url = $options[0]; $feed->handle = $options[1]; if (count($options) == 3) { $feed->type = $options[2]; } $feed->save(); $this->cli->positive('done'); }