You are here

public function NodeExtension::setFlag in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/XPath/Extension/NodeExtension.php \Symfony\Component\CssSelector\XPath\Extension\NodeExtension::setFlag()

Parameters

int $flag:

bool $on:

Return value

NodeExtension

File

vendor/symfony/css-selector/XPath/Extension/NodeExtension.php, line 53

Class

NodeExtension
XPath expression translator node extension.

Namespace

Symfony\Component\CssSelector\XPath\Extension

Code

public function setFlag($flag, $on) {
  if ($on && !$this
    ->hasFlag($flag)) {
    $this->flags += $flag;
  }
  if (!$on && $this
    ->hasFlag($flag)) {
    $this->flags -= $flag;
  }
  return $this;
}