krinkle / toollabs-base
Framework for web apps in Wikimedia's Toolforge environment.
Installs: 7 750
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 5
Forks: 2
Open Issues: 0
Requires
- php: >=7.3
- wikimedia/scoped-callback: ^3.0.0
Requires (Dev)
- mediawiki/mediawiki-phan-config: 0.11.1
- mikey179/vfsstream: ^1.0
- php-parallel-lint/php-parallel-lint: 1.3.2
- phpunit/phpunit: ^8.2.3
README
Toolbase
Install
It's recommended to use Composer.
- Run
composer require krinkle/toollabs-base
. - Create a symlink from "base/" in your application's root public directory (e.g. public_html) to
vendor/krinkle/toollabs-base/public_html
. - Include
vendor/autoload.php
in your program.
Example
use Krinkle\Toolbase\BaseTool; require_once __DIR__ . '/vendor/autoload.php'; $kgBase = BaseTool::newFromArray( array( 'displayTitle' => 'Example', 'remoteBasePath' => dirname( $_SERVER['PHP_SELF'] ), ) ); // require_once __DIR__ . '/config.php'; $kgBase->flushMainOutput();
See Template for an example.
Versioning
This library follows the Semantic Versioning guidelines.
Releases will be numbered in the following format: <major>.<minor>.<patch>
.