lithium\storage\cache\Adapter::_removeScopePrefix()

protected method

Removes scope prefix from keys.

Parameters

  • string $scope

    Scope initially used when prefixing.

  • array $keys

    Array of keys mapping to values.

  • string $separator

    Separator used when prefix keys initially.

Returns

array

Keys array with prefix removed from each key.

Source

	protected function _removeScopePrefix($scope, array $data, $separator = ':') {
		$results = [];
		$prefix = strlen("{$scope}{$separator}");

		foreach ($data as $key => $value) {
			$results[substr($key, $prefix)] = $value;
		}
		return $results;
	}