isValidDbname() public static method

Database names that start with a-Z or 0-9 and contain a-Z, 0-9, underscore(_), dash(-), plus(+), and dot(.) will be accepted. File names beginning with anything but a-Z or 0-9 will be rejected (including .htaccess for example). File names containing anything other than above mentioned will also be rejected (file names with spaces won't be accepted).
public static isValidDbname ( string $dbname ) : boolean
$dbname string
return boolean
コード例 #1
0
ファイル: FormDatabaseSetup.php プロジェクト: piwik/piwik
 function validateOwner()
 {
     $prefix = $this->owner->getValue();
     return empty($prefix) || DbHelper::isValidDbname($prefix);
 }