Example #1
0
/**
 * @param CX $e
 * @throws E
 */
function df_assert_leaf(CX $e)
{
    if (!df_check_leaf($e)) {
        df_error("Требуется лист XML, однако получена ветка XML:\n%s.", df_xml_report($e));
    }
}
Example #2
0
 /**
  * @param string $childName
  * @return bool
  */
 public function isChildComplex($childName)
 {
     df_param_string_not_empty($childName, 0);
     if (!isset($this->{__METHOD__}[$childName])) {
         /** @var X|null $child */
         $child = $this->child($childName, $isRequired = false);
         $this->{__METHOD__}[$childName] = $child && !df_check_leaf($child);
     }
     return $this->{__METHOD__}[$childName];
 }