diff --git a/autoload.php b/autoload.php index ad0ccb8..b750de8 100644 --- a/autoload.php +++ b/autoload.php @@ -1,38 +1,43 @@ . /** * Minimal autoload (without functions) * * This is useful if you like creating frameworks. * * If you love creating bots instead, see the 'autoload-with-laser-cannon.php'. */ /** * Autoload classes on-demand */ spl_autoload_register( function( $name ) { // traits have not a dedicated class, so this trick autoloads them $name = str_replace( 'Trait', '', $name ); - $path = __DIR__ . "/include/class-$name.php"; + // classes are inside directories + // for example the class foo\Bar is inside path foo/Bar + // the '\\' is just an escape to get the literal '\' + $full_name = str_replace( '\\', '/', $name ); + + $path = __DIR__ . "/include/$full_name.php"; if( is_file( $path ) ) { require $path; } } ); diff --git "a/include/class-cli\\ConfigWizard.php" b/include/cli/ConfigWizard.php similarity index 100% rename from "include/class-cli\\ConfigWizard.php" rename to include/cli/ConfigWizard.php diff --git "a/include/class-cli\\Input.php" b/include/cli/Input.php similarity index 100% rename from "include/class-cli\\Input.php" rename to include/cli/Input.php diff --git "a/include/class-cli\\Log.php" b/include/cli/Log.php similarity index 100% rename from "include/class-cli\\Log.php" rename to include/cli/Log.php diff --git "a/include/class-cli\\Opts.php" b/include/cli/Opts.php similarity index 100% rename from "include/class-cli\\Opts.php" rename to include/cli/Opts.php diff --git "a/include/class-cli\\Param.php" b/include/cli/Param.php similarity index 100% rename from "include/class-cli\\Param.php" rename to include/cli/Param.php diff --git "a/include/class-cli\\ParamFlag.php" b/include/cli/ParamFlag.php similarity index 100% rename from "include/class-cli\\ParamFlag.php" rename to include/cli/ParamFlag.php diff --git "a/include/class-cli\\ParamFlagLong.php" b/include/cli/ParamFlagLong.php similarity index 100% rename from "include/class-cli\\ParamFlagLong.php" rename to include/cli/ParamFlagLong.php diff --git "a/include/class-cli\\ParamValued.php" b/include/cli/ParamValued.php similarity index 100% rename from "include/class-cli\\ParamValued.php" rename to include/cli/ParamValued.php diff --git "a/include/class-cli\\ParamValuedLong.php" b/include/cli/ParamValuedLong.php similarity index 100% rename from "include/class-cli\\ParamValuedLong.php" rename to include/cli/ParamValuedLong.php diff --git "a/include/class-generic\\Singleton.php" b/include/generic/Singleton.php similarity index 100% rename from "include/class-generic\\Singleton.php" rename to include/generic/Singleton.php diff --git "a/include/class-mw\\API.php" b/include/mw/API.php similarity index 100% rename from "include/class-mw\\API.php" rename to include/mw/API.php diff --git "a/include/class-mw\\API\\ArticleExistsException.php" b/include/mw/API/ArticleExistsException.php similarity index 100% rename from "include/class-mw\\API\\ArticleExistsException.php" rename to include/mw/API/ArticleExistsException.php diff --git "a/include/class-mw\\API\\BadTokenException.php" b/include/mw/API/BadTokenException.php similarity index 100% rename from "include/class-mw\\API\\BadTokenException.php" rename to include/mw/API/BadTokenException.php diff --git "a/include/class-mw\\API\\EditConflictException.php" b/include/mw/API/EditConflictException.php similarity index 100% rename from "include/class-mw\\API\\EditConflictException.php" rename to include/mw/API/EditConflictException.php diff --git "a/include/class-mw\\API\\Exception.php" b/include/mw/API/Exception.php similarity index 100% rename from "include/class-mw\\API\\Exception.php" rename to include/mw/API/Exception.php diff --git "a/include/class-mw\\API\\FailedSaveException.php" b/include/mw/API/FailedSaveException.php similarity index 100% rename from "include/class-mw\\API\\FailedSaveException.php" rename to include/mw/API/FailedSaveException.php diff --git "a/include/class-mw\\API\\MaxLagException.php" b/include/mw/API/MaxLagException.php similarity index 100% rename from "include/class-mw\\API\\MaxLagException.php" rename to include/mw/API/MaxLagException.php diff --git "a/include/class-mw\\API\\MissingTitleException.php" b/include/mw/API/MissingTitleException.php similarity index 100% rename from "include/class-mw\\API\\MissingTitleException.php" rename to include/mw/API/MissingTitleException.php diff --git "a/include/class-mw\\API\\ModificationFailedException.php" b/include/mw/API/ModificationFailedException.php similarity index 100% rename from "include/class-mw\\API\\ModificationFailedException.php" rename to include/mw/API/ModificationFailedException.php diff --git "a/include/class-mw\\API\\NoSuchEntityException.php" b/include/mw/API/NoSuchEntityException.php similarity index 100% rename from "include/class-mw\\API\\NoSuchEntityException.php" rename to include/mw/API/NoSuchEntityException.php diff --git "a/include/class-mw\\API\\PageCannotExistException.php" b/include/mw/API/PageCannotExistException.php similarity index 100% rename from "include/class-mw\\API\\PageCannotExistException.php" rename to include/mw/API/PageCannotExistException.php diff --git "a/include/class-mw\\API\\PageMatcher.php" b/include/mw/API/PageMatcher.php similarity index 100% rename from "include/class-mw\\API\\PageMatcher.php" rename to include/mw/API/PageMatcher.php diff --git "a/include/class-mw\\API\\PermissionDeniedException.php" b/include/mw/API/PermissionDeniedException.php similarity index 100% rename from "include/class-mw\\API\\PermissionDeniedException.php" rename to include/mw/API/PermissionDeniedException.php diff --git "a/include/class-mw\\API\\ProtectedPageException.php" b/include/mw/API/ProtectedPageException.php similarity index 100% rename from "include/class-mw\\API\\ProtectedPageException.php" rename to include/mw/API/ProtectedPageException.php diff --git "a/include/class-mw\\API\\ReadApiDeniedException.php" b/include/mw/API/ReadApiDeniedException.php similarity index 100% rename from "include/class-mw\\API\\ReadApiDeniedException.php" rename to include/mw/API/ReadApiDeniedException.php diff --git "a/include/class-mw\\API\\ReadOnlyException.php" b/include/mw/API/ReadOnlyException.php similarity index 100% rename from "include/class-mw\\API\\ReadOnlyException.php" rename to include/mw/API/ReadOnlyException.php diff --git "a/include/class-mw\\APIQuery.php" b/include/mw/APIQuery.php similarity index 100% rename from "include/class-mw\\APIQuery.php" rename to include/mw/APIQuery.php diff --git "a/include/class-mw\\CompleteTitle.php" b/include/mw/CompleteTitle.php similarity index 100% rename from "include/class-mw\\CompleteTitle.php" rename to include/mw/CompleteTitle.php diff --git "a/include/class-mw\\Ns.php" b/include/mw/Ns.php similarity index 100% rename from "include/class-mw\\Ns.php" rename to include/mw/Ns.php diff --git "a/include/class-mw\\NsPart.php" b/include/mw/NsPart.php similarity index 100% rename from "include/class-mw\\NsPart.php" rename to include/mw/NsPart.php diff --git "a/include/class-mw\\Site.php" b/include/mw/Site.php similarity index 100% rename from "include/class-mw\\Site.php" rename to include/mw/Site.php diff --git "a/include/class-mw\\StaticSite.php" b/include/mw/StaticSite.php similarity index 100% rename from "include/class-mw\\StaticSite.php" rename to include/mw/StaticSite.php diff --git "a/include/class-mw\\StaticWikibaseSite.php" b/include/mw/StaticWikibaseSite.php similarity index 100% rename from "include/class-mw\\StaticWikibaseSite.php" rename to include/mw/StaticWikibaseSite.php diff --git "a/include/class-mw\\Title.php" b/include/mw/Title.php similarity index 100% rename from "include/class-mw\\Title.php" rename to include/mw/Title.php diff --git "a/include/class-mw\\TitlePart.php" b/include/mw/TitlePart.php similarity index 100% rename from "include/class-mw\\TitlePart.php" rename to include/mw/TitlePart.php diff --git "a/include/class-mw\\TitlePartCapitalized.php" b/include/mw/TitlePartCapitalized.php similarity index 100% rename from "include/class-mw\\TitlePartCapitalized.php" rename to include/mw/TitlePartCapitalized.php diff --git "a/include/class-mw\\Tokens.php" b/include/mw/Tokens.php similarity index 100% rename from "include/class-mw\\Tokens.php" rename to include/mw/Tokens.php diff --git "a/include/class-mw\\WikibaseSite.php" b/include/mw/WikibaseSite.php similarity index 100% rename from "include/class-mw\\WikibaseSite.php" rename to include/mw/WikibaseSite.php diff --git "a/include/class-mw\\Wikilink.php" b/include/mw/Wikilink.php similarity index 100% rename from "include/class-mw\\Wikilink.php" rename to include/mw/Wikilink.php diff --git "a/include/class-mw\\Wikitext.php" b/include/mw/Wikitext.php similarity index 100% rename from "include/class-mw\\Wikitext.php" rename to include/mw/Wikitext.php diff --git "a/include/class-network\\ContentDisposition.php" b/include/network/ContentDisposition.php similarity index 100% rename from "include/class-network\\ContentDisposition.php" rename to include/network/ContentDisposition.php diff --git "a/include/class-network\\Exception.php" b/include/network/Exception.php similarity index 100% rename from "include/class-network\\Exception.php" rename to include/network/Exception.php diff --git "a/include/class-network\\HTTPRequest.php" b/include/network/HTTPRequest.php similarity index 100% rename from "include/class-network\\HTTPRequest.php" rename to include/network/HTTPRequest.php diff --git "a/include/class-network\\MissingResponseHeadersException.php" b/include/network/MissingResponseHeadersException.php similarity index 100% rename from "include/class-network\\MissingResponseHeadersException.php" rename to include/network/MissingResponseHeadersException.php diff --git "a/include/class-network\\NotOKException.php" b/include/network/NotOKException.php similarity index 100% rename from "include/class-network\\NotOKException.php" rename to include/network/NotOKException.php diff --git "a/include/class-network\\Status.php" b/include/network/Status.php similarity index 100% rename from "include/class-network\\Status.php" rename to include/network/Status.php diff --git "a/include/class-regex\\Generic.php" b/include/regex/Generic.php similarity index 100% rename from "include/class-regex\\Generic.php" rename to include/regex/Generic.php diff --git "a/include/class-wb\\Claim.php" b/include/wb/Claim.php similarity index 100% rename from "include/class-wb\\Claim.php" rename to include/wb/Claim.php diff --git "a/include/class-wb\\Claims.php" b/include/wb/Claims.php similarity index 100% rename from "include/class-wb\\Claims.php" rename to include/wb/Claims.php diff --git "a/include/class-wb\\DataModel.php" b/include/wb/DataModel.php similarity index 100% rename from "include/class-wb\\DataModel.php" rename to include/wb/DataModel.php diff --git "a/include/class-wb\\DataType.php" b/include/wb/DataType.php similarity index 100% rename from "include/class-wb\\DataType.php" rename to include/wb/DataType.php diff --git "a/include/class-wb\\DataValue.php" b/include/wb/DataValue.php similarity index 100% rename from "include/class-wb\\DataValue.php" rename to include/wb/DataValue.php diff --git "a/include/class-wb\\DataValueCommonsCategory.php" b/include/wb/DataValueCommonsCategory.php similarity index 100% rename from "include/class-wb\\DataValueCommonsCategory.php" rename to include/wb/DataValueCommonsCategory.php diff --git "a/include/class-wb\\DataValueCommonsMedia.php" b/include/wb/DataValueCommonsMedia.php similarity index 100% rename from "include/class-wb\\DataValueCommonsMedia.php" rename to include/wb/DataValueCommonsMedia.php diff --git "a/include/class-wb\\DataValueExternalID.php" b/include/wb/DataValueExternalID.php similarity index 100% rename from "include/class-wb\\DataValueExternalID.php" rename to include/wb/DataValueExternalID.php diff --git "a/include/class-wb\\DataValueGlobeCoordinate.php" b/include/wb/DataValueGlobeCoordinate.php similarity index 100% rename from "include/class-wb\\DataValueGlobeCoordinate.php" rename to include/wb/DataValueGlobeCoordinate.php diff --git "a/include/class-wb\\DataValueItem.php" b/include/wb/DataValueItem.php similarity index 100% rename from "include/class-wb\\DataValueItem.php" rename to include/wb/DataValueItem.php diff --git "a/include/class-wb\\DataValueMonolingualText.php" b/include/wb/DataValueMonolingualText.php similarity index 100% rename from "include/class-wb\\DataValueMonolingualText.php" rename to include/wb/DataValueMonolingualText.php diff --git "a/include/class-wb\\DataValueQuantity.php" b/include/wb/DataValueQuantity.php similarity index 100% rename from "include/class-wb\\DataValueQuantity.php" rename to include/wb/DataValueQuantity.php diff --git "a/include/class-wb\\DataValueString.php" b/include/wb/DataValueString.php similarity index 100% rename from "include/class-wb\\DataValueString.php" rename to include/wb/DataValueString.php diff --git "a/include/class-wb\\DataValueTime.php" b/include/wb/DataValueTime.php similarity index 100% rename from "include/class-wb\\DataValueTime.php" rename to include/wb/DataValueTime.php diff --git "a/include/class-wb\\Description.php" b/include/wb/Description.php similarity index 100% rename from "include/class-wb\\Description.php" rename to include/wb/Description.php diff --git "a/include/class-wb\\DescriptionAction.php" b/include/wb/DescriptionAction.php similarity index 100% rename from "include/class-wb\\DescriptionAction.php" rename to include/wb/DescriptionAction.php diff --git "a/include/class-wb\\Descriptions.php" b/include/wb/Descriptions.php similarity index 100% rename from "include/class-wb\\Descriptions.php" rename to include/wb/Descriptions.php diff --git "a/include/class-wb\\Item.php" b/include/wb/Item.php similarity index 100% rename from "include/class-wb\\Item.php" rename to include/wb/Item.php diff --git "a/include/class-wb\\Label.php" b/include/wb/Label.php similarity index 100% rename from "include/class-wb\\Label.php" rename to include/wb/Label.php diff --git "a/include/class-wb\\LabelAction.php" b/include/wb/LabelAction.php similarity index 100% rename from "include/class-wb\\LabelAction.php" rename to include/wb/LabelAction.php diff --git "a/include/class-wb\\Labels.php" b/include/wb/Labels.php similarity index 100% rename from "include/class-wb\\Labels.php" rename to include/wb/Labels.php diff --git "a/include/class-wb\\Reference.php" b/include/wb/Reference.php similarity index 100% rename from "include/class-wb\\Reference.php" rename to include/wb/Reference.php diff --git "a/include/class-wb\\References.php" b/include/wb/References.php similarity index 100% rename from "include/class-wb\\References.php" rename to include/wb/References.php diff --git "a/include/class-wb\\Sitelink.php" b/include/wb/Sitelink.php similarity index 100% rename from "include/class-wb\\Sitelink.php" rename to include/wb/Sitelink.php diff --git "a/include/class-wb\\Sitelinks.php" b/include/wb/Sitelinks.php similarity index 100% rename from "include/class-wb\\Sitelinks.php" rename to include/wb/Sitelinks.php diff --git "a/include/class-wb\\Snak.php" b/include/wb/Snak.php similarity index 100% rename from "include/class-wb\\Snak.php" rename to include/wb/Snak.php diff --git "a/include/class-wb\\SnakCommonsCategory.php" b/include/wb/SnakCommonsCategory.php similarity index 100% rename from "include/class-wb\\SnakCommonsCategory.php" rename to include/wb/SnakCommonsCategory.php diff --git "a/include/class-wb\\SnakCommonsMedia.php" b/include/wb/SnakCommonsMedia.php similarity index 100% rename from "include/class-wb\\SnakCommonsMedia.php" rename to include/wb/SnakCommonsMedia.php diff --git "a/include/class-wb\\SnakExternalID.php" b/include/wb/SnakExternalID.php similarity index 100% rename from "include/class-wb\\SnakExternalID.php" rename to include/wb/SnakExternalID.php diff --git "a/include/class-wb\\SnakGlobeCoordinate.php" b/include/wb/SnakGlobeCoordinate.php similarity index 100% rename from "include/class-wb\\SnakGlobeCoordinate.php" rename to include/wb/SnakGlobeCoordinate.php diff --git "a/include/class-wb\\SnakItem.php" b/include/wb/SnakItem.php similarity index 100% rename from "include/class-wb\\SnakItem.php" rename to include/wb/SnakItem.php diff --git "a/include/class-wb\\SnakMonolingualText.php" b/include/wb/SnakMonolingualText.php similarity index 100% rename from "include/class-wb\\SnakMonolingualText.php" rename to include/wb/SnakMonolingualText.php diff --git "a/include/class-wb\\SnakQuantity.php" b/include/wb/SnakQuantity.php similarity index 100% rename from "include/class-wb\\SnakQuantity.php" rename to include/wb/SnakQuantity.php diff --git "a/include/class-wb\\SnakString.php" b/include/wb/SnakString.php similarity index 100% rename from "include/class-wb\\SnakString.php" rename to include/wb/SnakString.php diff --git "a/include/class-wb\\SnakTime.php" b/include/wb/SnakTime.php similarity index 100% rename from "include/class-wb\\SnakTime.php" rename to include/wb/SnakTime.php diff --git "a/include/class-wb\\SnakURL.php" b/include/wb/SnakURL.php similarity index 100% rename from "include/class-wb\\SnakURL.php" rename to include/wb/SnakURL.php diff --git "a/include/class-wb\\Snaks.php" b/include/wb/Snaks.php similarity index 100% rename from "include/class-wb\\Snaks.php" rename to include/wb/Snaks.php diff --git "a/include/class-wb\\Statement.php" b/include/wb/Statement.php similarity index 100% rename from "include/class-wb\\Statement.php" rename to include/wb/Statement.php diff --git "a/include/class-wb\\StatementCommonsCategory.php" b/include/wb/StatementCommonsCategory.php similarity index 100% rename from "include/class-wb\\StatementCommonsCategory.php" rename to include/wb/StatementCommonsCategory.php diff --git "a/include/class-wb\\StatementCommonsMedia.php" b/include/wb/StatementCommonsMedia.php similarity index 100% rename from "include/class-wb\\StatementCommonsMedia.php" rename to include/wb/StatementCommonsMedia.php diff --git "a/include/class-wb\\StatementExternalID.php" b/include/wb/StatementExternalID.php similarity index 100% rename from "include/class-wb\\StatementExternalID.php" rename to include/wb/StatementExternalID.php diff --git "a/include/class-wb\\StatementGlobeCoordinate.php" b/include/wb/StatementGlobeCoordinate.php similarity index 100% rename from "include/class-wb\\StatementGlobeCoordinate.php" rename to include/wb/StatementGlobeCoordinate.php diff --git "a/include/class-wb\\StatementItem.php" b/include/wb/StatementItem.php similarity index 100% rename from "include/class-wb\\StatementItem.php" rename to include/wb/StatementItem.php diff --git "a/include/class-wb\\StatementMonolingualText.php" b/include/wb/StatementMonolingualText.php similarity index 100% rename from "include/class-wb\\StatementMonolingualText.php" rename to include/wb/StatementMonolingualText.php diff --git "a/include/class-wb\\StatementQuantity.php" b/include/wb/StatementQuantity.php similarity index 100% rename from "include/class-wb\\StatementQuantity.php" rename to include/wb/StatementQuantity.php diff --git "a/include/class-wb\\StatementString.php" b/include/wb/StatementString.php similarity index 100% rename from "include/class-wb\\StatementString.php" rename to include/wb/StatementString.php diff --git "a/include/class-wb\\StatementTime.php" b/include/wb/StatementTime.php similarity index 100% rename from "include/class-wb\\StatementTime.php" rename to include/wb/StatementTime.php diff --git "a/include/class-wb\\WrongDataException.php" b/include/wb/WrongDataException.php similarity index 100% rename from "include/class-wb\\WrongDataException.php" rename to include/wb/WrongDataException.php diff --git "a/include/class-web\\LandscapeforWiki.php" b/include/web/LandscapeforWiki.php similarity index 100% rename from "include/class-web\\LandscapeforWiki.php" rename to include/web/LandscapeforWiki.php diff --git "a/include/class-web\\MediaWikis.php" b/include/web/MediaWikis.php similarity index 100% rename from "include/class-web\\MediaWikis.php" rename to include/web/MediaWikis.php diff --git "a/include/class-web\\WikimediaCH.php" b/include/web/WikimediaCH.php similarity index 100% rename from "include/class-web\\WikimediaCH.php" rename to include/web/WikimediaCH.php diff --git "a/include/class-wm\\Commons.php" b/include/wm/Commons.php similarity index 100% rename from "include/class-wm\\Commons.php" rename to include/wm/Commons.php diff --git "a/include/class-wm\\MetaWiki.php" b/include/wm/MetaWiki.php similarity index 100% rename from "include/class-wm\\MetaWiki.php" rename to include/wm/MetaWiki.php diff --git "a/include/class-wm\\Wikidata.php" b/include/wm/Wikidata.php similarity index 100% rename from "include/class-wm\\Wikidata.php" rename to include/wm/Wikidata.php diff --git "a/include/class-wm\\WikipediaDe.php" b/include/wm/WikipediaDe.php similarity index 100% rename from "include/class-wm\\WikipediaDe.php" rename to include/wm/WikipediaDe.php diff --git "a/include/class-wm\\WikipediaEn.php" b/include/wm/WikipediaEn.php similarity index 100% rename from "include/class-wm\\WikipediaEn.php" rename to include/wm/WikipediaEn.php diff --git "a/include/class-wm\\WikipediaEs.php" b/include/wm/WikipediaEs.php similarity index 100% rename from "include/class-wm\\WikipediaEs.php" rename to include/wm/WikipediaEs.php diff --git "a/include/class-wm\\WikipediaFr.php" b/include/wm/WikipediaFr.php similarity index 100% rename from "include/class-wm\\WikipediaFr.php" rename to include/wm/WikipediaFr.php diff --git "a/include/class-wm\\WikipediaIt.php" b/include/wm/WikipediaIt.php similarity index 100% rename from "include/class-wm\\WikipediaIt.php" rename to include/wm/WikipediaIt.php