protected function handleResource($resource) {
		if ($resource instanceof Resource) {
			return $resource;
		}
		
		// Is not a local resource
		if (preg_match('~^[a-z]+:~', $resource)) {
			$slashPos = strrpos($resource, '/');
			
			$base = substr($resource, 0, $slashPos);
			$name = substr($resource, $slashPos + 1);
			
			$resource = new Resource($name, $base, $base, $this->metadataManager);
		} else {
			$resource = new Resource($resource, $this->basePath, $this->baseUrl, $this->metadataManager);
		}
		
		if ($this->hashAppend) {
			$resource->setHashAppend(true);
		}
		
		return $resource;
	}
protected function handleResource($resource) {
		if ($resource instanceof Resource) {
			return $resource;
		}
		
		// Is not a local resource
		if (preg_match('~^[a-z]+:~', $resource)) {
			$slashPos = strrpos($resource, '/');
			
			$base = substr($resource, 0, $slashPos);
			$name = substr($resource, $slashPos + 1);
			
			$resource = new Resource($name, $base, $base, $this->metadataManager);
		} else {
			$resource = new Resource($resource, $this->basePath, $this->baseUrl, $this->metadataManager);
		}
		
		if ($this->hashAppend) {
			$resource->setHashAppend(true);
		}
		
		return $resource;
	}
protected function handleResource ( $ resource ) { if ( $ resource instanceof Resource ) { return $ resource ; } // Is not a local resource if ( preg_match ( '~^[a-z]+:~' , $ resource ) ) { $ slashPos = strrpos ( $ resource , '/' ) ; $ base = substr ( $ resource , 0 , $ slashPos ) ; $ name = substr ( $ resource , $ slashPos + 1 ) ; $ resource = new Resource ( $ name , $ base , $ base , $ this -> metadataManager ) ; } else { $ resource = new Resource ( $ resource , $ this -> basePath , $ this -> baseUrl , $ this -> metadataManager ) ; } if ( $ this -> hashAppend ) { $ resource -> setHashAppend ( true ) ; } return $ resource ; }
Handle the resource

@param  Resource | string $resource
@return Resource
Handle the resource