lithium\test\filter\Profiler::check PHP Method

check() public method

Add, remove, or modify a profiler check.
See also: lithium\test\Profiler::$_metrics
public check ( mixed $name, string $value = null ) : mixed
$name mixed
$value string
return mixed
    public function check($name, $value = null)
    {
        if ($value === null && !is_array($name)) {
            return isset(static::$_metrics[$name]) ? static::$_metrics[$name] : null;
        }
        if ($value === false) {
            unset(static::$_metrics[$name]);
            return;
        }
        if (!empty($value)) {
            static::$_metrics[$name] = $value;
        }
        if (is_array($name)) {
            static::$_metrics = $name + static::$_metrics;
        }
    }