SilverStripe API docs for the core system in different versions, generated through APIGen.
- The documentation is generated from working copies located in
src/. This folder is initially empty, the working copies are created through
- The PHP code does not have to be accessible through the website, all documents are static HTML files.
- All generated content to be viewed publicly should be stored in the
- Set up your vhost to serve from
- PHP 5 (for the symbol lookup only)
- Clone the repo to your local development environment
composer installwhich will install apigen
makedoc.shto build the static API docs (will take some time and generates ~900Mb new files)
Generate the Docs
- Run the
makedoc.shscript as a cronjob, usually a nightly run at 3am is fine:
0 3 * * * /sites/ss2api/www/makedoc.sh
- Configure the Google CSE and Analytics keys in
Add a New Version
- Copy a version section block in
makedoc.shand update the version number
- Update the .gitignore to ignore any new files generated in
htdocs(you don't want to commit the static generated files!)
makedoc.shand confirm the generation runs through properly
- Make a commit of the updated
- Update the redirections in
htdocs/.htaccessto the stable version number
- Make a separate commit with the redirection (explained in deployment below)
Deployment to production
- Raise a ticket with ops team (they have to run a script after deployment)
- Login to SilverStripe Platform (you'll need to ensure you have "api" stack permissions)
- Deploy the commit that contains the update to
- Ops will run this script to generate the new static files.
- Once this is complete, deploy the commit with the redirects.
The project comes with a simple PHP script to convert PHP symbols (classes, methods, properties)
to their URL representations in the API docs, and redirects there.
The lookup is primarily used by doc.silverstripe.org
to drive its custom
[api:<symbol-name>] links in Markdown, without coupling it tightly
to the used API generator URL layout.
q: (required) Class name, method name (
), as well as property name ((::$
version: (optional) Version of the targeted module. Should map to a folder name. Defaults to trunk.
module: (optional) Module name. Should map to a folder name. Defaults to framework.
trunkversion of framework
3.0version of framework
DPSPaymentclass docs in the