PHP 클래스 FluentDOM\Loaders

The list is iterated until a valid document is returned by the loader
상속: implements IteratorAggregate, implements fluentdom\Loadable
파일 보기 프로젝트 열기: fluentdom/fluentdom 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array | Traversable $list = NULL ) Store the a list of loaders if provided.
add ( fluentdom\Loadable $loader ) Add a loader to the list
getIterator ( ) : Traversable Allow to iterate all added loaders
load ( mixed $source, string $contentType, array | Traversable | Options $options = [] ) : DOMDocument | Result | null Load a data source, the content type allows the loader to decide if it supports the data source
loadFragment ( mixed $source, string $contentType, array | Traversable | Options $options = [] ) : DOMDocumentFragment | null Load a data source as a fragment, the content type allows the loader to decide if it supports the data source
remove ( fluentdom\Loadable $loader ) Remove a loader to the list
supports ( string $contentType ) : boolean Validate if the list contains a loader that supports the given content type

메소드 상세

__construct() 공개 메소드

Store the a list of loaders if provided.
public __construct ( array | Traversable $list = NULL )
$list array | Traversable

add() 공개 메소드

Add a loader to the list
public add ( fluentdom\Loadable $loader )
$loader fluentdom\Loadable

getIterator() 공개 메소드

Allow to iterate all added loaders
public getIterator ( ) : Traversable
리턴 Traversable

load() 공개 메소드

Load a data source, the content type allows the loader to decide if it supports the data source
public load ( mixed $source, string $contentType, array | Traversable | Options $options = [] ) : DOMDocument | Result | null
$source mixed
$contentType string
$options array | Traversable | Options
리턴 DOMDocument | FluentDOM\Loader\Result | null

loadFragment() 공개 메소드

Load a data source as a fragment, the content type allows the loader to decide if it supports the data source
public loadFragment ( mixed $source, string $contentType, array | Traversable | Options $options = [] ) : DOMDocumentFragment | null
$source mixed
$contentType string
$options array | Traversable | Options
리턴 DOMDocumentFragment | null

remove() 공개 메소드

Remove a loader to the list
public remove ( fluentdom\Loadable $loader )
$loader fluentdom\Loadable

supports() 공개 메소드

Validate if the list contains a loader that supports the given content type
public supports ( string $contentType ) : boolean
$contentType string
리턴 boolean