📄 domainvalidator.class.php
字号:
<?php lt_include( PLOG_CLASS_PATH."class/data/validator/validator.class.php" ); lt_include( PLOG_CLASS_PATH."class/data/validator/rules/nonemptyrule.class.php" ); lt_include( PLOG_CLASS_PATH."class/data/validator/rules/filteredwordsrule.class.php" ); /** * \ingroup Validator * * Checks if a domain is valid. Domains have to comply with the following rules: * * - They must not be empty * - They must not be any of the forbidden usernames. Forbidden domains * (and usernames) can be configured via the 'forbidden_usernames' * configuration parameter. * * @see NonEmptyRule * @see FilteredWordsRule */ class DomainValidator extends Validator { function DomainValidator() { $this->Validator(); $this->addRule( new NonEmptyRule()); $config =& Config::getConfig(); $forbiddenDomainNames = $config->getValue( "forbidden_usernames", "" ); $forbiddenDomainNamesArray = explode( " ", $forbiddenDomainNames ); $this->addRule( new FilteredWordsRule( $forbiddenDomainNamesArray )); } }?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -