public function getResources($match = null) {

		if(null !== $match && false === is_string($match)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($match)), E_USER_ERROR);
		}

		$permissions = [];
		$match 		 = null === $match ? '.*?' : $match;

		foreach($this -> permissions as $permission) {

			foreach($permission as $type => $value) {

				if(preg_match(sprintf('#%s#', str_replace('#', '\#', $match)), $type)) {
					$permissions[] = $type;			
				}
			}
		}

		return array_unique($permissions);
	}
public function getResources($match = null) {

		if(null !== $match && false === is_string($match)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($match)), E_USER_ERROR);
		}

		$permissions = [];
		$match 		 = null === $match ? '.*?' : $match;

		foreach($this -> permissions as $permission) {

			foreach($permission as $type => $value) {

				if(preg_match(sprintf('#%s#', str_replace('#', '\#', $match)), $type)) {
					$permissions[] = $type;			
				}
			}
		}

		return array_unique($permissions);
	}
public function getResources ( $ match = null ) { if ( null !== $ match && false === is_string ( $ match ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ match ) ) , E_USER_ERROR ) ; } $ permissions = [ ] ; $ match = null === $ match ? '.*?' : $ match ; foreach ( $ this -> permissions as $ permission ) { foreach ( $ permission as $ type => $ value ) { if ( preg_match ( sprintf ( '#%s#' , str_replace ( '#' , '\#' , $ match ) ) , $ type ) ) { $ permissions [ ] = $ type ; } } } return array_unique ( $ permissions ) ; }
Returns all the resourses in array
@param string|null $match
@return array
Returns all the resourses in array