Open Source Content Management System

mgd_is_guid

Description:

bool mgd_is_guid(string guid)

Minimum version: CVS HEAD

  • guid - string with object's guid value

Any variable type may be passed as function parameter. FALSE is returned when parameter is array, object , integer or even resource type. In such case , no warning message is thrown and function silently ignore incompatible type.

Returns TRUE if successful. Returns FALSE on failure.

<?php

$guid = "00832ec2787311da8c3a29a3852ca611a611";
if (mgd_is_guid($guid))
{
    $object = mgd_get_object_by_guid($guid);
}
?>

GUIDs may be 80 characters long strings to conform with the RFC 4122 UUIDs since Midgard 1.8

Guid property usage is kept for Midgard historical reason and for full backwards compatibility. UUID usage is described in Midgard #0018 RFC, Adopting the UUID and URN standards.

Designed by Nemein, hosted by Anykey