PHP Trait FluentDOM\Loader\Supports\Json

Inheritance: use trait FluentDOM\Loader\Supports
Exibir arquivo Open project: fluentdom/fluentdom

Public Methods

Method Description
load ( mixed $source, string $contentType, array | Traversable | Options $options = [] ) : Document | Result | null Load the json string into an DOMDocument
loadFragment ( string $source, string $contentType, array | Traversable | Options $options = [] ) : DocumentFragment | null

Protected Methods

Method Description
transferTo ( DOMNode $node, mixed $json )

Private Methods

Method Description
getJson ( mixed $source, string $contentType ) : mixed
getNamespaceForNode ( string $nodeName, stdClass $properties, DOMNode $parent ) : string
getNamespacePropertyName ( string $prefix ) : string Get the property name for a namespace prefix
getValueAsString ( mixed $value ) : string

Method Details

load() public method

Load the json string into an DOMDocument
public load ( mixed $source, string $contentType, array | Traversable | Options $options = [] ) : Document | Result | null
$source mixed
$contentType string
$options array | Traversable | Options
return FluentDOM\Document | FluentDOM\Loader\Result | null

loadFragment() public method

See also: Loadable::loadFragment
public loadFragment ( string $source, string $contentType, array | Traversable | Options $options = [] ) : DocumentFragment | null
$source string
$contentType string
$options array | Traversable | Options
return FluentDOM\DocumentFragment | null

transferTo() abstract protected method

abstract protected transferTo ( DOMNode $node, mixed $json )
$node DOMNode
$json mixed