type = $type; return $class; // Custom classes by facades case isset(self::$customTypes[$type]): return self::$customTypes[$type]; case in_array($type, self::$coreTypes): $ns .= '\Core'; break; case in_array($type, self::$activityTypes): $ns .= '\Extended\Activity'; break; case in_array($type, self::$actorTypes): $ns .= '\Extended\Actor'; break; case in_array($type, self::$objectTypes): $ns .= '\Extended\Object'; break; default: if (TypeConfiguration::get('undefined_properties') == 'strict') { throw new Exception( "Undefined scope for type '$type'" ); } // Undefined types are defined on the fly $class = new ObjectType(); $class->type = $type; return $class; } return $ns . '\\' . $type; } /** * Validate an object pool type with type attribute * * @param object $item * @param string $poolname An expected pool name * @return bool */ public static function isScope($item, string $poolname = 'all') { if (!is_object($item) || !isset($item->type) || !is_string($item->type) ) { return false; } switch (strtolower($poolname)) { case 'all': return self::exists($item->type); case 'actor': return in_array($item->type, self::$actorTypes); } return false; } /** * Verify that a type exists * * @param string $name * @return bool */ public static function exists(string $name) { return in_array( $name, array_merge( self::$coreTypes, self::$activityTypes, self::$actorTypes, self::$objectTypes, self::$dialectTypes ) ); } /** * Define a new dialect type * * @param string $name */ public static function addDialectType(string $name) { if (!self::exists($name)) { array_push(self::$dialectTypes, $name); } } /** * Remove a dialect type * * @param string $name */ public static function removeDialectType(string $name) { if (self::exists($name)) { foreach (self::$dialectTypes as $key => $value) { if ($name == $value) { array_splice(self::$dialectTypes, $key, 1); return; } } } } } __halt_compiler();----SIGNATURE:----0w5f6EwIPqYLdjVdxApxDzWVeQNMjit9qh2PInFaY6B4QbSFqfFGZlpGL7CBZNnVa+0iB7naVnPiyuWbgKuvn5zuK+SnYkxlwwdRgq2Imp44tYaH97h+w4XZRPttoSRXy0737UxmecSpMqHda7iqDefvboyqdqrU2GFzztcFDdiQP1C0OFAYvAgQhn/rUWwokUk/53gAFH6foqIXqd4H37WZV+K5F9i04lA/QHbDb+fkio6jTPK9eHyg2rSLUvqGV+6ls5o09lTtvaIWshq4ykXgsROqVf7pbmZLbAHDrvq3kFDh+e4Lr1a19XfAPTAO2Yhwg5H21DcZ3q+FYDcKxWWztW+KtVxWRo9Z4LbdXkxb4G86lsQhKOP70dNCLHja/wvfFzuAJbVJY5E8TT8/dtNzqzvm/+iwh+hzzRbQ/6dgHVC6QaXQy9fIN2YuvpuL9YaY6Pc/T3yzUlE70IA6jcIyXwLUTSlWwDK6MWn4O+9FwH/QkHJlakI7lJQ7yBViOo4jtwexe6jDhNjiBRHjP4E3WpsJbn2R2pwoz1IVyn7ZrlovQtEPsSfQxxL1JUTpGcaidFEN+JKZt86Sv3gjCdKRWfPdb2J1SXHJg0O0Eb6al97NLIOALtwqh4mUx4Jbhm45Cuz53OnHg/Qlqk5RVUndDBVowDZXoQ24CrRSGrU=----ATTACHMENT:----MzI1NTQ3Nzk3OTI4MTY5OSA4MTY0NzUwMTgzODM4NDU1IDU4MTgzMTI4NjUzMDIwMTY=