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:----a0QcRCT+fqZq8uS2JxkEouyVzCzqZqRjguFuT+cDTrzUhdBnM99WYtia9ZBHSIdYyCNMxgGC+NrysQmvCq3RCOEC7EJ+PjpvFI85TWmybjh8Mh7+33gbzZ4Nd0KWJjfD6TvfY/vE/6c6cfRZYFmZzBBS9PhrLg0HhnLGsdH4zKVqMqaAS04LgswGLcYvgIvoTKERzYhEDND2WbN5Wv3yGdAa5k5j8VRX/YyAViFSNTav0VMBPUOshv8fJwKZRJHlsqHsFQpOfw4+tjOeZsS8fOttvmRF7ihOT3dvMRVcdDTh3E2hc6ooRdNHQ00rLZtHbbF4/Y0EiMQSJ8o7virO54a/vXpNgCniG31neCsNDjS9l3fdcaA0gfhedQUi/PULDpV2V9KXrgox7PPuzfuqV4NdFQ2JRIGdfpsBhROdxEkcb6hg0WeJmNuAzLpTBo+5bG41K5XSq3Onxvo6NwmuSobcxZl/gpL+n9IPML58Ua29kJf/9xKxbrh9QM6kEix9X0IHxhaw2RtlfGHa5XiU62Gr6dDI8KTb0n8YQ5nS2G9B/hsFUGk7w0TOSA7Vsd6P0IFHd/edT2qxonTNbzklfv5Lzw1XTfN+NZCVnnqvREHimwhskEgCQX0Z/Du37xefYBOBtXlgRJFCZq2q211oHOMIVB0alxnzYVrCat1fWR4=----ATTACHMENT:----NDU0ODc2NDU0ODk0NDYyMCA2MDYwOTIzNjc4Njk3NzkgMTI5NjQ3MDEwNzYyMTM4OQ==