* @license http://www.gnu.org/copyleft/gpl.html GNU GPL * @copyright (C) 2005 Nigel McNie * @version 1.1.0 * */ /** * Class that is overridden to provide an implementation of getting keywords * for a particular language * * @author Nigel McNie * @since 0.1.0 * @abstract */ class KeywordGetterStrategy { /**#@+ * @access private */ /** * The language that this getter is getting keywords for * @var string */ var $_language; /** * The keyword group within the language that this getter is * getting keywords for * @var string */ var $_keywordGroup; /** * The keyword groups that are valid (supported) by this strategy * @var array */ var $_validKeywordGroups; /** * used? */ var $_keywords = array(); /**#@-*/ /** * @abstract */ function getKeywords ($keyword_group) { return new KeywordGetterError(LANG_NOT_SUPPORTED, $this->_language); } /** * @return array */ function getValidKeywordGroups () { return $this->_validKeywordGroups; } /** * Checks whether the keyword group asked for is valid */ function keywordGroupIsValid ($keyword_group) { if (in_array($keyword_group, $this->_validKeywordGroups)) { return true; } return new KeywordGetterError(INVALID_KEYWORD_GROUP, $this->_language, array('{KEYWORD_GROUP}' => $keyword_group)); } } ?>