function http_response_headers_rule_load in HTTP Response Headers 7
Loads a HTTP header rule object from the database.
Parameters
string $machine_name: ID of the rule to load.
bool $reset: Flag to reset cached objects.
Return value
stdClass A header rule object.
6 calls to http_response_headers_rule_load()
- drush_http_response_headers_http_header_add_validate in ./
http_response_headers.drush.inc - Validation callback for drush_http_response_headers_http_header_set().
- drush_http_response_headers_http_header_get in ./
http_response_headers.drush.inc - Gets a header rule by rule ID.
- drush_http_response_headers_http_header_get_validate in ./
http_response_headers.drush.inc - Validates the given rule ID is valid.
- drush_http_response_headers_http_header_set in ./
http_response_headers.drush.inc - Sets header rule.
- drush_http_response_headers_http_header_set_validate in ./
http_response_headers.drush.inc - Validation callback for drush_http_response_headers_http_header_set().
1 string reference to 'http_response_headers_rule_load'
- http_response_headers_schema in ./
http_response_headers.install - Implements hook_schema().
File
- ./
http_response_headers.module, line 142 - Contains HTTP response headers.
Code
function http_response_headers_rule_load($machine_name, $reset = FALSE) {
// Use CTools export API to fetch this header rule.
ctools_include('export');
// Reset the static cache if required.
if ($reset) {
ctools_export_load_object_reset('http_response_headers');
}
$result = ctools_export_load_object('http_response_headers', 'names', array(
$machine_name,
));
if (isset($result[$machine_name])) {
return $result[$machine_name];
}
}