public function resolveMapping($resource, $parameters = [], $key = 'default', $method = null)
	{
		$resourceName = $resource;

		if( is_object($resource) )
		{
			$resourceName = get_class($resource);
		}

		$mappings = $this->getMappings($resourceName, $key);

		if(empty($mappings))
		{
			throw new Exception('No resolvers mapped for resource: ' . $resourceName . '.');
		}

		$result = null;

		if(is_array($mappings))
		{
			return $this->runResolver($mappings[0], $parameters, $method);
		}

		return $this->runResolver($mappings, $parameters, $method);
	}
public function resolveMapping($resource, $parameters = [], $key = 'default', $method = null)
	{
		$resourceName = $resource;

		if( is_object($resource) )
		{
			$resourceName = get_class($resource);
		}

		$mappings = $this->getMappings($resourceName, $key);

		if(empty($mappings))
		{
			throw new Exception('No resolvers mapped for resource: ' . $resourceName . '.');
		}

		$result = null;

		if(is_array($mappings))
		{
			return $this->runResolver($mappings[0], $parameters, $method);
		}

		return $this->runResolver($mappings, $parameters, $method);
	}
public function resolveMapping ( $ resource , $ parameters = [ ] , $ key = 'default' , $ method = null ) { $ resourceName = $ resource ; if ( is_object ( $ resource ) ) { $ resourceName = get_class ( $ resource ) ; } $ mappings = $ this -> getMappings ( $ resourceName , $ key ) ; if ( empty ( $ mappings ) ) { throw new Exception ( 'No resolvers mapped for resource: ' . $ resourceName . '.' ) ; } $ result = null ; if ( is_array ( $ mappings ) ) { return $ this -> runResolver ( $ mappings [ 0 ] , $ parameters , $ method ) ; } return $ this -> runResolver ( $ mappings , $ parameters , $ method ) ; }
Resolve mapping end return result

@param mixed $resource - mapping name to be resolved
@param array $parameters - params for resolver
@param string $key - mapping section

@throws  Exception

@return  mixed
Resolve mapping end return result