PHP Класс QueryPath, microweber

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
enable ( mixed $extensionNames ) Enable one or more extensions.
enabledExtensions ( ) Get a list of all of the enabled extensions.
encodeDataURL ( mixed $data, string $mime = 'application/octet-stream', resource $context = null ) A static function for transforming data into a Data URL.
with ( $document = null, $selector = null, $options = [] )
withHTML ( $source = null, $selector = null, $options = [] )
withXML ( $source = null, $selector = null, $options = [] )

Описание методов

enable() публичный статический Метод

Extensions provide additional features to QueryPath. To enable and extension, you can use this method. In this example, we enable the QPTPL extension:
public static enable ( mixed $extensionNames )
$extensionNames mixed The name of an extension or an array of extension names. QueryPath assumes that these are extension class names, and attempts to register these as QueryPath extensions.

enabledExtensions() публичный статический Метод

This example dumps a list of extensions to standard output:
См. также: QueryPath::ExtensionRegistry
public static enabledExtensions ( )

encodeDataURL() публичный статический Метод

This can be used to create Data URLs for injection into CSS, JavaScript, or other non-XML/HTML content. If you are working with QP objects, you may want to use dataURL() instead.
public static encodeDataURL ( mixed $data, string $mime = 'application/octet-stream', resource $context = null )
$data mixed The contents to inject as the data. The value can be any one of the following: - A URL: If this is given, then the subsystem will read the content from that URL. THIS MUST BE A FULL URL, not a relative path. - A string of data: If this is given, then the subsystem will encode the string. - A stream or file handle: If this is given, the stream's contents will be encoded and inserted as data. (Note that we make the assumption here that you would never want to set data to be a URL. If this is an incorrect assumption, file a bug.)
$mime string The MIME type of the document.
$context resource A valid context. Use this only if you need to pass a stream context. This is only necessary if $data is a URL. (See {@link stream_context_create()}).

with() публичный статический Метод

public static with ( $document = null, $selector = null, $options = [] )

withHTML() публичный статический Метод

public static withHTML ( $source = null, $selector = null, $options = [] )

withXML() публичный статический Метод

public static withXML ( $source = null, $selector = null, $options = [] )