Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
No-nonsense flat-file storage system for content management systems.
PHP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
GibberishModel.php
LICENSE
README.md

README.md

Read This.

Gibberish is a mind-numbingly simple flat-file based content system. It has no router, no controllers, no views. It's just a simple flat-file parsing and indexing system.

This needs to be thought of as only the "Model" part of an MVC program. It can be extended like crazy.

Usage example:

Simple Gibberish "model" Class

/* Example folder structure:
 *  myblog/
 *   |- .list
 *   +- published/
 *       |- hello-world.post
 *       +- another-entry.post
 */  
class Article extends GibberishModel
{
    protected $items_path = 'myblog/published';
    protected $index_file = 'myblog/.list';
    protected $file_suffix = '.post';
}

Item listing using sample Blog "model"

$article = new Article();
foreach($article->getList() as $item)
{
    echo $item['title'].'<br/>';
}

Item display using sample Blog "model"

$article = new Article();
try
{
    if($item = $article->getSingle($slug))
    {
        print_r($item);
    }
    else
    {
        echo 'Not found!';
    }
}
catch(GibContentMalformedException $exception)
{
    echo 'Blog post content malformed!';
}
Something went wrong with that request. Please try again.