krinkle/toollabs-base

Framework for web apps in Wikimedia's Toolforge environment.

v2.1.1 2023-03-07 18:31 UTC

This package is auto-updated.

Last update: 2024-10-07 21:36:04 UTC


README

Packagist

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>.