function _patterns_scan_is_section in Patterns 7.2
Same name and namespace in other branches
- 7 includes/parser/scan.inc \_patterns_scan_is_section()
Determines whether an array is actually a section.
A section is an array, whose first element is a valid action.
Parameters
array $section The array to check:
Return value
Boolean TRUE if the array is a section
See also
1 call to _patterns_scan_is_section()
- patterns_scan_pattern in includes/
parser/ scan.inc - Scans a pattern and returns a brief summary of its properties.
File
- includes/
parser/ scan.inc, line 345 - Helping functions for the parser.
Code
function _patterns_scan_is_section($section = NULL) {
if (is_null($section)) {
return FALSE;
}
if (!is_array($section)) {
return FALSE;
}
$action = array_pop($section);
return _patterns_scan_is_action($action);
}