[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/vendor/scotteh/php-dom-wrapper/src/Traits/ -> ManipulationTrait.php (summary)

Manipulation Trait

License: http://opensource.org/licenses/BSD-3-Clause BSD 3 Clause
File Size: 748 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 42 functions

  __call()
  __toString()
  inputPrepareAsTraversable()
  inputAsNodeList()
  inputAsFirstNode()
  nodesFromHtml()
  manipulateNodesWithInput()
  detach()
  destroy()
  substituteWith()
  text()
  getText()
  setText()
  precede()
  follow()
  prependWith()
  appendWith()
  prependTo()
  appendTo()
  _empty()
  _clone()
  removeAttr()
  hasAttr()
  getAttr()
  setAttr()
  attr()
  _pushAttrValue()
  addClass()
  removeClass()
  hasClass()
  _getFirstChildWrapStack()
  _prepareWrapStack()
  wrapWithInputByCallback()
  wrapInner()
  wrap()
  wrapAll()
  unwrap()
  getOuterHtml()
  getHtml()
  setHtml()
  html()
  create()

Functions
Functions that are not part of a class:

__call(string $name, array $arguments)   X-Ref
Magic method - Trap function names using reserved keyword (empty, clone, etc..)

param: string $name
param: array $arguments
return: mixed

__toString()   X-Ref

return: string

inputPrepareAsTraversable($input)   X-Ref

param: string|NodeList|\DOMNode $input
return: iterable

inputAsNodeList($input, $cloneForManipulate = true)   X-Ref

param: string|NodeList|\DOMNode $input
param: bool $cloneForManipulate
return: NodeList

inputAsFirstNode($input)   X-Ref

param: string|NodeList|\DOMNode $input
return: \DOMNode|null

nodesFromHtml($html)   X-Ref

param: string $html
return: NodeList

manipulateNodesWithInput($input, callable $callback)   X-Ref

param: string|NodeList|\DOMNode|callable $input
param: callable $callback
return: self

detach(string $selector = null)   X-Ref

param: string|null $selector
return: NodeList

destroy(string $selector = null)   X-Ref

param: string|null $selector
return: self

substituteWith($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

text($input = null)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: string|self

getText()   X-Ref

return: string

setText($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

precede($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

follow($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

prependWith($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

appendWith($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

prependTo($selector)   X-Ref

param: string|NodeList|\DOMNode $selector
return: self

appendTo($selector)   X-Ref

param: string|NodeList|\DOMNode $selector
return: self

_empty()   X-Ref

return: self

_clone()   X-Ref

return: NodeList|\DOMNode

removeAttr(string $name)   X-Ref

param: string $name
return: self

hasAttr(string $name)   X-Ref

param: string $name
return: bool

getAttr(string $name)   X-Ref

param: string $name
return: string

setAttr(string $name, $value)   X-Ref

param: string $name
param: mixed $value
return: self

attr(string $name, $value = null)   X-Ref

param: string $name
param: mixed $value
return: self|string

_pushAttrValue(string $name, $value, bool $addValue = false)   X-Ref

param: string $name
param: string|callable $value
param: bool $addValue

addClass($class)   X-Ref

param: string|callable $class
return: self

removeClass($class)   X-Ref

param: string|callable $class
return: self

hasClass(string $class)   X-Ref

param: string $class
return: bool

_getFirstChildWrapStack(Element $node)   X-Ref

param: Element $node
return: \SplStack

_prepareWrapStack(Element $node)   X-Ref

param: Element $node
return: \SplStack

wrapWithInputByCallback($input, callable $callback)   X-Ref

param: string|NodeList|\DOMNode|callable $input
param: callable $callback

wrapInner($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

wrap($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

wrapAll($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

unwrap()   X-Ref

return: self

getOuterHtml(bool $isIncludeAll = false)   X-Ref

param: int $isIncludeAll
return: string

getHtml(bool $isIncludeAll = false)   X-Ref

param: int $isIncludeAll
return: string

setHtml($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: self

html($input = null)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: string|self

create($input)   X-Ref

param: string|NodeList|\DOMNode $input
return: NodeList