public function removeModuleQueueItem($key_or_regex){
		$removed_queue_items = [];

		// user passed the numeric key of queue item
		if(is_numeric($key_or_regex)){
			$removed_queue_items[] = $this->_module_queue[$key_or_regex];
			unset($this->_module_queue[$key_or_regex]);
		// user passed a regex that will be matched against the module namespace
		}else{
			foreach($this->_module_queue as $key => $queueItem){
				if(preg_match($key_or_regex, $queueItem['class'])){
					$removed_queue_items[] = $this->_module_queue[$key];
					unset($this->_module_queue[$key]);
				}
			}
		}
		return $removed_queue_items;
	}
public function removeModuleQueueItem($key_or_regex){
		$removed_queue_items = [];

		// user passed the numeric key of queue item
		if(is_numeric($key_or_regex)){
			$removed_queue_items[] = $this->_module_queue[$key_or_regex];
			unset($this->_module_queue[$key_or_regex]);
		// user passed a regex that will be matched against the module namespace
		}else{
			foreach($this->_module_queue as $key => $queueItem){
				if(preg_match($key_or_regex, $queueItem['class'])){
					$removed_queue_items[] = $this->_module_queue[$key];
					unset($this->_module_queue[$key]);
				}
			}
		}
		return $removed_queue_items;
	}
public function removeModuleQueueItem ( $ key_or_regex ) { $ removed_queue_items = [ ] ; // user passed the numeric key of queue item if ( is_numeric ( $ key_or_regex ) ) { $ removed_queue_items [ ] = $ this -> _module_queue [ $ key_or_regex ] ; unset ( $ this -> _module_queue [ $ key_or_regex ] ) ; // user passed a regex that will be matched against the module namespace } else { foreach ( $ this -> _module_queue as $ key => $ queueItem ) { if ( preg_match ( $ key_or_regex , $ queueItem [ 'class' ] ) ) { $ removed_queue_items [ ] = $ this -> _module_queue [ $ key ] ; unset ( $ this -> _module_queue [ $ key ] ) ; } } } return $ removed_queue_items ; }
Removes a module from the module queue either by key or by a regex
matched against the module controller namespace.
@param 	string	$key_or_regex	The numeric key of the queue item or a regex matched against the controller namespace
@return 	array					An array containing all removed queue items
Removes a module from the module queue either by key or by a regex matched against the module controller namespace .