PHPTMAPI is a PHP5 API for creating and manipulating topic maps
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


PHPTMAPI 3 is the succession project of

PHPTMAPI is a PHP5 API for creating and manipulating topic maps, based on the project. This API enables PHP developers an easy and standardized implementation of ISO/IEC 13250 Topic Maps in their applications.

What is TMAPI?

TMAPI is a programming interface for accessing and manipulating data held in a topic map. The TMAPI specification defines a set of core interfaces which must be implemented by a compliant application as well as (eventually) a set of additional interfaces which may be implemented by a compliant application or which may be built upon the core interfaces.

Design Objectives in PHPTMAPI 3

  • Do not change the API of prior version 2.1
  • Introduce namespaces
  • Follow PSR-0 (autoloading standard), PSR-1 (basic coding standard), and PSR-2 (coding style guide)
  • Install via composer and get autoloading for free

Fetch and Install

Use composer and get autoloading for free.

Create a composer.json file for your project:

    "require": {
        "phptmapi3/phptmapi3": "dev-master"

Run these two commands to install it:

$ curl -s | php
$ php composer.phar install

Add the autoloader and you will have access to Phptmapi3:

require 'vendor/autoload.php';

Create your implementation of PHPTMAPI. Add the namespace and class name of your implementation of TopicMapSystemFactory in Phptmapi3/config.php. Example:


 * PHPTMAPI is hereby released into the public domain; 
 * and comes with NO WARRANTY.
 * No one owns PHPTMAPI: you may use it freely in both commercial and
 * non-commercial applications, bundle it with your software
 * distribution, include it on a CD-ROM, list the source code in a
 * book, mirror the documentation at your own web site, or use it in
 * any other way you see fit.

$factoryImplementation = '\Foo\Core\TopicMapSystemFactoryImpl';

Add your namespace to composer.json. Example:

    "require": {
        "phptmapi3/phptmapi3": "dev-master"
    "autoload": {
        "psr-0": {
            "Foo\\": "src/"

Finally, create an instance of your implementation of TopicMapSystemFactory:

require 'vendor/autoload.php';

try {
    $topicMapSystemFactory = \Phptmapi3\Core\TopicMapSystemFactory::newInstance();
    // create a topic map system, then topic maps, topics, etc.
} catch (\Phptmapi3\Core\FactoryConfigurationException $e) {
    print $e->getMessage();


Read a paper about TMAPI 2.0:

Generate an API documentation e.g. using or have a look at which is still valid on API level.


Public Domain (see LICENSE)