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:----w2zPQOx2KQYsUqJlVzHv0TbT6oQlgXRauh402ZZUf4wJGQfXOZhtT4jhU4f6D8kEawXVYZntiG4BqEzrdna/d8q7zH0dos+V2yBHKtpc9/1yfqiMGHFp7Up7soc2mMae6XK5/M1SpyVA43KwxvmFeRghMVMqA1pxsxM9sEG8MGjPEEVSQ3nWoI3szkOIFf1Yiv+U6aTXFo9tuETEBvd1mvIG0K0bNLo2h2fh4hlapl7+gWwwH/eotfZ+3bo7y8uIu9U5s7SL8Ng+yHQ6IgS7+w6GA89RaGE76dr77El4/g4OS1CReubSarpsEmJ6Tap6NLeUoHTg5mSohOyZEm3sfzxIPOd+Fn7j+hocH72Bw4ieAvwq6JDq16WkL4qOlcEmza8MJ/6/4gmE0+s4AYIVRdYPPFSw3RoiofiaIAq+yObXFgdGERCh+9t3NK3HBg0vwpoPdSnc0bMsT5JyC/NELxr+i80PKhRDmgv2hIVRCIx+Nt0BENyQyy7cLn0jxrmcoeOajP8/J5Pixh6AE7zK4ZAQK4+lJkwADyBdkxhJctLLBdqaszxHWkt5Jn3MDYwt6r90g+UJMBa9y55x/pOiLy4bhUzVjnGCz5Q1SibB9usLVV0/m2pKmmw2VB1UyGvH88qo8OcJ7A0TBSYrUDYpl9LrYDgtDkdkindrN0Lohs8=----ATTACHMENT:----NzcyNjE2MDE0NDg3ODc4NSA3NjY3NzIwNDQ3OTcxNDAgNDk1MzY0NzQ2NDYyNDMzOA==