lithium\aop\Filters::_ids()

protected static method

Calculates possible ids for a class/method combination. Normalizes leading backslash in class name by removing it.

In general instances have two possible ids and static classes have one. The id is formattet according to the following pattern which is inspired by the format used by psysh:

<foo\Bar #0000000046feb0630000000176a1b630>::baz
<lithium\action\Dispatcher>::run

Parameters

  • string|object $class

    Fully namespaced class name or an instance of a class.

  • string $method

    The method name i.e. 'bar'.

Returns

array

An array of the possible ids.

Source

	protected static function _ids($class, $method) {
		if (is_string($class)) {
			return ['<' . ltrim($class, '\\') . ">::{$method}"];
		}
		return [
			'<' . get_class($class) . ' #' . spl_object_hash($class) . ">::{$method}",
			'<' . get_class($class) . ">::{$method}"
		];
	}