diff options
Diffstat (limited to 'bin/wiki/vendor/addwiki/mediawiki-datamodel')
39 files changed, 3036 insertions, 0 deletions
diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/.gitignore b/bin/wiki/vendor/addwiki/mediawiki-datamodel/.gitignore new file mode 100644 index 00000000..014936d3 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/.gitignore @@ -0,0 +1,5 @@ +.idea +vendor +composer.lock +test.php +docs/_build diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/.scrutinizer.yml b/bin/wiki/vendor/addwiki/mediawiki-datamodel/.scrutinizer.yml new file mode 100644 index 00000000..ffc976e3 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/.scrutinizer.yml @@ -0,0 +1,13 @@ +inherit: true + +tools: + php_code_sniffer: true + php_cpd: true + php_cs_fixer: true + php_loc: true + php_mess_detector: true + php_pdepend: true + php_analyzer: true + sensiolabs_security_checker: true + external_code_coverage: + timeout: 300
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/.travis.yml b/bin/wiki/vendor/addwiki/mediawiki-datamodel/.travis.yml new file mode 100644 index 00000000..a58745e1 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/.travis.yml @@ -0,0 +1,25 @@ +language: php + +php: + - hhvm + - 5.5 + - 5.6 + - 7.0 + - 7.1 + +before_script: + - composer install + +script: + - ./vendor/bin/phpunit --coverage-clover=coverage.clover + +after_script: + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover coverage.clover + +notifications: + irc: + channels: + - "chat.freenode.net##add" + on_success: change + on_failure: always diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/LICENSE.md b/bin/wiki/vendor/addwiki/mediawiki-datamodel/LICENSE.md new file mode 100644 index 00000000..0671f06a --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/LICENSE.md @@ -0,0 +1,264 @@ +The GNU General Public License, Version 2, June 1991 (GPLv2) +============================================================ + +> Copyright (C) 1989, 1991 Free Software Foundation, Inc. +> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +Preamble +-------- + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + + +Terms And Conditions For Copying, Distribution And Modification +--------------------------------------------------------------- + +**0.** This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's source code +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the Program +a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +**2.** You may modify your copy or copies of the Program or any portion of it, +thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you also +meet all of these conditions: + +* **a)** You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + +* **b)** You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, to + be licensed as a whole at no charge to all third parties under the terms of + this License. + +* **c)** If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +**3.** You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you also do one of the following: + +* **a)** Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above on + a medium customarily used for software interchange; or, + +* **b)** Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + +* **c)** Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only for + noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not signed +it. However, nothing else grants you permission to modify or distribute the +Program or its derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these terms and +conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties to this License. + +**7.** If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution of +the Program by all those who receive copies directly or indirectly through you, +then the only way you could satisfy both it and this License would be to refrain +entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +**9.** The Free Software Foundation may publish revised and/or new versions of +the General Public License from time to time. Such new versions will be similar +in spirit to the present version, but may differ in detail to address new +problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + + +No Warranty +----------- + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/README.md b/bin/wiki/vendor/addwiki/mediawiki-datamodel/README.md new file mode 100644 index 00000000..f0fdf1b1 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/README.md @@ -0,0 +1,17 @@ +mediawiki-datamodel +================== +[![Build Status](https://travis-ci.org/addwiki/mediawiki-datamodel.png?branch=master)](https://travis-ci.org/addwiki/mediawiki-datamodel) +[![Code Coverage](https://scrutinizer-ci.com/g/addwiki/mediawiki-datamodel/badges/coverage.png?s=ce4091cc4471ee9feff0c5fd963101c93bf54080)](https://scrutinizer-ci.com/g/addwiki/mediawiki-datamodel/) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/addwiki/mediawiki-datamodel/badges/quality-score.png?s=9383c67ac0068ac3052243cd636e05eafd505b80)](https://scrutinizer-ci.com/g/addwiki/mediawiki-datamodel/) + +On Packagist: +[![Latest Stable Version](https://poser.pugx.org/addwiki/mediawiki-datamodel/version.png)](https://packagist.org/packages/addwiki/mediawiki-datamodel) +[![Download count](https://poser.pugx.org/addwiki/mediawiki-datamodel/d/total.png)](https://packagist.org/packages/addwiki/mediawiki-datamodel) + +Issue tracker: https://phabricator.wikimedia.org/project/profile/1490/ + +## Installation + +Use composer to install the library and all its dependencies: + + composer require "addwiki/mediawiki-datamodel:~0.7.0" diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/RELEASENOTES.md b/bin/wiki/vendor/addwiki/mediawiki-datamodel/RELEASENOTES.md new file mode 100644 index 00000000..08df4aab --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/RELEASENOTES.md @@ -0,0 +1,88 @@ +These are the release notes for the [mediawiki-datamodel](README.md). + +## Version 0.7.1 (10th January 2017) + +* [T184567](https://phabricator.wikimedia.org/T184567) `User` objects can now be created with a `null` `$registration`. + +## Version 0.7 (8th March 2017) + +#### New features + +* Add NamespaceInfo class + +## Version 0.6 (2015-09-04) + +#### Compatibility changes + +* Log object now takes a PageIdentifier object instead of a Page object + +#### Deprecations + +* Title::getTitle is deprecated + +#### New features + +* Implemented File class +* Implemented Redirect class +* Title::getText introduced to replace getTitle +* Log now implements JsonSerializable +* LogList now implements JsonSerializable +* Title now implements JsonSerializable +* PageIdentifier now implements JsonSerializable + +## Version 0.5 (2015-01-13) + +#### Compatibility changes + +* Revision objects now require a PageIdentifier object instead of a $pageId int +* Page objects now require a PageIdentifier objects instead of a $title and $pageId +* Content getNativeData renamed to getData +* Content constructor changed, now takes data and optional model +* Content has new method getModel in places of random constants +* Removed WikitextContent class. Content is no longer abstract. + +#### New features + +* Implemented Log class +* Implemented LogList class +* Introduce PageIdentifier class +* Page objects can be constructed without a Revisions object + +## Version 0.4 (2014-07-08) + +* Page objects now ONLY accept a Title object for $title in their constructor. +* InvalidArgumentExceptions are now thrown when objects are constructed with the wrong types. +* User objects now split up implicitgroups and regular groups, thus $groups is now array[] + + +## Version 0.3 (2014-06-24) + +#### Compatibility changes + +* Revision objects now take a Content object as $content + +#### Additions + +* Content class +* WikitextContent class +* Pages class + + +## Version 0.2 (2014-02-23) + +#### Compatibility changes + +* Revision enhanced to allow more flexibility, Constructor and public functions have changed +* contentmodel has been removed from the Page class + + +## Version 0.1 (2014-02-23) + +Initial release with the following features: + +* EditInfo +* Page +* Revision +* Revisions +* Title +* User diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/composer.json b/bin/wiki/vendor/addwiki/mediawiki-datamodel/composer.json new file mode 100644 index 00000000..9ac4e519 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/composer.json @@ -0,0 +1,32 @@ +{ + "name": "addwiki/mediawiki-datamodel", + "type": "library", + "description": "A Mediawiki datamodel", + "keywords": ["Mediawiki"], + "license": "GPL-2.0+", + "authors": [ + { + "name": "Addshore" + } + ], + "autoload": { + "psr-4": { + "Mediawiki\\DataModel\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Mediawiki\\DataModel\\Test\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "0.7.x-dev" + } + }, + "require-dev": { + "phpunit/phpunit": "~4.8.0|~5.3.0", + "jakub-onderka/php-parallel-lint": "0.9.2", + "mediawiki/mediawiki-codesniffer": "^13.0" + } +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/Makefile b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/Makefile new file mode 100644 index 00000000..af9b9d0b --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/Makefile @@ -0,0 +1,225 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/mediawiki-datamodel.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/mediawiki-datamodel.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/mediawiki-datamodel" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/mediawiki-datamodel" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/conf.py b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/conf.py new file mode 100644 index 00000000..1f465d00 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/conf.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +import sys, os +from sphinx.highlighting import lexers +from pygments.lexers.web import PhpLexer + +lexers['php'] = PhpLexer(startinline=True, linenos=1) +lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) +primary_domain = 'php' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'mediawiki-datamodel' +copyright = '2016, addwiki' +author = 'addwiki' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.6' +# The full version, including alpha/beta/rc tags. +release = '0.6' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'default' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = 'mediawiki-datamodeldoc' diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/index.rst b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/index.rst new file mode 100644 index 00000000..c862502f --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/index.rst @@ -0,0 +1,22 @@ +.. mediawiki-datamodel documentation master file, created by + sphinx-quickstart on Sat Oct 1 18:15:20 2016. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to mediawiki-datamodel's documentation! +=============================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/make.bat b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/make.bat new file mode 100644 index 00000000..6ff153c5 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/docs/make.bat @@ -0,0 +1,281 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^<target^>` where ^<target^> is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. epub3 to make an epub3 + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. xml to make Docutils-native XML files + echo. pseudoxml to make pseudoxml-XML files for display purposes + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + echo. coverage to run coverage check of the documentation if enabled + echo. dummy to check syntax errors of document sources + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + + +REM Check if sphinx-build is available and fallback to Python version if any +%SPHINXBUILD% 1>NUL 2>NUL +if errorlevel 9009 goto sphinx_python +goto sphinx_ok + +:sphinx_python + +set SPHINXBUILD=python -m sphinx.__init__ +%SPHINXBUILD% 2> nul +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +:sphinx_ok + + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\mediawiki-datamodel.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\mediawiki-datamodel.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "epub3" ( + %SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3 + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub3 file is in %BUILDDIR%/epub3. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdf" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdfja" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf-ja + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +if "%1" == "coverage" ( + %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage + if errorlevel 1 exit /b 1 + echo. + echo.Testing of coverage in the sources finished, look at the ^ +results in %BUILDDIR%/coverage/python.txt. + goto end +) + +if "%1" == "xml" ( + %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The XML files are in %BUILDDIR%/xml. + goto end +) + +if "%1" == "pseudoxml" ( + %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. + goto end +) + +if "%1" == "dummy" ( + %SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. Dummy builder generates no files. + goto end +) + +:end diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/phpunit.xml.dist b/bin/wiki/vendor/addwiki/mediawiki-datamodel/phpunit.xml.dist new file mode 100644 index 00000000..d8bbce08 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/phpunit.xml.dist @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit bootstrap="./vendor/autoload.php" colors="true"> + <testsuites> + <testsuite name="addwiki/mediawiki-datamodel"> + <directory suffix="Test.php">./tests</directory> + </testsuite> + </testsuites> + <filter> + <whitelist addUncoveredFilesFromWhitelist="true"> + <directory suffix=".php">src</directory> + </whitelist> + </filter> +</phpunit>
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Content.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Content.php new file mode 100644 index 00000000..c1372d46 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Content.php @@ -0,0 +1,83 @@ +<?php + +namespace Mediawiki\DataModel; + +use LogicException; + +/** + * Class Representing the content of a revision + * @author Addshore + */ +class Content { + + /** + * @var string sha1 hash of the object content upon creation + */ + private $initialHash; + + /** + * @var mixed + */ + private $data; + + /** + * @var string|null + */ + private $model; + + /** + * Should always be called AFTER overriding constructors so a hash can be created + * + * @param mixed $data + * @param string|null $model + */ + public function __construct( $data, $model = null ) { + $this->data = $data; + $this->model = $model; + $this->initialHash = $this->getHash(); + } + + /** + * @return string + */ + public function getModel() { + return $this->model; + } + + /** + * Returns a sha1 hash of the content + * + * @throws LogicException + * @return string + */ + public function getHash() { + $data = $this->getData(); + if( is_object( $data ) ) { + if( method_exists( $data, 'getHash' ) ) { + return $data->getHash(); + } else { + return sha1( serialize( $data ) ); + } + } + if( is_string( $data ) ) { + return sha1( $data ); + } + throw new LogicException( "Cant get hash for data of type: " . gettype( $data ) ); + } + + /** + * Has the content been changed since object construction (this shouldn't happen!) + * @return bool + */ + public function hasChanged() { + return $this->initialHash !== $this->getHash(); + } + + /** + * @return mixed + */ + public function getData() { + return $this->data; + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/EditInfo.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/EditInfo.php new file mode 100644 index 00000000..b6ba7845 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/EditInfo.php @@ -0,0 +1,79 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; + +/** + * Represents flags that can be used when edits are made + * @author Addshore + */ +class EditInfo { + + //minor flags + const MINOR = true; + const NOTMINOR = false; + //bot flags + const BOT = true; + const NOTBOT = false; + + /** + * @var EditInfo::MINOR|self::NOTMINOR + */ + protected $minor = false; + + /** + * @var EditInfo::BOT|self::NOTBOT + */ + protected $bot = false; + + /** + * @var string + */ + protected $summary = null; + + /** + * @param string $summary + * @param bool $minor + * @param bool $bot + * + * @throws InvalidArgumentException + */ + public function __construct( $summary = '', $minor = self::NOTMINOR, $bot = self::NOTBOT ) { + if( !is_string( $summary ) ) { + throw new InvalidArgumentException( '$summary must be a string' ); + } + if( !is_bool( $minor ) ) { + throw new InvalidArgumentException( '$minor must be a bool' ); + } + if( !is_bool( $bot ) ) { + throw new InvalidArgumentException( '$bot must be a bool' ); + } + + $this->summary = $summary; + $this->bot = $bot; + $this->minor = $minor; + } + + /** + * @return EditInfo::BOT|self::NOTBOT + */ + public function getBot() { + return $this->bot; + } + + /** + * @return EditInfo::MINOR|self::NOTMINOR + */ + public function getMinor() { + return $this->minor; + } + + /** + * @return string + */ + public function getSummary() { + return $this->summary; + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/File.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/File.php new file mode 100644 index 00000000..7851b3b8 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/File.php @@ -0,0 +1,37 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; + +/** + * @author Addshore + */ +class File extends Page { + + /** + * @var string + */ + private $url; + + /** + * @param string $url + * @param PageIdentifier $pageIdentifier + * @param Revisions $revisions + */ + public function __construct( $url, PageIdentifier $pageIdentifier = null, Revisions $revisions = null ) { + parent::__construct( $pageIdentifier, $revisions ); + if( !is_string( $url ) ) { + throw new InvalidArgumentException( '$url must be a string' ); + } + $this->url = $url; + } + + /** + * @return string + */ + public function getUrl() { + return $this->url; + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Log.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Log.php new file mode 100644 index 00000000..d3e48637 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Log.php @@ -0,0 +1,171 @@ +<?php + +namespace Mediawiki\DataModel; + +use JsonSerializable; + +/** + * @since 0.5 + */ +class Log implements JsonSerializable { + + /** + * @var int + */ + private $id; + + /** + * @var string + */ + private $type; + + /** + * @var string + */ + private $action; + + /** + * @var string + */ + private $timestamp; + + /** + * @var string + */ + private $user; + + /** + * @var string + */ + private $comment; + + /** + * @var PageIdentifier + */ + private $pageIdentifier; + + /** + * @var array + */ + private $details; + + /** + * @param int $id + * @param string $type + * @param string $action + * @param string $timestamp + * @param string $user + * @param PageIdentifier $pageIdentifier + * @param string $comment + * @param array $details + */ + public function __construct( $id, $type, $action, $timestamp, $user, $pageIdentifier, $comment, $details ) { + $this->id = $id; + $this->type = $type; + $this->action = $action; + $this->timestamp = $timestamp; + $this->user = $user; + $this->pageIdentifier = $pageIdentifier; + $this->comment = $comment; + $this->details = $details; + } + + /** + * @since 0.5 + * @return string + */ + public function getUser() { + return $this->user; + } + + /** + * @since 0.5 + * @return string + */ + public function getAction() { + return $this->action; + } + + /** + * @since 0.5 + * @return string + */ + public function getComment() { + return $this->comment; + } + + /** + * @since 0.5 + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * @since 0.6 + * @return PageIdentifier + */ + public function getPageIdentifier() { + return $this->pageIdentifier; + } + + /** + * @since 0.5 + * @return string + */ + public function getTimestamp() { + return $this->timestamp; + } + + /** + * @since 0.5 + * @return string + */ + public function getType() { + return $this->type; + } + + /** + * @since 0.5 + * @return array + */ + public function getDetails() { + return $this->details; + } + + /** + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + */ + public function jsonSerialize() { + return array( + 'id' => $this->id, + 'type' => $this->type, + 'action' => $this->action, + 'timestamp' => $this->timestamp, + 'user' => $this->user, + 'pageidentifier' => $this->pageIdentifier, + 'comment' => $this->comment, + 'details' => $this->details, + ); + } + + /** + * @param array $json + * + * @return self + */ + public static function jsonDeserialize( $json ) { + return new self( + $json['id'], + $json['type'], + $json['action'], + $json['timestamp'], + $json['user'], + PageIdentifier::jsonDeserialize( $json['pageidentifier'] ), + $json['comment'], + $json['details'] + ); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/LogList.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/LogList.php new file mode 100644 index 00000000..9ce30263 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/LogList.php @@ -0,0 +1,138 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; +use JsonSerializable; +use RuntimeException; + +/** + * Represents a collection of Log classes + * @author Addshore + */ +class LogList implements JsonSerializable { + + /** + * @var Log[] + */ + private $logs; + + /** + * @param Log[] $logs + */ + public function __construct( $logs = array() ) { + $this->logs = array(); + $this->addLogs( $logs ); + } + + /** + * @param Log[]|LogList $logs + * + * @throws InvalidArgumentException + */ + public function addLogs( $logs ) { + if( !is_array( $logs ) && !$logs instanceof LogList ) { + throw new InvalidArgumentException( '$logs needs to either be an array or a LogList object' ); + } + if( $logs instanceof LogList ) { + $logs = $logs->toArray(); + } + foreach( $logs as $log ) { + $this->addLog( $log ); + } + } + + /** + * @param Log $log + */ + public function addLog( Log $log ) { + $this->logs[$log->getId()] = $log; + } + + /** + * @param int $id + * + * @return bool + */ + public function hasLogWithId( $id ){ + return array_key_exists( $id, $this->logs ); + } + + /** + * @param Log $log + * + * @return bool + */ + public function hasLog( Log $log ){ + return array_key_exists( $log->getId(), $this->logs ); + } + + /** + * @return Log|null Log or null if there is no log + */ + public function getLatest() { + if( empty( $this->logs ) ) { + return null; + } + return $this->logs[ max( array_keys( $this->logs ) ) ]; + } + + /** + * @since 0.6 + * @return Log|null Log or null if there is no log + */ + public function getOldest() { + if( empty( $this->logs ) ) { + return null; + } + return $this->logs[ min( array_keys( $this->logs ) ) ]; + } + + /** + * @since 0.6 + * @return bool + */ + public function isEmpty() { + return empty( $this->logs ); + } + + /** + * @param int $id + * + * @throws RuntimeException + * @return Log + */ + public function get( $id ){ + if( $this->hasLogWithId( $id ) ){ + return $this->logs[$id]; + } + throw new RuntimeException( 'No such Log loaded in LogList object' ); + } + + /** + * @return Log[] + */ + public function toArray() { + return $this->logs; + } + + /** + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + */ + public function jsonSerialize() { + return $this->toArray(); + } + + /** + * @param array $json + * + * @return self + */ + public static function jsonDeserialize( $json ) { + $self = new LogList(); + foreach ( $json as $logJson ) { + $self->addLog( Log::jsonDeserialize( $logJson ) ); + } + return $self; + } +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/NamespaceInfo.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/NamespaceInfo.php new file mode 100644 index 00000000..451ec972 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/NamespaceInfo.php @@ -0,0 +1,131 @@ +<?php + +namespace Mediawiki\DataModel; + +/** + * Class representing metadata about a MediaWiki namespace + * + * @author gbirke + */ +class NamespaceInfo +{ + /** + * @var int + */ + private $id; + + /** + * @var string + */ + private $canonicalName; + + /** + * @var string + */ + private $localName; + + /** + * @var string + */ + private $caseHandling; + + /** + * @var string + */ + private $defaultContentModel; + + /** + * @var array + */ + private $aliases; + + /** + * NamespaceInfo constructor. + * @param int $id + * @param string $canonicalName + * @param string $localName + * @param string $caseHandling + * @param string $defaultContentModel + * @param array $aliases + * + * @throws InvalidArgumentException + */ + public function __construct( $id, $canonicalName, $localName, $caseHandling, $defaultContentModel = null, $aliases = [] ) + { + if( !is_int( $id ) ) { + throw new \InvalidArgumentException( '$id must be an integer' ); + } + if ( !is_string( $canonicalName ) ) { + throw new \InvalidArgumentException( '$canonicalName must be a string' ); + } + if ( !is_string( $localName ) ) { + throw new \InvalidArgumentException( '$localName must be a string' ); + } + if ( !is_string( $caseHandling ) ) { + throw new \InvalidArgumentException( '$caseHandling must be a string' ); + } + if ( !is_null( $defaultContentModel) && !is_string( $defaultContentModel ) ) { + throw new \InvalidArgumentException( '$canonicalName must be a string' ); + } + + if ( !is_array( $aliases ) ) { + throw new \InvalidArgumentException( '$aliases must be an array' ); + } + + $this->id = $id; + $this->canonicalName = $canonicalName; + $this->localName = $localName; + $this->caseHandling = $caseHandling; + $this->defaultContentModel = $defaultContentModel; + $this->aliases = $aliases; + } + + /** + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @return string + */ + public function getCanonicalName() + { + return $this->canonicalName; + } + + /** + * @return string + */ + public function getLocalName() + { + return $this->localName; + } + + /** + * @return string + */ + public function getCaseHandling() + { + return $this->caseHandling; + } + + /** + * @return string + */ + public function getDefaultContentModel() + { + return $this->defaultContentModel; + } + + /** + * @return array + */ + public function getAliases() + { + return $this->aliases; + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Page.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Page.php new file mode 100644 index 00000000..c3951e85 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Page.php @@ -0,0 +1,63 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; + +class Page { + + /** + * @var Revisions + */ + private $revisions; + + /** + * @var PageIdentifier + */ + private $pageIdentifier; + + /** + * @param PageIdentifier $pageIdentifier + * @param Revisions|null $revisions + * + * @throws InvalidArgumentException + */ + public function __construct( PageIdentifier $pageIdentifier = null , Revisions $revisions = null ) { + if( is_null( $revisions ) ) { + $revisions = new Revisions(); + } + $this->revisions = $revisions; + $this->pageIdentifier = $pageIdentifier; + } + + /** + * @deprecated since 0.5 + * @return int + */ + public function getId() { + return $this->pageIdentifier->getId(); + } + + /** + * @return Revisions + */ + public function getRevisions() { + return $this->revisions; + } + + /** + * @deprecated since 0.5 + * @return Title + */ + public function getTitle() { + return $this->pageIdentifier->getTitle(); + } + + /** + * @return PageIdentifier + */ + public function getPageIdentifier() { + return $this->pageIdentifier; + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/PageIdentifier.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/PageIdentifier.php new file mode 100644 index 00000000..528e3c88 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/PageIdentifier.php @@ -0,0 +1,85 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; +use JsonSerializable; + +class PageIdentifier implements JsonSerializable { + + /** + * @var int|null + */ + private $id; + + /** + * @var Title|null + */ + private $title; + + /** + * @param Title|null $title + * @param int|null $id + * @throws InvalidArgumentException + */ + public function __construct( Title $title = null, $id = null ) { + if( !is_int( $id ) && !is_null( $id ) ) { + throw new InvalidArgumentException( '$id must be an int' ); + } + $this->title = $title; + $this->id = $id; + } + + /** + * @return int|null + */ + public function getId() { + return $this->id; + } + + /** + * @return Title|null + */ + public function getTitle() { + return $this->title; + } + + /** + * Does this object identify a page + * @return bool + */ + public function identifiesPage() { + if( is_null( $this->title ) && is_null( $this->id ) ) { + return false; + } + return true; + } + + /** + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + */ + public function jsonSerialize() { + $array = array(); + if ( $this->id !== null ) { + $array['id'] = $this->id; + } + if ( $this->title !== null ) { + $array['title'] = $this->title->jsonSerialize(); + } + return $array; + } + + /** + * @param array $array + * + * @returns self + */ + public static function jsonDeserialize( $array ) { + return new self( + isset( $array['title'] ) ? Title::jsonDeserialize( $array['title'] ) : null, + isset( $array['id'] ) ? $array['id'] : null + + ); + } +} +
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Pages.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Pages.php new file mode 100644 index 00000000..b8c5614c --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Pages.php @@ -0,0 +1,99 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; +use RuntimeException; + +/** + * Represents a collection or Page classes + * @author Addshore + */ +class Pages { + + /** + * @var Page[] + */ + private $pages; + + /** + * @param Page[] $pages + */ + public function __construct( $pages = array() ) { + $this->pages = array(); + $this->addPages( $pages ); + } + + /** + * @param Page[]|Pages $pages + * + * @throws InvalidArgumentException + */ + public function addPages( $pages ) { + if( !is_array( $pages ) && !$pages instanceof Pages ) { + throw new InvalidArgumentException( '$pages needs to either be an array or a Pages object' ); + } + if( $pages instanceof Pages ) { + $pages = $pages->toArray(); + } + foreach( $pages as $page ) { + $this->addPage( $page ); + } + } + + /** + * @param Page $page + */ + public function addPage( Page $page ) { + $this->pages[$page->getId()] = $page; + } + + /** + * @param int $id + * + * @return bool + */ + public function hasPageWithId( $id ){ + return array_key_exists( $id, $this->pages ); + } + + /** + * @param Page $page + * + * @return bool + */ + public function hasPage( Page $page ){ + return array_key_exists( $page->getId(), $this->pages ); + } + + /** + * @return Page|null Page or null if there is no page + */ + public function getLatest() { + if( empty( $this->pages ) ) { + return null; + } + return $this->pages[ max( array_keys( $this->pages ) ) ]; + } + + + /** + * @param int $pageid + * + * @throws RuntimeException + * @return Page + */ + public function get( $pageid ){ + if( $this->hasPageWithId( $pageid ) ){ + return $this->pages[$pageid]; + } + throw new RuntimeException( 'No such page loaded in Pages object' ); + } + + /** + * @return Page[] + */ + public function toArray() { + return $this->pages; + } +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Redirect.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Redirect.php new file mode 100644 index 00000000..55b8b607 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Redirect.php @@ -0,0 +1,53 @@ +<?php + +namespace Mediawiki\DataModel; + +use JsonSerializable; + +class Redirect implements JsonSerializable { + + private $from; + private $to; + + public function __construct( Title $from, Title $to ) { + $this->from = $from; + $this->to = $to; + } + + /** + * @return Title + */ + public function getFrom() { + return $this->from; + } + + /** + * @return Title + */ + public function getTo() { + return $this->to; + } + + /** + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + */ + public function jsonSerialize() { + return array( + 'from' => $this->from->jsonSerialize(), + 'to' => $this->to->jsonSerialize(), + ); + } + + /** + * @param array $json + * + * @return self + */ + public static function jsonDeserialize( $json ) { + return new self( + Title::jsonDeserialize( $json['from'] ), + Title::jsonDeserialize( $json['to'] ) + ); + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Revision.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Revision.php new file mode 100644 index 00000000..09afe63f --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Revision.php @@ -0,0 +1,106 @@ +<?php + +namespace Mediawiki\DataModel; + +/** + * Representation of a version of content + * @author Addshore + */ +class Revision { + + /** + * @var int Id of the revision + */ + private $id; + + /** + * @var PageIdentifier of the page for the revision + */ + private $pageIdentifier; + + /** + * @var Content + */ + private $content; + + /** + * @var EditInfo + */ + private $editInfo; + + /** + * @var null|string + */ + private $user; + + /** + * @var null|string + */ + private $timestamp; + + /** + * @param Content $content + * @param PageIdentifier|null $pageIdentifier + * @param int|null $revId + * @param EditInfo|null $editInfo + * @param string|null $user + * @param string|null $timestamp + */ + public function __construct( Content $content, PageIdentifier $pageIdentifier = null, $revId = null, EditInfo $editInfo = null, $user = null, $timestamp = null ) { + if( is_null( $editInfo ) ) { + $editInfo = new EditInfo(); + } + if( is_null( $pageIdentifier ) ) { + $pageIdentifier = new PageIdentifier(); + } + $this->content = $content; + $this->pageIdentifier = $pageIdentifier; + $this->id = $revId; + $this->editInfo = $editInfo; + $this->user = $user; + $this->timestamp = $timestamp; + } + + /** + * @return Content + */ + public function getContent() { + return $this->content; + } + + /** + * @return EditInfo + */ + public function getEditInfo() { + return $this->editInfo; + } + + /** + * @return int|null + */ + public function getId() { + return $this->id; + } + + /** + * @return PageIdentifier|null + */ + public function getPageIdentifier() { + return $this->pageIdentifier; + } + + /** + * @return null|string + */ + public function getUser() { + return $this->user; + } + + /** + * @return null|string + */ + public function getTimestamp() { + return $this->timestamp; + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Revisions.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Revisions.php new file mode 100644 index 00000000..c6d2f436 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Revisions.php @@ -0,0 +1,102 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; +use RuntimeException; + +/** + * Represents a collection or revisions + * @author Addshore + */ +class Revisions { + + /** + * @var Revision[] + */ + private $revisions; + + /** + * @param Revisions[] $revisions + */ + public function __construct( $revisions = array() ) { + $this->revisions = array(); + $this->addRevisions( $revisions ); + } + + /** + * @param Revision[]|Revisions $revisions + * + * @throws InvalidArgumentException + */ + public function addRevisions( $revisions ) { + if( !is_array( $revisions ) && !$revisions instanceof Revisions ) { + throw new InvalidArgumentException( '$revisions needs to either be an array or a Revisions object' ); + } + if( $revisions instanceof Revisions ) { + $revisions = $revisions->toArray(); + } + foreach( $revisions as $revision ) { + $this->addRevision( $revision ); + } + } + + /** + * @param Revision $revision + */ + public function addRevision( Revision $revision ) { + $this->revisions[$revision->getId()] = $revision; + } + + /** + * @param int $id + * + * @return bool + */ + public function hasRevisionWithId( $id ){ + return array_key_exists( $id, $this->revisions ); + } + + /** + * @param Revision $revision + * + * @return bool + */ + public function hasRevision( Revision $revision ){ + return array_key_exists( $revision->getId(), $this->revisions ); + } + + /** + * @return Revision|null Revision or null if there is no revision + */ + public function getLatest() { + if( empty( $this->revisions ) ) { + return null; + } + return $this->revisions[ max( array_keys( $this->revisions ) ) ]; + } + + /** + * @param int $revid + * + * @throws RuntimeException + * @throws InvalidArgumentException + * @return Revision + */ + public function get( $revid ){ + if( !is_int( $revid ) ) { + throw new InvalidArgumentException( '$revid needs to be an int' ); + } + if( $this->hasRevisionWithId( $revid ) ){ + return $this->revisions[$revid]; + } + throw new RuntimeException( 'No such revision loaded in Revisions object' ); + } + + /** + * @return Revision[] + */ + public function toArray() { + return $this->revisions; + } +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Title.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Title.php new file mode 100644 index 00000000..1fb15138 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/Title.php @@ -0,0 +1,83 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; +use JsonSerializable; + +/** + * @author Addshore + */ +class Title implements JsonSerializable { + + /** + * @var string + */ + private $title; + + /** + * @var int + */ + private $ns; + + /** + * @param string $title + * @param int $ns + * + * @throws InvalidArgumentException + */ + public function __construct( $title, $ns = 0 ) { + if( !is_string( $title ) ) { + throw new InvalidArgumentException( '$title must be a string' ); + } + if( !is_int( $ns ) ) { + throw new InvalidArgumentException( '$ns must be an int' ); + } + $this->title = $title; + $this->ns = $ns; + } + + /** + * @return int + * @since 0.1 + */ + public function getNs() { + return $this->ns; + } + + /** + * @return string + * @since 0.6 + */ + public function getText() { + return $this->title; + } + + /** + * @return string + * @deprecated in 0.6 use getText (makes things look cleaner) + */ + public function getTitle() { + return $this->getText(); + } + + /** + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + */ + public function jsonSerialize() { + return array( + 'title' => $this->title, + 'ns' => $this->ns, + ); + } + + /** + * @param array $json + * + * @return self + */ + public static function jsonDeserialize( $json ) { + return new self( $json['title'], $json['ns'] ); + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/User.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/User.php new file mode 100644 index 00000000..fca5ddf3 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/src/User.php @@ -0,0 +1,140 @@ +<?php + +namespace Mediawiki\DataModel; + +use InvalidArgumentException; + +/** + * Represents a mediawiki user + * @author Addshore + */ +class User { + + /** + * @var string + */ + private $name; + + /** + * @var int + */ + private $id; + + /** + * @var int + */ + private $editcount; + + /** + * @var string + */ + private $registration; + + /** + * @var array + */ + private $groups; + + /** + * @var array + */ + private $rights; + + /** + * @var string + */ + private $gender; + + /** + * @param string $name + * @param int $id + * @param int $editcount + * @param string $registration + * @param array[] $groups groups grouped by type. + * Keys to use are 'groups' and 'implicitgroups' as returned by the api. + * @param array $rights + * @param string $gender + * + * @throws InvalidArgumentException + */ + public function __construct( $name, $id, $editcount, $registration, $groups, $rights, $gender ) { + if( !is_string( $name ) || empty( $name ) ) { + throw new InvalidArgumentException( '$name must be a string and can not be empty' ); + } + if( !is_int( $id ) ) { + throw new InvalidArgumentException( '$id must be an int' ); + } + if( !is_int( $editcount ) ) { + throw new InvalidArgumentException( '$editcount must be an int' ); + } + if( !is_array( $groups ) || !array_key_exists( 'groups', $groups ) || !array_key_exists( 'implicitgroups', $groups ) ) { + throw new InvalidArgumentException( '$groups must be an array or arrays with keys "groups" and "implicitgroups"' ); + } + if( !is_array( $rights ) ) { + throw new InvalidArgumentException( '$rights must be an array' ); + } + if( !is_string( $gender ) ) { + throw new InvalidArgumentException( '$gender must be a string' ); + } + + $this->editcount = $editcount; + $this->gender = $gender; + $this->groups = $groups; + $this->id = $id; + $this->name = $name; + $this->registration = $registration; + $this->rights = $rights; + } + + /** + * @return int + */ + public function getEditcount() { + return $this->editcount; + } + + /** + * @return string + */ + public function getGender() { + return $this->gender; + } + + /** + * @param string $type 'groups' or 'implicitgroups' + * + * @return array + */ + public function getGroups( $type = 'groups' ) { + return $this->groups[$type]; + } + + /** + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * @return string + */ + public function getRegistration() { + return $this->registration; + } + + /** + * @return array + */ + public function getRights() { + return $this->rights; + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php new file mode 100644 index 00000000..e412749a --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/ContentTest.php @@ -0,0 +1,30 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Content; +use PHPUnit_Framework_TestCase; + +class ContentTest extends PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $data, $model ) { + $content = new Content( $data, $model ); + $this->assertEquals( $data, $content->getData() ); + $this->assertEquals( $model, $content->getModel() ); + $this->assertTrue( is_string( $content->getHash() ) ); + $this->assertFalse( $content->hasChanged() ); + } + + public function provideValidConstruction() { + return array( + array( '', null ), + array( 'foo', null ), + array( new \stdClass(), null ), + ); + } + +} +
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/EditInfoTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/EditInfoTest.php new file mode 100644 index 00000000..c3128bca --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/EditInfoTest.php @@ -0,0 +1,51 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\EditInfo; +use PHPUnit_Framework_TestCase; + +/** + * @covers \Mediawiki\DataModel\EditInfo + * @author Addshore + */ +class EditInfoTest extends PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $sum, $minor, $bot ) { + $flags = new EditInfo( $sum, $minor, $bot ); + $this->assertEquals( $sum, $flags->getSummary() ); + $this->assertEquals( $minor, $flags->getMinor() ); + $this->assertEquals( $bot, $flags->getBot() ); + } + + public function provideValidConstruction() { + return array( + array( '', EditInfo::MINOR, EditInfo::BOT ), + array( '', EditInfo::MINOR, EditInfo::NOTBOT ), + array( '', EditInfo::NOTMINOR, EditInfo::BOT ), + array( '', EditInfo::NOTMINOR, EditInfo::NOTBOT ), + array( 'FOO', EditInfo::NOTMINOR, EditInfo::NOTBOT ), + ); + } + + /** + * @dataProvider provideInvalidConstruction + */ + public function testInvalidConstruction( $sum, $minor, $bot ) { + $this->setExpectedException( 'InvalidArgumentException' ); + new EditInfo( $sum, $minor, $bot ); + } + + public function provideInvalidConstruction() { + return array( + array( 1, 2, 3 ), + array( "foo", false, 3 ), + array( "foo", 3, false ), + array( array(), true, false ), + ); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/FileTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/FileTest.php new file mode 100644 index 00000000..0da77bd1 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/FileTest.php @@ -0,0 +1,44 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\File; +use Mediawiki\DataModel\PageIdentifier; + +/** + * @covers \Mediawiki\DataModel\File + * @author Addshore + */ +class FileTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $url ) { + $file = new File( + $url, + new PageIdentifier( $this->newMockTitle(), 1 ), + $this->newMockRevisions() + ); + $this->assertEquals( $url, $file->getUrl() ); + } + + public function provideValidConstruction() { + return array( + array( 'http://upload.wikimedia.org/wikipedia/en/3/39/Journal_of_Geek_Studies_-_logo.jpg' ), + ); + } + + private function newMockTitle() { + return $this->getMockBuilder( '\Mediawiki\DataModel\Title' ) + ->disableOriginalConstructor() + ->getMock(); + } + + private function newMockRevisions() { + return $this->getMockBuilder( '\Mediawiki\DataModel\Revisions' ) + ->disableOriginalConstructor() + ->getMock(); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/LogListTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/LogListTest.php new file mode 100644 index 00000000..1098a8a6 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/LogListTest.php @@ -0,0 +1,25 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Log; +use Mediawiki\DataModel\LogList; +use Mediawiki\DataModel\PageIdentifier; + +/** + * @covers \Mediawiki\DataModel\LogList + * @author Addshore + */ +class LogListTest extends \PHPUnit_Framework_TestCase { + + public function testJsonRoundTrip() { + $logList = new LogList( array( + new Log( 1, 'ty', 'ac', '2014', 'Addshore', new PageIdentifier( null, 22 ), 'comment', array() ), + new Log( 2, 'ty2', 'ac2', '2015', 'Addbot', new PageIdentifier( null, 33 ), 'comment2', array() ), + ) ); + $json = $logList->jsonSerialize(); + $json = json_decode( json_encode( $json ), true ); + $this->assertEquals( $logList, LogList::jsonDeserialize( $json ) ); + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/NamespaceInfoTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/NamespaceInfoTest.php new file mode 100644 index 00000000..4587a8a0 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/NamespaceInfoTest.php @@ -0,0 +1,72 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\NamespaceInfo; + +/** + * @covers \Mediawiki\DataModel\NamespaceInfo + * @author gbirke + */ +class NamespaceInfoTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider provideValidConstruction + * @param int $id + * @param string $canonicalName + * @param string $localName + * @param string $caseHandling + * @param null $defaultContentModel + * @param array $aliases + */ + public function testValidConstruction($id, $canonicalName, $localName, $caseHandling, $defaultContentModel = null, + $aliases = [] ) { + $namespace = new NamespaceInfo( $id, $canonicalName, $localName, $caseHandling, $defaultContentModel, $aliases ); + $this->assertSame( $id, $namespace->getId() ); + $this->assertSame( $canonicalName, $namespace->getCanonicalName() ); + $this->assertSame( $localName, $namespace->getLocalName() ); + $this->assertSame( $caseHandling, $namespace->getCaseHandling() ); + $this->assertSame( $defaultContentModel, $namespace->getDefaultContentModel() ); + $this->assertSame( $aliases, $namespace->getAliases() ); + } + + public function provideValidConstruction() { + return array( + array( -2, 'Media', 'Media', 'first-letter' ), + array( 0, '', '', 'first-letter' ), + array( 4, 'Project', 'Wikipedia', 'first-letter' ), + array( 2302, 'Gadget definition', 'Gadget definition', 'case-sensitive', 'GadgetDefinition' ), + array( 2302, 'Gadget definition', 'Gadget definition', 'case-sensitive', 'GadgetDefinition', [ 'GD' ] ), + ); + } + + /** + * @param $id + * @param $canonicalName + * @param $localName + * @param $caseHandling + * @param null $defaultContentModel + * @param array $aliases + * + * @dataProvider provideInvalidConstruction + */ + public function testInvalidConstruction($id, $canonicalName, $localName, $caseHandling, $defaultContentModel = null, + $aliases = [] ) { + $this->setExpectedException( 'InvalidArgumentException' ); + new NamespaceInfo( $id, $canonicalName, $localName, $caseHandling, $defaultContentModel, $aliases ); + } + + public function provideInvalidConstruction() { + return array( + array( .5, 'Media', 'Media', 'first-letter' ), + array( '0', '', '', 'first-letter' ), + array( -2, null, 'Media', 'first-letter' ), + array( -2, 'Media', null, 'first-letter' ), + array( 4, 'Project', 'Wikipedia', 'first-letter', 5 ), + array( 2302, null, 'Gadget definition', 'case-sensitive', 'GadgetDefinition' ), + array( 4, 'Project', 'Wikipedia', 'first-letter', 5 ), + array( 4, 'Project', 'Wikipedia', 'first-letter', 'GadgetDefinition', 'notanalias' ), + ); + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PageIdentifierTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PageIdentifierTest.php new file mode 100644 index 00000000..42aa8412 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PageIdentifierTest.php @@ -0,0 +1,54 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\PageIdentifier; +use Mediawiki\DataModel\Title; + +/** + * @covers Mediawiki\DataModel\PageIdentifier + */ +class PageIdentifierTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $title, $pageid, $identifiesPage ) { + $pageIdentifier = new PageIdentifier( $title, $pageid ); + if( is_string( $title ) ) { + $this->assertEquals( new Title( $title ), $pageIdentifier->getTitle() ); + } else { + $this->assertEquals( $title, $pageIdentifier->getTitle() ); + } + $this->assertEquals( $pageid, $pageIdentifier->getId() ); + $this->assertEquals( $identifiesPage, $pageIdentifier->identifiesPage() ); + } + + public function provideValidConstruction() { + return array( + array( null, null, false ), + array( new Title( 'Foo' ), null, true ), + array( new Title( 'Foo', 2 ), null, true ), + array( null, 3, true ), + ); + } + + public function provideRoundTripObjects() { + return array( + array( new PageIdentifier( null, null ) ), + array( new PageIdentifier( null, 44 ) ), + array( new PageIdentifier( new Title( 'someTitle', 12 ), null ) ), + array( new PageIdentifier( new Title( 'someTitle', 55 ), 99 ) ), + ); + } + + /** + * @dataProvider provideRoundTripObjects + */ + public function testJsonRoundTrip( PageIdentifier $identifierObject ) { + $json = $identifierObject->jsonSerialize(); + $this->assertEquals( $identifierObject, PageIdentifier::jsonDeserialize( $json ) ); + } + +} +
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PageTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PageTest.php new file mode 100644 index 00000000..cbc31c8c --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PageTest.php @@ -0,0 +1,48 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Page; +use Mediawiki\DataModel\PageIdentifier; + +/** + * @covers \Mediawiki\DataModel\Page + * @author Addshore + */ +class PageTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $pageIdentifier, $revisions ) { + $page = new Page( $pageIdentifier, $revisions ); + $this->assertEquals( $pageIdentifier, $page->getPageIdentifier() ); + if( is_null( $revisions ) ) { + $this->assertInstanceOf( 'Mediawiki\DataModel\Revisions', $page->getRevisions() ); + } else { + $this->assertEquals( $revisions, $page->getRevisions() ); + } + } + + public function provideValidConstruction() { + return array( + array( null, null ), + array( null, $this->newMockRevisions() ), + array( new PageIdentifier( $this->newMockTitle(), 1 ), $this->newMockRevisions() ), + array( new PageIdentifier( $this->newMockTitle(), 123 ), null ), + ); + } + + private function newMockTitle() { + return $this->getMockBuilder( '\Mediawiki\DataModel\Title' ) + ->disableOriginalConstructor() + ->getMock(); + } + + private function newMockRevisions() { + return $this->getMockBuilder( '\Mediawiki\DataModel\Revisions' ) + ->disableOriginalConstructor() + ->getMock(); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PagesTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PagesTest.php new file mode 100644 index 00000000..0055ecc7 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/PagesTest.php @@ -0,0 +1,44 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Page; +use Mediawiki\DataModel\PageIdentifier; +use Mediawiki\DataModel\Pages; + +/** + * @covers \Mediawiki\DataModel\Pages + * @author Addshore + */ +class PagesTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $input, $expected ) { + $pages = new Pages( $input ); + $this->assertEquals( $expected, $pages->toArray() ); + } + + public function provideValidConstruction() { + $mockTitle = $this->getMockBuilder( 'Mediawiki\DataModel\Title' ) + ->disableOriginalConstructor() + ->getMock(); + $mockRevisions = $this->getMockBuilder( 'Mediawiki\DataModel\Revisions' ) + ->disableOriginalConstructor() + ->getMock(); + + //todo mock these + $page1 = new Page( new PageIdentifier( $mockTitle, 1 ), $mockRevisions ); + $page2 = new Page( new PageIdentifier( $mockTitle, 2 ), $mockRevisions ); + $page4 = new Page( new PageIdentifier( $mockTitle, 4 ), $mockRevisions ); + + return array( + array( array( $page1 ), array( 1 => $page1 ) ), + array( array( $page2, $page1 ), array( 1 => $page1, 2 => $page2 ) ), + array( array( $page4, $page1 ), array( 1 => $page1, 4 => $page4 ) ), + array( new Pages( array( $page4, $page1 ) ), array( 1 => $page1, 4 => $page4 ) ), + ); + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RedirectTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RedirectTest.php new file mode 100644 index 00000000..0f561e92 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RedirectTest.php @@ -0,0 +1,20 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Redirect; +use Mediawiki\DataModel\Title; + +/** + * @covers \Mediawiki\DataModel\Redirect + * @author Addshore + */ +class RedirectTest extends \PHPUnit_Framework_TestCase { + + public function testJsonRoundTrip() { + $title = new Redirect( new Title( 'Foo', 12 ), new Title( 'bar', 13 ) ); + $json = $title->jsonSerialize(); + $this->assertEquals( $title, Redirect::jsonDeserialize( $json ) ); + } + +} diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RevisionTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RevisionTest.php new file mode 100644 index 00000000..e6260acb --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RevisionTest.php @@ -0,0 +1,57 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\PageIdentifier; +use Mediawiki\DataModel\Revision; + +/** + * @covers \Mediawiki\DataModel\Revision + * @author Addshore + */ +class RevisionTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $content, $pageIdentifier, $id, $editInfo, $user, $timestamp ) { + $rev = new Revision( $content, $pageIdentifier, $id, $editInfo, $user, $timestamp ); + $this->assertEquals( $content, $rev->getContent() ); + if( !is_null( $pageIdentifier ) ) { + $this->assertEquals( $pageIdentifier, $rev->getPageIdentifier() ); + } else { + $this->assertInstanceOf( '\Mediawiki\DataModel\PageIdentifier', $rev->getPageIdentifier() ); + } + + $this->assertEquals( $id, $rev->getId() ); + if( !is_null( $editInfo ) ) { + $this->assertEquals( $editInfo, $rev->getEditInfo() ); + } else { + $this->assertInstanceOf( '\Mediawiki\DataModel\EditInfo', $rev->getEditInfo() ); + } + $this->assertEquals( $user, $rev->getUser() ); + $this->assertEquals( $timestamp, $rev->getTimestamp() ); + } + + public function provideValidConstruction() { + $mockContent = $this->getMockBuilder( 'Mediawiki\DataModel\Content' ) + ->disableOriginalConstructor() + ->getMock(); + $mockEditInfo = $this->getMockBuilder( '\Mediawiki\DataModel\EditInfo' ) + ->disableOriginalConstructor() + ->getMock(); + $mockTitle = $this->getMockBuilder( 'Mediawiki\DataModel\Title' ) + ->disableOriginalConstructor() + ->getMock(); + + return array( + array( $mockContent, null, null, null, null, null ), + array( $mockContent, new PageIdentifier( null, 1 ), null , null, null,null ), + array( $mockContent, new PageIdentifier( null, 1 ), 1 , null, null, null ), + array( $mockContent, new PageIdentifier( null, 2 ), 1 , $mockEditInfo, null, null ), + array( $mockContent, new PageIdentifier( $mockTitle ), 1 , $mockEditInfo, 'foo', null ), + array( $mockContent, new PageIdentifier( $mockTitle, 3 ), 1 , $mockEditInfo, 'foo', '20141212121212' ), + ); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RevisionsTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RevisionsTest.php new file mode 100644 index 00000000..6b7afbed --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/RevisionsTest.php @@ -0,0 +1,41 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\PageIdentifier; +use Mediawiki\DataModel\Revision; +use Mediawiki\DataModel\Revisions; + +/** + * @covers \Mediawiki\DataModel\Revisions + * @author Addshore + */ +class RevisionsTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $input, $expected ) { + $revisions = new Revisions( $input ); + $this->assertEquals( $expected, $revisions->toArray() ); + } + + public function provideValidConstruction() { + $mockContent = $this->getMockBuilder( 'Mediawiki\DataModel\Content' ) + ->disableOriginalConstructor() + ->getMock(); + + //todo mock these + $rev1 = new Revision( $mockContent, new PageIdentifier( null, 1 ), 1 ); + $rev2 = new Revision( $mockContent, new PageIdentifier( null, 1 ), 2 ); + $rev4 = new Revision( $mockContent, new PageIdentifier( null, 1 ), 4 ); + + return array( + array( array( $rev1 ), array( 1 => $rev1 ) ), + array( array( $rev2, $rev1 ), array( 1 => $rev1, 2 => $rev2 ) ), + array( array( $rev4, $rev1 ), array( 1 => $rev1, 4 => $rev4 ) ), + array( new Revisions( array( $rev4, $rev1 ) ), array( 1 => $rev1, 4 => $rev4 ) ), + ); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/TitleTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/TitleTest.php new file mode 100644 index 00000000..2c4d73da --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/TitleTest.php @@ -0,0 +1,56 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\Title; + +/** + * @covers \Mediawiki\DataModel\Title + * @author Addshore + */ +class TitleTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $title, $ns ) { + $titleObj = new Title( $title, $ns ); + $this->assertEquals( $title, $titleObj->getText() ); + $this->assertEquals( $title, $titleObj->getTitle() ); + $this->assertEquals( $ns, $titleObj->getNs() ); + } + + public function provideValidConstruction() { + return array( + array( 'fooo', 0 ), + array( 'Foo:Bar', 15 ), + array( 'FooBar:Bar', 9999 ), + ); + } + + /** + * @dataProvider provideInvalidConstruction + */ + public function testInvalidConstruction( $title, $ns ) { + $this->setExpectedException( 'InvalidArgumentException' ); + new Title( $title, $ns ); + } + + public function provideInvalidConstruction() { + return array( + array( array(), array() ), + array( 'foo', array() ), + array( array(), 1 ), + array( null, 1 ), + array( null, null ), + array( 'foo', null ), + ); + } + + public function testJsonRoundTrip() { + $title = new Title( 'Foo', 19 ); + $json = $title->jsonSerialize(); + $this->assertEquals( $title, Title::jsonDeserialize( $json ) ); + } + +}
\ No newline at end of file diff --git a/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/UserTest.php b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/UserTest.php new file mode 100644 index 00000000..fcf89994 --- /dev/null +++ b/bin/wiki/vendor/addwiki/mediawiki-datamodel/tests/UserTest.php @@ -0,0 +1,59 @@ +<?php + +namespace Mediawiki\DataModel\Test; + +use Mediawiki\DataModel\User; + +/** + * @covers \Mediawiki\DataModel\User + * @author Addshore + */ +class UserTest extends \PHPUnit_Framework_TestCase { + + /** + * @dataProvider provideValidConstruction + */ + public function testValidConstruction( $name, $id, $editcount, $registration, $groups, $rights, $gender ) { + $user = new User( $name, $id, $editcount, $registration, $groups, $rights, $gender ); + $this->assertEquals( $name, $user->getName() ); + $this->assertEquals( $id, $user->getId() ); + $this->assertEquals( $editcount, $user->getEditcount() ); + $this->assertEquals( $registration, $user->getRegistration() ); + $this->assertEquals( $groups['groups'], $user->getGroups() ); + $this->assertEquals( $groups['implicitgroups'], $user->getGroups( 'implicitgroups' ) ); + $this->assertEquals( $rights, $user->getRights() ); + $this->assertEquals( $gender, $user->getGender() ); + } + + public function provideValidConstruction() { + return array( + array( 'Username', 1, 1, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'male' ), + array( 'Username', 1, 1, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'female' ), + array( 'Username', 99999999, 99999997, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'male' ), + array( 'Username', 1, 1, null, array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'female' ), + ); + } + + /** + * @dataProvider provideInvalidConstruction + */ + public function testInvalidConstruction( $name, $id, $editcount, $registration, $groups, $rights, $gender ) { + $this->setExpectedException( 'InvalidArgumentException' ); + new User( $name, $id, $editcount, $registration, $groups, $rights, $gender ); + } + + public function provideInvalidConstruction() { + return array( + array( 'Username', 1, 1, 'TIMESTAMP', 'bad', array(), 'male' ), + array( 'Username', 1, 1, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), 'bad', 'male' ), + array( 'Username', 1, 1, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 1 ), + array( 'Username', 1, 'bad', 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'male' ), + array( 'Username', 'bad', 1, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'male' ), + array( 14287941, 1, 1, 'TIMESTAMP', array( 'groups' => array(), 'implicitgroups' => array() ), array(), 'male' ), + array( 'Username', 1, 1, 'TIMESTAMP', array( 'groups' => array(), 'foo' => array() ), array(), 'male' ), + array( 'Username', 1, 1, 'TIMESTAMP', array( 'groups' => array() ), array(), 'male' ), + array( 'Username', 1, 1, 'TIMESTAMP', array(), array(), 'male' ), + ); + } + +} |