Short description of method hasFlag

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
@param  string flag A PO flag string.
@return boolean
347763
public function hasFlag($flag)
    {
        $returnValue = (bool) false;

        
        foreach ($this->getFlags() as $f){
            if ($f == $flag){
                $returnValue = true;
                break;
            }
        }
        

        return (bool) $returnValue;
    }
471452
public function hasFlag(int $bitFlag): bool
    {
        if ($bitFlag >= 1) {
            return $bitFlag === ($bitFlag & $this->value);
        }

        return false;
    }
596620
public function isStackable($flag) {
		$settings = $this->getFlag($flag);

		return isset($settings) && (true === $settings['stackable']);
	}
980705
private function parseFlag($flags, $flag) {
        $flag = strtolower($flag);

        if (property_exists($flags[0], strtoupper($flag))) {
            $this->flags->put($flag, $flags[0]->{strtoupper($flag)});
        } elseif (property_exists($flags[0], ucfirst($flag))) {
            $this->flags->put($flag, $flags[0]->{ucfirst($flag)});
        } elseif (property_exists($flags[0], $flag)) {
            $this->flags->put($flag, $flags[0]->$flag);
        }
    }
125194
public function withFlag($flag)
    {
        $flagValue = (is_string($flag)) ? $this->flagsFromText($flag) : $flag;

        if ($flagValue) {
            $this->getDbCriteria()->mergeWith(array(
                'condition' => $this->getTableAlias() . '.' . $this->flagsField . '&' . $flagValue . '<>0', //:flag<>0',
            ));
        }
        return $this;
    }
467708
public function getFlag($flag)
    {
        return isset($this->_parts['flags'][$flag]) ? $this->_parts['flags'][$flag] : null;
    }
503684
public function hasTag($tag)
    {
        if ($this->isTopTag($tag)) {
            return true;
        }

        return isset($this->tags[$tag]) && is_array($this->tags[$tag]);
    }
1064635
public function addFlag($flag)
    {
        if (!in_array($flag, $this->flags, true)) {
            $this->flags[] = $flag;
        }

        return $this;
    }
922670
public function isFlagSet($flag)
    {
        if (in_array($flag, $this->flags->all()->toArray())) {
            return true;
        }
        return false;
    }
103754
public function hasFlags(array $flags, bool $matchAll = false) : bool
    {
        $matched = false;
        $userFlags = $this->getUserFlags();

        foreach ($flags as $flag) {
            if (in_array($flag, $userFlags)) {
                if ($matchAll) {
                    $matched = true;
                    continue;
                }

                $matched = true;
            } else {
                if ($matchAll) {
                    return false;
                }

                $matched = false;
            }
        }

        return $matched;
    }
590521
public function hasFlag(string $name): bool
    {
        $flags = array();
        $flagEntry = $this->entry[PoTokens::FLAG];
        if (!empty($flagEntry)) {
            foreach ((array) $flagEntry as $csv) {
                $temp = str_getcsv($csv, ',');
                foreach ($temp as $flag) {
                    $flag = strtolower(trim($flag));
                    $flags[$flag] = $flag;
                }
            }
            return isset($flags[strtolower(trim($name))]);
        }
        return false;
    }
1148763
private function _setLoggingFlag($flag, $boolean = true)
    {
        if ($boolean) {
            $this->_logLevel |= $flag;
        } else {
            $this->_logLevel &= ~$flag;
        }
    }
424423
private function parseFlag($flag)
    {
        if (!isset($this->flags)) {
            $this->flags = 0;
        }

        if (is_string($flag) && defined("static::${flag}")) {
            $flag = constant("static::${flag}");
        }

        if (!is_int($flag)) {
            return 0;
        }

        return $flag;
    }
1025825
public function setFlagStatus($flag, $status)
    {
        if (is_array($flag)) {
            foreach ($flag as $singleFeature) {
                $this->flags[$singleFeature] = $status;
            }
        } else {
            $this->flags[$flag] = $status;
        }
    }
1349517
protected function setFlag($flag, $enable = true)
    {
        if ($enable) {
            $this->flags[$flag] = true;
        } else {
            unset($this->flags[$flag]);
        }
    }
42093
public boolean hasPosTag(String posTag) {
    boolean found = false;
    for (AnalyzedToken reading : anTokReadings) {
      if (reading.getPOSTag() != null) {
        found = posTag.equals(reading.getPOSTag());
        if (found) {
          break;
        }
      }
    }
    return found;
  }
294885
public static function beginFlag(string $flagName = 'default'): bool
    {
        self::$flag[$flagName] = [memory_get_usage(), microtime(true)]; //注，内存的统计由于代码所处上下文不同会导致统计不准
        return true;
    }