PHP Class FluentDOM, FluentDOM

Inheritance: extends FluentDOMCore
Datei anzeigen Open project: fluentdom/fluentdom Class Usage Examples

Public Properties

Property Type Description
$isHHVM boolean

Public Methods

Method Description
Query ( mixed $source = NULL, string $contentType = 'text/xml', array $options = [] ) : Query Create an FluentDOM::Query instance and load the source into it.
QueryCss ( mixed $source = NULL, string $contentType = 'text/xml', array $options = [] ) : Query Create an FluentDOM::Query instance with a modified selector callback.
create ( string $version = '1.0', string $encoding = 'UTF-8' ) : Creator Return a FluentDOM Creator instance, allow to create a DOM using nested function calls
getDefaultLoaders ( ) : Loaders Standard loader + any registered loader.
getSerializerFactories ( ) : Group Return registered serializer factories
getXPathTransformer ( string $errorMessage = 'No CSS selector support installed' ) : FluentDOM\Xpath\Transformer Get a xpath expression builder to convert css selectors to xpath
load ( mixed $source, string $contentType = 'text/xml', array $options = [] ) : Document Load a data source into a FluentDOM\Document
registerLoader ( FluentDOM\Loadable | callable $loader, $contentTypes ) : Loaders Register an additional default loader
registerSerializerFactory ( FluentDOM\Serializer\Factory | callable $factory, $contentTypes ) Register a serializer factory for a specified content type(s). This can be a callable returning the create serializer.
registerXpathTransformer ( string | callable | FluentDOM\Xpath\Transformer $transformer, $reset = FALSE )
setLoader ( FluentDOM\Loadable | null $loader ) Set a loader used in FluentDOM::load(), NULL will reset the loader.

Method Details

Query() public static method

Create an FluentDOM::Query instance and load the source into it.
public static Query ( mixed $source = NULL, string $contentType = 'text/xml', array $options = [] ) : Query
$source mixed
$contentType string
$options array
return FluentDOM\Query

QueryCss() public static method

This allows to use CSS selectors instead of Xpath expression.
public static QueryCss ( mixed $source = NULL, string $contentType = 'text/xml', array $options = [] ) : Query
$source mixed
$contentType string
$options array
return FluentDOM\Query

create() public static method

Return a FluentDOM Creator instance, allow to create a DOM using nested function calls
public static create ( string $version = '1.0', string $encoding = 'UTF-8' ) : Creator
$version string
$encoding string
return FluentDOM\Nodes\Creator

getDefaultLoaders() public static method

Standard loader + any registered loader.
public static getDefaultLoaders ( ) : Loaders
return FluentDOM\Loaders

getSerializerFactories() public static method

Return registered serializer factories
public static getSerializerFactories ( ) : Group
return FluentDOM\Serializer\Factory\Group

getXPathTransformer() public static method

Get a xpath expression builder to convert css selectors to xpath
public static getXPathTransformer ( string $errorMessage = 'No CSS selector support installed' ) : FluentDOM\Xpath\Transformer
$errorMessage string
return FluentDOM\Xpath\Transformer

load() public static method

Load a data source into a FluentDOM\Document
public static load ( mixed $source, string $contentType = 'text/xml', array $options = [] ) : Document
$source mixed
$contentType string
$options array
return FluentDOM\Document

registerLoader() public static method

Register an additional default loader
public static registerLoader ( FluentDOM\Loadable | callable $loader, $contentTypes ) : Loaders
$loader FluentDOM\Loadable | callable
return FluentDOM\Loaders

registerSerializerFactory() public static method

Register a serializer factory for a specified content type(s). This can be a callable returning the create serializer.
public static registerSerializerFactory ( FluentDOM\Serializer\Factory | callable $factory, $contentTypes )
$factory FluentDOM\Serializer\Factory | callable

registerXpathTransformer() public static method

public static registerXpathTransformer ( string | callable | FluentDOM\Xpath\Transformer $transformer, $reset = FALSE )
$transformer string | callable | FluentDOM\Xpath\Transformer

setLoader() public static method

If no loader is provided an FluentDOM\Loader\Standard() will be created.
public static setLoader ( FluentDOM\Loadable | null $loader )
$loader FluentDOM\Loadable | null

Property Details

$isHHVM public_oe static_oe property

public static bool $isHHVM
return boolean