ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
StyleBase.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
7 abstract class StyleBase
8 {
9  protected static function identifyFixedStyleValue(array $styleList, string &$styleAttributeValue): bool
10  {
11  $returnValue = false;
12 
13  $styleAttributeValue = strtolower($styleAttributeValue);
14  foreach ($styleList as $style) {
15  if ($styleAttributeValue == strtolower($style)) {
16  $styleAttributeValue = $style;
17  $returnValue = true;
18 
19  break;
20  }
21  }
22 
23  return $returnValue;
24  }
25 
26  protected static function getAttributes(?SimpleXMLElement $simple, string $node): SimpleXMLElement
27  {
28  return ($simple === null)
29  ? new SimpleXMLElement('<xml></xml>')
30  : ($simple->attributes($node) ?? new SimpleXMLElement('<xml></xml>'));
31  }
32 }
$style
Definition: example_012.php:70
static identifyFixedStyleValue(array $styleList, string &$styleAttributeValue)
Definition: StyleBase.php:9
static getAttributes(?SimpleXMLElement $simple, string $node)
Definition: StyleBase.php:26