otobank/php-crowi

There is no license information available for the latest version (dev-master) of this package.

[Crowi](http://crowi.wiki)

dev-master 2015-12-22 04:32 UTC

This package is auto-updated.

Last update: 2024-10-18 20:43:33 UTC


README

PHP Library for Crowi

Usage

<?php

require_once __DIR__ . '/vendor/autoload.php';

$crowi = new Crowi\Crowi([
    'mongodb_url' => getenv('MONGO_URL'),
]);

$md = new Parsedown();

$pages = $crowi->Page->findBy([
    'path' => new \MongoRegex('/^\/user\/riaf/'),
    'grant' => Crowi\Document\Page::GRANT_PUBLIC,
], null, 5);

foreach ($pages as $page) {
    var_dump($page->getPath());
    var_dump($md->text($page->getRevision()->getBody()));
}