extends as $extended_interface) { $this->parent_interfaces[] = self::getAbsoluteClassFromName($extended_interface, $this->namespace, $this->aliased_classes); } } public static function interfaceExists($interface) { if (isset(self::$existing_interfaces_ci[strtolower($interface)])) { return self::$existing_interfaces_ci[strtolower($interface)]; } if (in_array($interface, self::$SPECIAL_TYPES)) { return false; } if (interface_exists($interface, true)) { $reflected_interface = new \ReflectionClass($interface); self::$existing_interfaces_ci[strtolower($interface)] = true; self::$existing_interfaces[$reflected_interface->getName()] = true; return true; } self::$existing_interfaces_ci[strtolower($interface)] = false; self::$existing_interfaces_ci[$interface] = false; return false; } public static function hasCorrectCasing($interface) { if (!self::interfaceExists(strtolower($interface))) { throw new \InvalidArgumentException('Cannot check casing on nonexistent class ' . $interface); } return isset(self::$existing_interfaces[$interface]); } public static function clearCache() { self::$existing_interfaces = []; self::$existing_interfaces_ci = []; } }