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']); }
public static function serializeNamedObject($object) { return sprintf("%s#%s", Tiki_Profile::getProfileKeyfor($object['domain'], $object['profile']), $object['object']); }
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; }