Documentation
</> Developer Portal

NAME

RT::URI

DESCRIPTION

This class provides a base class for URIs, such as those handled by RT::Link objects.

API

new

Create a new RT::URI object.

CanonicalizeURI <URI>

Returns the canonical form of the given URI by calling "FromURI" and then "URI".

If the URI is unparseable by FromURI the passed in URI is simply returned untouched.

FromObject <Object>

Given a local object, such as an RT::Ticket or an RT::Article, this routine will return a URI for the local object

FromURI <URI>

Returns a local object id for this content. You are expected to know what sort of object this is the Id of

Returns true if everything is ok, otherwise false

ParseObjectURI URI

Class method. Given a raw link URI string, returns ($class, $id) for a local RT object (e.g. ('RT::Ticket', 42)) without loading the object, or an empty list for external URLs and remote RT objects.

This is a lightweight classifier used by the Links display to bucket links by object type and defer loading. Unlike "FromURI", it neither instantiates a resolver nor loads the object.

_GetResolver <scheme>

Gets an RT URI resolver for the scheme <scheme>. Falls back to a null resolver. RT::URI::base.

Scheme

Returns a local object id for this content. You are expected to know what sort of object this is the Id of

URI

Returns a local object id for this content. You are expected to know what sort of object this is the Id of

Object

Returns a local object for this content. This will usually be an RT::Ticket or somesuch

IsLocal

Returns a local object for this content. This will usually be an RT::Ticket or somesuch

AsHREF

Resolver

Returns this URI's URI resolver object

AsString

Returns a friendly display form of the object if Local, or the full URI

← Back to index