public function addTorrentAgent(PwTorrentAgentDm $dm) { if (($result = $dm->beforeAdd()) !== true) { return $result; } return $this->_getDao(self::FETCH_MAIN)->addTorrentAgent($dm->getData()); }