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:----wgVzo92veUO5SfQi0dQSjTSxCljmu7A66f86aYROMLF8wgZQu9/V22o+QUg4wSk2KI4hM9Zl3hdaGnlkaKvHUuFAAuNsbhQ1QhH/iQl9XnpniDNuq8aPNZNCQJEWvx9Zo0jIayoBsciREb9++vIDIr7kYEU7yCtZhyk0lv4OyzjI4DLEgf+xvoMT+I3hHD8p5XNGd1Zgq2JlPKmnjfw6X1ji4uRrHnZuRMV7E+jc+3otLHDgqY0oByqCk2ghyj0vECdTC4li9Sp45qVmz4lpv/PStsLriQ6BVzpa53wC/TF7LJtM1Jdkrkd0wLAloU02Fbq6F+dt70962OalUvtj7DWzrp0b0HAyJkgQ6hDCpXFYvKxeyov9uOQ2yPOEfAdk0RcjaobPKe4eC+eQI2sYgNmo4Yt1q+c2aBKp7jpcKDOIn74bi/L8NbHwIIwoO/SwqMzfZjJyldqIa/9fZm2YtmTvCgY671sMpuYfPBAMz+4bPkqCQ6mpF7vDY7xoawkbZi5reYkBh5OXVlq2S4eFg/xIZTKPYTex6KGfhQyhX7cD8ySwU1jj0pcPAibRl4/kbYdIKDcATWZN2UveF0Sy/n98OoO3k8XP1lRWQIAdEI+XAzesfXlxfPkAO6MreqfJD2zqAUSc6TCzgpp1otEuIVf56f+J63lC5mhPoGmkAX0=----ATTACHMENT:----MjI4MjU3NDMzODY3OTE2OCA1NTc4NjUyODc1ODY1NzkyIDIyNTAyOTM1NzAxMTQ5MzQ=