lithium\test\filter\Profiler::check()

public method

Add, remove, or modify a profiler check.

Parameters

  • mixed $name
  • string $value

Returns

mixed

Source

	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;
		}
	}