function _acquia_purge_input_validate_msgs in Acquia Purge 7
Retrieve validation messages on user provided path strings.
Parameters
string $msg: The message you would like to retrieve, see implementation.
Return value
string|null Returns a fully translated string, or NULL.
See also
_acquia_purge_input_validate()
2 calls to _acquia_purge_input_validate_msgs()
- _acquia_purge_action_flush_url in ./
acquia_purge.rules.inc - Purge URL(s) and Path(s), directly using Acquia Purge's APIs.
- _acquia_purge_input_validate in ./
acquia_purge.module - Validate a user provided path string.
File
- ./
acquia_purge.module, line 584 - Acquia Purge, Top-notch Varnish purging on Acquia Cloud!
Code
function _acquia_purge_input_validate_msgs($msg) {
static $messages;
if (is_null($messages)) {
$messages = array();
$messages['space'] = t('The path cannot contain a space!');
$messages['double'] = t('You have already listed this path!');
$messages['nostring'] = t('The path is not a string!');
$messages['url'] = t('You provided a URL which is not compatible with the way Acquia Purge works, as it constructs full URLs for its configured domains.');
$messages['empty'] = t('The path cannot be empty, if you intended to purge the frontpage of your site, use "/" or "!front".', array(
'!front' => php_sapi_name() === 'cli' ? '<front>' : '<front>',
));
}
return isset($messages[$msg]) ? $messages[$msg] : NULL;
}