]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityutils.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / activityutils.php
index feb74f303f3d22d1f36fdae36e025593818797a0..a0fc4872328e0f5103aea0797727098e9f5196db 100644 (file)
@@ -300,7 +300,7 @@ class ActivityUtils
         return false;
     }
 
-    static function getFeedAuthor($feedEl)
+    static function getFeedAuthor(DOMElement $feedEl)
     {
         // Try old and deprecated activity:subject
 
@@ -347,10 +347,10 @@ class ActivityUtils
         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;
             }
@@ -433,4 +433,14 @@ class ActivityUtils
 
         return $profile;
     }
+
+    static public function typeToTitle($type)
+    {
+        return ucfirst(self::resolveUri($type, true));
+    }
+
+    static public function verbToTitle($verb)
+    {
+        return ucfirst(self::resolveUri($verb, true));
+    }
 }