/** * the singleton pattern * * @return Admin_Controller_Tags */ public static function getInstance() { if (self::$_instance === NULL) { self::$_instance = new Admin_Controller_Tags(); } return self::$_instance; }
/** * Tears down the fixture * This method is called after a test is executed. * * @access protected */ protected function tearDown() { // remove accounts for group member tests try { if (array_key_exists('user', $this->objects)) { Admin_Controller_User::getInstance()->delete($this->objects['user']->accountId); } if (array_key_exists('tag', $this->objects)) { Admin_Controller_Tags::getInstance()->delete($this->objects['tag']['id']); } } catch (Exception $e) { // do nothing } // remove container if (array_key_exists('container', $this->objects)) { Admin_Controller_Container::getInstance()->delete($this->objects['container']); } }
/** * delete multiple tags * * @param array $tagIds list of contactId's to delete * @return array with success flag */ public function deleteTags($tagIds) { return $this->_delete($tagIds, Admin_Controller_Tags::getInstance()); }