2017 © Pedro Peláez
 

library phpdocs-to-db

App for creating an sqlite PHP function database using the PHP documentation SVN repository

image

chrismou/phpdocs-to-db

App for creating an sqlite PHP function database using the PHP documentation SVN repository

  • Friday, December 18, 2015
  • by chrismou
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Create an sqlite DB containing PHP function documentation

A work-in-progress app for creating an sqlite PHP function database using a checkout of the PHP documentation SVN repository., (*1)

This is a really early doors version - written in a rush for use in a seperate project - which I've decided to open source because - well, why not? :-), (*2)

There's a lot more work to do, so if you come across any issues/limitations then there's a good chance I already know about it and plan to fix/improve it in a later release., (*3)

Also, expect the DB layout to change - adding multiple language support will almost definitely require this. There's also a few hacky workarounds in the code that I had to add in a hurry to get the DB generated quickly - expect them to be fixed in a later version., (*4)

Install

The recommended method of installation is through composer., (*5)

{
    "require": {
        "chrismou/phpdocs-to-db": "dev-master"
    }
}

Next you need to grab a copy of the PHP docs from their SVN repository. As I've not added full language support yet, you need to choose what language you want to use now., (*6)

For this example, you'll need subversion installed. To set yourself up to create an English language PHP doc DB, get into the project root and run the following command:, (*7)

svn checkout http://svn.php.net/repository/phpdoc/en/trunk/ data/

Expect this to take a while, as you're grabbing 150+ MB of XML files. You can switch it to use other languages by switching "en" in the URL (open [http://svn.php.net/repository/phpdoc] in a browser to see the full list of supported languages)., (*8)

Then take the phpdoc_skeleton.db file in the build/ directory and create a copy in the same directory, calling it phpdoc.db (DB creation will be automated in a future release)., (*9)

Now open a terminal, get into the project root and run the following command:, (*10)

php run.php phpdocdb:create

s Future

  • Automatic DB creation (currently requires the included sqlite skeleton db)
  • Support for auto checkout/update using the PHP SVN module
  • Support for language selection (or creation of a multi-language DB)
  • Support for multiple DB providers
  • Option to select whether to create a multi-table relational DB or a single-table DB (ie, for if filesize is an issue) ** Including being able to specify whether to include full variable definitions, etc

License

Released under the MIT License. See LICENSEs, (*11)

The Versions

18/12 2015

dev-master

9999999-dev

App for creating an sqlite PHP function database using the PHP documentation SVN repository

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

php sqlite docs cilex phpdocs