public function &getPresentationRoleRefs( $filter = array(), $sort = true )
	{
		// Make sure the filter is initialized and contains lowercase values
		if ( ! is_array( $filter ) ) $filter = array();
		$filter = array_flip( array_map( 'strtolower', $filter ) );

		/**
		 * @var array $refs
		 */
		$refs = $this->context->presentationRoleRefs;
		/**
		 * @var array $result
		 */
		$result = array();

		foreach ( $refs as $refKey => $ref )
		{
			// Apply the filter if one is provided
			if ( count( $filter ) && ! isset( $filter[ strtolower( $refKey ) ] ) ) continue;

			// The presentation hierarchy may be implemented in another taxonomy
			if ( isset( $ref['hierarchy'] ) )
			{
				$result[ $refKey ]  = $ref;
			}
			else
			{
				$result[ $refKey ] = $this->context->presentationRoleRefs[ $refKey ];
			}

			$result[ $refKey ]['text'] = $this->getPresentationLinkRoleDescription( $ref );
		}

		if ( $sort )
		{
			$this->sortRoleRefs( $result );
		}

		return $result;
	}