public function attachByScope(CakeEventListener $subscriber, $manager = null, $scope = null) {
		if (!($manager instanceof CakeEventManager)) {
			$scope = $manager;
			$_this = $this;
		} else {
			$_this = $manager;
		}

		if (empty($scope)) {
			$_this->attach($subscriber);
			return;
		}

		foreach ($subscriber->implementedEvents() as $eventKey => $function) {
			if (strpos($eventKey, $scope) !== 0) {
				continue;
			}

			$options = array();
			$method = $function;
			if (is_array($function) && isset($function['callable'])) {
				list($method, $options) = $_this->_extractCallable($function, $subscriber);
			} elseif (is_array($function) && is_numeric(key($function))) {
				foreach ($function as $f) {
					list($method, $options) = $_this->_extractCallable($f, $subscriber);
					$_this->attach($method, $eventKey, $options);
				}
				continue;
			}
			if (is_string($method)) {
				$method = array($subscriber, $function);
			}
			$_this->attach($method, $eventKey, $options);
		}
	}