2017 © Pedro Peláez
 

library rylai

PHP document export to JSON or import to specific API for distribution around the web

image

haodt/rylai

PHP document export to JSON or import to specific API for distribution around the web

  • Sunday, May 7, 2017
  • by haodt
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

RYLAI

PHP's document support library. Provide an application to build a complete and full featured document generator app., (*1)

Installation

composer require haodt/rylai

Usage

  • Take a look at rylai.php, that script is used to build this library document
  • Clone the script to your project, change paths to suit your need. Each path represent a repository.
  • Path's key should be your root namespace defined in composer.json . Take a look at this library's composer.json file for detail
require_once __DIR__ . "/vendor/autoload.php";

use Rylai\Analyzers\Docblock;
use Rylai\Runner\AbstractRunner;
use Rylai\Stores\Local;

class Runner extends AbstractRunner
{
    public function getPaths()
    {
        return [
            "Rylai" => __DIR__ . "/src/",
        ];
    }

    public function getAnalyzers()
    {
        return [
            new Docblock,
        ];
    }

    public function getStores()
    {
        return [
            new Local([
                "views" => __DIR__ . "/views",
                "store" => __DIR__ . "/docs",
            ]),
        ];
    }
}

$runner = new Runner();
$runner->run();

How it works?

  • Analyzer will read file and provide back a report for that file
  • Store will collect reports then save it to backend (html,nosql,sql ... )

Notes

  • In order to parse your files, rylai must be able to load all files and execute it. This will result in extension class might have some issues
  • This library is tested under psr 4 standard files and folders, if you use other coding standards, please write more tests for it.
  • There are issues with resolving Types alias like Rylai\Fixtures\Items\Courier for Courier inside tags so you have to compare it with namespaces aliases
  • Constants wont be able to have docblock so far
  • Local store will use key - value paths as in key is your root namespace, in this project case you can see composer.json load Rylai\ point to src folder

Todo

  • Elasticstore will be implemeted in near future
  • Replace ? mark as value of properties because there is some issues around private properties that blocking parser to read the value
  • Add few more analyzers

Development

  • Run tests
php vendor/phpunit/phpunit/phpunit
  • Pull requests are welcome :)

The Versions

07/05 2017

dev-master

9999999-dev

PHP document export to JSON or import to specific API for distribution around the web

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hao

php document doc to json