示例#1
0
 public static function serializeNamedObject($object)
 {
     if (strpos($object['domain'], '://') === false) {
         if (is_dir($object['domain'])) {
             $object['domain'] = "file://" . $object['domain'];
         } else {
             $object['domain'] = "http://" . $object['domain'];
         }
     }
     return sprintf("%s#%s", Tiki_Profile::getProfileKeyfor($object['domain'], $object['profile']), $object['object']);
 }
示例#2
0
 public static function serializeNamedObject($object)
 {
     return sprintf("%s#%s", Tiki_Profile::getProfileKeyfor($object['domain'], $object['profile']), $object['object']);
 }
示例#3
0
 function getRequiredProfiles($recursive = false, $known = array())
 {
     $profiles = array();
     foreach ($this->getExternalReferences() as $ext) {
         $key = Tiki_Profile::getProfileKeyfor($ext['domain'], $ext['profile']);
         if (array_key_exists($key, $known) || array_key_exists($key, $profiles)) {
             continue;
         }
         $profiles[$key] = self::fromNames($ext['domain'], $ext['profile']);
     }
     if ($recursive) {
         foreach ($profiles as $profile) {
             if (is_object($profile)) {
                 $profiles = array_merge($profiles, $profile->getRequiredProfiles(true, $profiles));
             }
         }
     }
     return $profiles;
 }