本文整理匯總了PHP中MailSo\Base\Utils::ValidateDomain方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utils::ValidateDomain方法的具體用法?PHP Utils::ValidateDomain怎麽用?PHP Utils::ValidateDomain使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MailSo\Base\Utils
的用法示例。
在下文中一共展示了Utils::ValidateDomain方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: AppData
//.........這裏部分代碼省略.........
$aResult['AdminLogin'] = (string) $oConfig->Get('security', 'admin_login', '');
$aResult['UseTokenProtection'] = (bool) $oConfig->Get('security', 'csrf_protection', true);
$aResult['EnabledPlugins'] = (bool) $oConfig->Get('plugins', 'enable', false);
$aResult['VerifySslCertificate'] = (bool) $oConfig->Get('ssl', 'verify_certificate', false);
$aResult['AllowSelfSigned'] = (bool) $oConfig->Get('ssl', 'allow_self_signed', true);
$aDrivers = \class_exists('PDO') ? \PDO::getAvailableDrivers() : null;
$aResult['MySqlIsSupported'] = \is_array($aDrivers) ? \in_array('mysql', $aDrivers) : false;
$aResult['SQLiteIsSupported'] = \is_array($aDrivers) ? \in_array('sqlite', $aDrivers) : false;
$aResult['PostgreSqlIsSupported'] = \is_array($aDrivers) ? \in_array('pgsql', $aDrivers) : false;
$aResult['ContactsEnable'] = (bool) $oConfig->Get('contacts', 'enable', false);
$aResult['ContactsSharing'] = (bool) $oConfig->Get('contacts', 'allow_sharing', false);
$aResult['ContactsSync'] = (bool) $oConfig->Get('contacts', 'allow_sync', false);
$aResult['ContactsPdoType'] = (string) $this->ValidateContactPdoType(\trim($this->Config()->Get('contacts', 'type', 'sqlite')));
$aResult['ContactsPdoDsn'] = (string) $oConfig->Get('contacts', 'pdo_dsn', '');
$aResult['ContactsPdoType'] = (string) $oConfig->Get('contacts', 'type', '');
$aResult['ContactsPdoUser'] = (string) $oConfig->Get('contacts', 'pdo_user', '');
$aResult['ContactsPdoPassword'] = (string) APP_DUMMY;
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
$aResult['AllowGoogleSocialAuth'] = (bool) $oConfig->Get('social', 'google_enable_auth', true);
$aResult['AllowGoogleSocialAuthFast'] = (bool) $oConfig->Get('social', 'google_enable_auth_fast', true);
$aResult['AllowGoogleSocialDrive'] = (bool) $oConfig->Get('social', 'google_enable_drive', true);
$aResult['AllowGoogleSocialPreview'] = (bool) $oConfig->Get('social', 'google_enable_preview', true);
$aResult['GoogleClientID'] = (string) $oConfig->Get('social', 'google_client_id', '');
$aResult['GoogleClientSecret'] = (string) $oConfig->Get('social', 'google_client_secret', '');
$aResult['GoogleApiKey'] = (string) $oConfig->Get('social', 'google_api_key', '');
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
$aResult['FacebookAppID'] = (string) $oConfig->Get('social', 'fb_app_id', '');
$aResult['FacebookAppSecret'] = (string) $oConfig->Get('social', 'fb_app_secret', '');
$aResult['AllowTwitterSocial'] = (bool) $oConfig->Get('social', 'twitter_enable', false);
$aResult['TwitterConsumerKey'] = (string) $oConfig->Get('social', 'twitter_consumer_key', '');
$aResult['TwitterConsumerSecret'] = (string) $oConfig->Get('social', 'twitter_consumer_secret', '');
$aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
$aResult['DropboxApiKey'] = (string) $oConfig->Get('social', 'dropbox_api_key', '');
$aResult['SubscriptionEnabled'] = (bool) \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']);
// || \MailSo\Base\Utils::ValidateIP($aResult['AdminDomain']);
$aResult['WeakPassword'] = (bool) $oConfig->ValidatePassword('12345');
$aResult['CoreAccess'] = (bool) $this->rainLoopCoreAccess();
$aResult['PhpUploadSizes'] = array('upload_max_filesize' => \ini_get('upload_max_filesize'), 'post_max_size' => \ini_get('post_max_size'));
}
$aResult['Capa'] = $this->Capa(true);
}
$aResult['SupportedFacebookSocial'] = (bool) \version_compare(PHP_VERSION, '5.4.0', '>=');
if (!$aResult['SupportedFacebookSocial']) {
$aResult['AllowFacebookSocial'] = false;
$aResult['FacebookAppID'] = '';
$aResult['FacebookAppSecret'] = '';
}
$aResult['ProjectHash'] = \md5($aResult['AccountHash'] . APP_VERSION . $this->Plugins()->Hash());
$sLanguage = $oConfig->Get('webmail', 'language', 'en');
$sLanguageAdmin = $oConfig->Get('webmail', 'language_admin', 'en');
$sTheme = $oConfig->Get('webmail', 'theme', 'Default');
$aResult['Themes'] = $this->GetThemes();
$aResult['Languages'] = $this->GetLanguages(false);
$aResult['LanguagesAdmin'] = $this->GetLanguages(true);
$aResult['AllowLanguagesOnSettings'] = (bool) $oConfig->Get('webmail', 'allow_languages_on_settings', true);
$aResult['AllowLanguagesOnLogin'] = (bool) $oConfig->Get('login', 'allow_languages_on_login', true);
$aResult['AttachmentLimit'] = (int) $oConfig->Get('webmail', 'attachment_size_limit', 10) * 1024 * 1024;
$aResult['SignMe'] = (string) $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAILT_OFF);
$aResult['UseLocalProxyForExternalImages'] = (bool) $oConfig->Get('labs', 'use_local_proxy_for_external_images', false);
// user
$aResult['ShowImages'] = (bool) $oConfig->Get('defaults', 'show_images', false);
$aResult['MPP'] = (int) $oConfig->Get('webmail', 'messages_per_page', 25);
$aResult['SoundNotification'] = false;
$aResult['DesktopNotifications'] = false;
$aResult['Layout'] = (int) $oConfig->Get('defaults', 'view_layout', \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
$aResult['EditorDefaultType'] = (string) $oConfig->Get('defaults', 'view_editor_type', '');
示例2: AppData
//.........這裏部分代碼省略.........
}
$aResult['Capa'] = $this->Capa(false, $oAccount);
} else {
$aResult['Auth'] = $this->IsAdminLoggined(false);
if ($aResult['Auth']) {
$aResult['AdminLogin'] = $oConfig->Get('security', 'admin_login', '');
$aResult['AdminDomain'] = APP_SITE;
$aResult['UseTokenProtection'] = (bool) $oConfig->Get('security', 'csrf_protection', true);
$aResult['EnabledPlugins'] = (bool) $oConfig->Get('plugins', 'enable', false);
$aDrivers = \class_exists('PDO') ? \PDO::getAvailableDrivers() : array();
$aResult['MySqlIsSupported'] = \is_array($aDrivers) ? \in_array('mysql', $aDrivers) : false;
$aResult['SQLiteIsSupported'] = \is_array($aDrivers) ? \in_array('sqlite', $aDrivers) : false;
$aResult['PostgreSqlIsSupported'] = \is_array($aDrivers) ? \in_array('pgsql', $aDrivers) : false;
$aResult['ContactsEnable'] = (bool) $oConfig->Get('contacts', 'enable', false);
$aResult['ContactsSharing'] = (bool) $oConfig->Get('contacts', 'allow_sharing', false);
$aResult['ContactsSync'] = (bool) $oConfig->Get('contacts', 'allow_sync', false);
$aResult['ContactsPdoType'] = $this->ValidateContactPdoType(\trim($this->Config()->Get('contacts', 'type', 'sqlite')));
$aResult['ContactsPdoDsn'] = (string) $oConfig->Get('contacts', 'pdo_dsn', '');
$aResult['ContactsPdoType'] = (string) $oConfig->Get('contacts', 'type', '');
$aResult['ContactsPdoUser'] = (string) $oConfig->Get('contacts', 'pdo_user', '');
$aResult['ContactsPdoPassword'] = APP_DUMMY;
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
$aResult['GoogleClientID'] = (string) $oConfig->Get('social', 'google_client_id', '');
$aResult['GoogleClientSecret'] = (string) $oConfig->Get('social', 'google_client_secret', '');
$aResult['GoogleApiKey'] = (string) $oConfig->Get('social', 'google_api_key', '');
$aResult['AllowFacebookSocial'] = (bool) $oConfig->Get('social', 'fb_enable', false);
$aResult['FacebookAppID'] = (string) $oConfig->Get('social', 'fb_app_id', '');
$aResult['FacebookAppSecret'] = (string) $oConfig->Get('social', 'fb_app_secret', '');
$aResult['AllowTwitterSocial'] = (bool) $oConfig->Get('social', 'twitter_enable', false);
$aResult['TwitterConsumerKey'] = (string) $oConfig->Get('social', 'twitter_consumer_key', '');
$aResult['TwitterConsumerSecret'] = (string) $oConfig->Get('social', 'twitter_consumer_secret', '');
$aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
$aResult['DropboxApiKey'] = (string) $oConfig->Get('social', 'dropbox_api_key', '');
$aResult['SubscriptionEnabled'] = \MailSo\Base\Utils::ValidateDomain($aResult['AdminDomain']);
$aResult['WeakPassword'] = $oConfig->ValidatePassword('12345');
$aResult['CoreAccess'] = $this->rainLoopCoreAccess();
$aResult['PhpUploadSizes'] = array('upload_max_filesize' => \ini_get('upload_max_filesize'), 'post_max_size' => \ini_get('post_max_size'));
}
$aResult['Capa'] = $this->Capa(true);
}
$aResult['SupportedFacebookSocial'] = (bool) \version_compare(PHP_VERSION, '5.4.0', '>=');
if (!$aResult['SupportedFacebookSocial']) {
$aResult['AllowFacebookSocial'] = false;
$aResult['FacebookAppID'] = '';
$aResult['FacebookAppSecret'] = '';
}
$aResult['ProjectHash'] = \md5($aResult['AccountHash'] . APP_VERSION . $this->Plugins()->Hash());
$sLanguage = $oConfig->Get('webmail', 'language', 'en');
$sTheme = $oConfig->Get('webmail', 'theme', 'Default');
$aResult['Themes'] = $this->GetThemes();
$aResult['Languages'] = $this->GetLanguages();
$aResult['AllowLanguagesOnSettings'] = (bool) $oConfig->Get('webmail', 'allow_languages_on_settings', true);
$aResult['AllowLanguagesOnLogin'] = (bool) $oConfig->Get('login', 'allow_languages_on_login', true);
$aResult['AttachmentLimit'] = (int) $oConfig->Get('webmail', 'attachment_size_limit', 10) * 1024 * 1024;
$aResult['SignMe'] = (string) $oConfig->Get('login', 'sign_me_auto', \RainLoop\Enumerations\SignMeType::DEFAILT_OFF);
$aResult['UseLocalProxyForExternalImages'] = (bool) $oConfig->Get('labs', 'use_local_proxy_for_external_images', false);
// user
$aResult['EditorDefaultType'] = (string) $oConfig->Get('webmail', 'editor_default_type', '');
$aResult['ShowImages'] = (bool) $oConfig->Get('webmail', 'show_images', false);
$aResult['ContactsAutosave'] = true;
$aResult['MPP'] = (int) $oConfig->Get('webmail', 'messages_per_page', 25);
$aResult['DesktopNotifications'] = false;
$aResult['UseThreads'] = false;
$aResult['ReplySameFolder'] = false;
$aResult['Layout'] = \RainLoop\Enumerations\Layout::SIDE_PREVIEW;
$aResult['UseCheckboxesInList'] = true;