|
Project Information
Links
|
About TWikiLib for PHPThis library provides an object-oriented API to a TWiki database. The main goal is to help users familiar with PHP extract data from TWiki database which would otherwise require knowledge of the PERL programming language. Our library is intended to be self-contained and easily pluggable into other PHP projects, such as Joomla or Wordpress. TWiki stores its data in a directory structure where wiki pages (called topics) are stored as separate textual files. Topics can also contain attached files. Information within topics can be organized into sections, paragraphs and tables. Some topics contain so-called forms which are collections of key-value pairs (fields). This allows presenting information in a more structured way. For example, you could attach a ProjectForm to topics that carry information about your projects and define fields such as "Project Name", "Deadline" ... Using twikilib-php you can, for instance, search for topics by text located within form fields. Download Latest VersionDownload the following PHAR bundles and move them to your project's directory:
Note: See UsageExamples if you have never used PHARs before. Requirements
ExampleFor more examples and user documentation see UsageExamples. <?php
require_once 'init-twikilib-api.php';
use twikilib\core\Config;
use twikilib\core\FilesystemDB;
$config = new Config('myconfig.ini');
$db = new FilesystemDB($config);
$topic = $db->loadTopicByName('Main.WebHome');
$lastModified = $topic->getTopicInfoNode()->getTopicDate();
echo $lastModified;
?>Features Overview
|