Example #1
0
                unset(FluentDOM::$_xpathTransformers[$index]);
            }
        }
        throw new \LogicException($errorMessage);
    }
    /**
     * @param string|callable|FluentDOM\Xpath\Transformer $transformer
     */
    public static function registerXpathTransformer($transformer, $reset = FALSE)
    {
        if ($reset) {
            self::$_xpathTransformers = [];
        }
        array_unshift(self::$_xpathTransformers, $transformer);
    }
}
FluentDOM::$isHHVM = defined('HHVM_VERSION');
/**
 * FluentDOM function, is an Alias for the \FluentDOM\FluentDOM::Query()
 * factory class function.
 *
 * @param mixed $source
 * @param string $contentType
 * @param array $options
 * @return \FluentDOM\Query
 * @codeCoverageIgnore
 */
function FluentDOM($source = NULL, $contentType = 'text/xml', array $options = [])
{
    return FluentDOM::Query($source, $contentType, $options);
}