ePages 6.10 - DE_EPAGES/Content/API/Table/ShortURL.pm

Package DE_EPAGES::Content::API::Table::ShortURL

interface for table ShortURL

@EXPORT_OK
InsertShortURL
UpdateShortURL
DeleteShortURL
GetAllPKeyShortURLs
GetAllInfoShortURLs
GetInfoShortURL
ExistsShortURL
GetPKeyShortURLBySiteID
GetInfoShortURLBySiteID
ExistsShortURLBySiteID
GetPKeyShortURLsBySiteID
GetInfoShortURLsBySiteID
GetPKeyShortURLByContentObjectID
GetInfoShortURLByContentObjectID
ExistsShortURLByContentObjectID
GetPKeyShortURLsByContentObjectID
GetInfoShortURLsByContentObjectID

Functions

DeleteShortURL
ExistsShortURL
ExistsShortURLByContentObjectID
ExistsShortURLBySiteID
GetAllInfoShortURLs
GetAllPKeyShortURLs
GetInfoShortURL
GetInfoShortURLByContentObjectID
GetInfoShortURLBySiteID
GetInfoShortURLsByContentObjectID
GetInfoShortURLsBySiteID
GetPKeyShortURLByContentObjectID
GetPKeyShortURLBySiteID
GetPKeyShortURLsByContentObjectID
GetPKeyShortURLsBySiteID
InsertShortURL
OnDeleteSite
UpdateShortURL

DeleteShortURL

Deletes a(n) ShortURL.

Syntax
DeleteShortURL($ShortUrlID);
DeleteShortURL($hShortURL); # if $hShortURL includes ShortUrlID
Input
$ShortUrlID (int)
short url id (primary key)

ExistsShortURL

Returns true if the ShortURL exists.

Syntax
$exists = ExistsShortURL($ShortUrlID);
Input
$ShortUrlID (int)
short url id
Return
$exists (boolean)
1/0 the ShortURL exists (yes/no)

ExistsShortURLByContentObjectID

Returns true if a ShortURL by alternate keys ContentObjectID and LanguageID exists.

Syntax
$ShortUrlID = ExistsShortURLByContentObjectID($ContentObjectID, $LanguageID);
Input
$ContentObjectID (int)
object id
$LanguageID (int)
language id
Return
$exists (boolean)
1/0 the u_shorturl_object_language exists (yes/no)

ExistsShortURLBySiteID

Returns true if a ShortURL by alternate keys SiteID and Uri exists.

Syntax
$ShortUrlID = ExistsShortURLBySiteID($SiteID, $Uri);
Input
$SiteID (int)
site id
$Uri (varchar(255))
short uri
Return
$exists (boolean)
1/0 the u_shorturl_site_uri exists (yes/no)

GetAllInfoShortURLs

Returns all objects of ShortURL.

Syntax
$ahShortURLIDs = GetAllInfoShortURLs();
Return
$ahShortURLIDs (reference to array of hashes)
with following keys:
  • ShortUrlID - short url id (primary key)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

GetAllPKeyShortURLs

Returns all ShortURL identifiers.

Syntax
$aShortURLIDs = GetAllPKeyShortURLs();
Return
$aShortURLIDs (reference to array of int)
short url id

GetInfoShortURL

Returns the ShortURL by identifier.

Syntax
$hShortURL = GetInfoShortURL($ShortUrlID);
Input
$ShortUrlID (int)
short url id (primary key)
Return
$hShortURL (reference to hash)
with following keys:
  • ShortUrlID - short url id (primary key)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

GetInfoShortURLByContentObjectID

Returns the object of ShortURL by alternate keys ContentObjectID and LanguageID.

Syntax
$hShortURL = GetInfoShortURLByContentObjectID($ContentObjectID, $LanguageID);
Input
$ContentObjectID (int)
object id
$LanguageID (int)
language id
Return
$hShortURL (reference to hash)
with following keys:
  • ShortUrlID - short url id (primary key)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

GetInfoShortURLBySiteID

Returns the object of ShortURL by alternate keys SiteID and Uri.

Syntax
$hShortURL = GetInfoShortURLBySiteID($SiteID, $Uri);
Input
$SiteID (int)
site id
$Uri (varchar(255))
short uri
Return
$hShortURL (reference to hash)
with following keys:
  • ShortUrlID - short url id (primary key)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

GetInfoShortURLsByContentObjectID

Returns objects of ShortURL by alternate keys ContentObjectID and LanguageID.

Syntax
$ahShortURLs = GetInfoShortURLsByContentObjectID($ContentObjectID, $LanguageID);
Input
$ContentObjectID (int)
object id
$LanguageID (int)
language id (optional)
Return
$ahShortURLs (reference to array of hashes)
with following keys:
  • ShortUrlID - short url id (primary key)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

GetInfoShortURLsBySiteID

Returns objects of ShortURL by alternate keys SiteID and Uri.

Syntax
$ahShortURLs = GetInfoShortURLsBySiteID($SiteID, $Uri);
Input
$SiteID (int)
site id
$Uri (varchar(255))
short uri (optional)
Return
$ahShortURLs (reference to array of hashes)
with following keys:
  • ShortUrlID - short url id (primary key)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

GetPKeyShortURLByContentObjectID

Returns primary key of ShortURL by alternate keys ContentObjectID and LanguageID.

Syntax
$ShortUrlID = GetPKeyShortURLByContentObjectID($ContentObjectID, $LanguageID);
Input
$ContentObjectID (int)
object id
$LanguageID (int)
language id
Return
$ShortUrlID (int)
short url id (primary key)

GetPKeyShortURLBySiteID

Returns primary key of ShortURL by alternate keys SiteID and Uri.

Syntax
$ShortUrlID = GetPKeyShortURLBySiteID($SiteID, $Uri);
Input
$SiteID (int)
site id
$Uri (varchar(255))
short uri
Return
$ShortUrlID (int)
short url id (primary key)

GetPKeyShortURLsByContentObjectID

Returns primary keys of ShortURL by alternate keys ContentObjectID and LanguageID.

Syntax
$aKeys = GetPKeyShortURLsByContentObjectID($ContentObjectID, $LanguageID);
Input
$ContentObjectID (int)
object id
$LanguageID (int)
language id (optional)
Return
$aKeys (reference to array of int)
short url id (primary key)

GetPKeyShortURLsBySiteID

Returns primary keys of ShortURL by alternate keys SiteID and Uri.

Syntax
$aKeys = GetPKeyShortURLsBySiteID($SiteID, $Uri);
Input
$SiteID (int)
site id
$Uri (varchar(255))
short uri (optional)
Return
$aKeys (reference to array of int)
short url id (primary key)

InsertShortURL

Creates an entry of ShortURL.

Syntax
InsertShortURL($hShortURL);
Input
$hShortURL (reference to hash)
with following keys:
  • ShortUrlID - short url id (primary key)(optional)- int
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)

OnDeleteSite

Deletes ShortURL of this model when a(n) Site is deleted.

Syntax
OnDeleteSite($hParams);
Input
$hParams (ref.hash.*)
primary key of object Site, key is
  • SiteID

UpdateShortURL

Updates a(n) ShortURL if any element was changed.

Syntax
UpdateShortURL($ShortUrlID, $hShortURL);
UpdateShortURL($hShortURL); # if $hShortURL includes ShortUrlID
Input
$ShortUrlID (int)
short url id (primary key)
$hShortURL (reference to hash)
with following keys:
  • SiteID - site id - int
  • LanguageID - language id - int
  • ContentObjectID - object id - int
  • Uri - short uri - varchar(255)