Check if the Role is applied to Private Zone.
@param bool $strict If true, only roles with nb_site_map_role_zone= 'P' are valid. If false, 'P' and 'B' values
are true.
@return bool Return true if the Role applies to Private Zone.
497818
public function isForPrivateZone(bool $strict = false)
    {
        if (!method_exists($this, 'getZone')) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_FEATURE_NOT_IMPLEMENTED);
        }

        $zone = $this->getZone();

        return ($zone === CNabuSite::ZONE_PRIVATE || (!$strict && $zone === CNabuSite::ZONE_BOTH));
    }
606803
public function isAll($role)
    {
        foreach ($this->getArrayFrom($role) as $role) {
            if (!$this->hasRole($role)) {
                return false;
            }
        }

        return true;
    }
437682
public static function has($key, $strict = false)
    {
        $isset = isset($_COOKIE[$key]);

        if (!$strict) {
            return $isset;
        }

        if ($isset) {
            $isset = $isset && !empty($_COOKIE[$key]);
        }

        return $isset;
    }
211391
public function has($needle, bool $strict = true): bool
    {
        foreach ($this->values as $value) {
            if ($strict && $value === $needle) {
                return true;
            }

            if ($strict && $value == $needle) {
                return true;
            }
        }

        return false;
    }
1267289
public function constrain($query, $model, $strict = false)
    {
        if ($model === '*') {
            return $this->constrainByWildcard($query);
        }

        $model = is_string($model) ? new $model : $model;

        $this->constrainByModel($query, $model, $strict);
    }
1278793
public function where($key, $value, $strict = true)
    {
        return $this->filter(function ($item) use ($key, $value, $strict)
        {
            return ($strict ? (data_get($item, $key) === $value) : (data_get($item, $key) == $value));
        });
    }
992898
function enable_strict_mode($mode = true)
    {
        if (self::MAYBE == $this->language_data['STRICT_MODE_APPLIES']) {
            $this->strict_mode = ($mode) ? self::ALWAYS : self::NEVER;
        }
    }
379874
public function isDispute( $strict = true ) {

		if( $strict ) {

			return $this->status == self::STATUS_DISPUTE;
		}

		return $this->status >= self::STATUS_DISPUTE;
	}
761017
public function contains($value, bool $strict = false): bool
    {
        return (bool) in_array($this->storage, $value, $strict);
    }
1086191
public function isProcessed( $strict = true ) {

		if( $strict ) {

			return $this->status == self::STATUS_PROCESSED;
		}

		return $this->status >= self::STATUS_PROCESSED;
	}
233833
public function validIpv4($ip, $strict = true)
    {
        $flags = FILTER_FLAG_IPV4;
        if ($strict) {
            $flags = FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE;
        }

        if (filter_var($ip, FILTER_VALIDATE_IP, array('flags' => $flags)) !== false) {
            return true;
        }
        return false;
    }
505479
public function contains($value, $strict = TRUE)
    {
        return $this->containsIn($value, $strict, $this->all());
    }
411725
public function isAuthorized($requiredRole)
    {
        $userRole = $this->session->getData('role');
        $permissions = ['N' => 1, 'A' => 2, 'S' => 3];

        if (!($requiredRole === 'A' || $requiredRole === 'S')) {
            return false;
        }

        return ($permissions[$requiredRole] <= $permissions[$userRole]);
    }
203212
public function isActive($path, $strict = false)
	{
		// Check if path is relative
		$pathData = parse_url($path);
		if ( ! empty($pathData['scheme'])
			|| ! empty($pathData['host'])
			|| ! empty($pathData['port'])
			|| ! empty($pathData['user'])
			|| ! empty($pathData['pass'])
		) {
			return false;
		}

		$path = $pathData['path'];

		$localization = $this->getPage();

		if ( ! $localization instanceof PageLocalization) {
			return false;
		}

		// Remove locale prefix
		$path = preg_replace(
			sprintf('#^(/?)%s(/|$)#', preg_quote($localization->getLocaleId())),
			'$1',
			$path
		);

		$checkPath = new Path($path);
		$currentPath = $localization->getPath();

		if ($currentPath === null) {
			return false;
		}

		return $strict
			? $checkPath->equals($currentPath)
			: $currentPath->startsWith($checkPath);
	}
721092
public static function isAlpha(array $set, $strict = true) {
        return static::every($set, function($value) use ($strict) {
            if (!is_string($value)) {
                return false;
            }

            if ($strict) {
                if (is_string($value) && is_numeric($value)) {
                    return false;
                }
            }

            return true;
        });
    }
765623
public static function isValidValue($value, $strict = true) : bool
    {
        $values = array_values(self::getConstants());
        return in_array($value, $values, $strict);
    }
1263960
public static function isSequential($value, $strict=false)
    {

        if ($value === []) {
            return true;
        }

        if (!is_object($value) && !is_array($value)) {
            return false;
        }

        $hasArrayAccess = is_array($value) || $value instanceof ArrayAccess;
        $isTraversable = is_array($value) || $value instanceof Traversable;

        // An object which you cant traverse shouldnt be sequential
        if (!$isTraversable) {
            return false;
        }

        if ($strict && $hasArrayAccess) {
            $keys = static::keys($value);
            return $keys === range(0, count($keys) - 1);
        }

        foreach ($value as $key=>$unused) {
            return $key === 0;
        }

        // Traversable and empty
        return true;

    }