Slightly better ActivityStreams JSON output

This commit is contained in:
Evan Prodromou
2013-06-04 17:00:51 -04:00
parent 08c72a00e8
commit cba2b1ad9c
3 changed files with 74 additions and 36 deletions

View File

@@ -778,4 +778,13 @@ class ActivityObject
}
return array_filter($object);
}
static function canonicalType($type) {
$ns = 'http://activitystrea.ms/schema/1.0/';
if (substr($type, 0, mb_strlen($ns)) == $ns) {
return substr($type, mb_strlen($ns));
} else {
return $type;
}
}
}