return false;
}
- static function getFeedAuthor($feedEl)
+ static function getFeedAuthor(DOMElement $feedEl)
{
// Try old and deprecated activity:subject
return null;
}
- static function compareTypes($type, $objects) // this does verbs too!
+ static function compareTypes($type, array $objects) // this does verbs too!
{
$type = self::resolveUri($type);
- foreach ((array)$objects as $object) {
+ foreach ($objects as $object) {
if ($type === self::resolveUri($object)) {
return true;
}
if (!empty($object)) {
Event::handle('EndFindLocalActivityObject', array($object->getUri(), $type, $object));
} else {
- throw new Exception('Could not find any activityobject stored locally with given URI');
+ throw new ServerException('Could not find any activityobject stored locally with given URI');
}
return $object;
}
return $profile;
}
+
+ static public function typeToTitle($type)
+ {
+ return ucfirst(self::resolveUri($type, true));
+ }
+
+ static public function verbToTitle($verb)
+ {
+ return ucfirst(self::resolveUri($verb, true));
+ }
}