承接 scabbiafw/scabbia2-scanners 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

scabbiafw/scabbia2-scanners

最新稳定版本:v0.1.2

Composer 安装命令:

composer require scabbiafw/scabbia2-scanners

包简介

Scabbia2 Scanners Component

README 文档

README

This component scans the source directories and compiles some information. It is basically designed for extracting annotations from docblocks but functionality can be extended by implementing Scabbia\Scanners\ScannerInterface.

Build Status Scrutinizer Code Quality Total Downloads Latest Stable Version Latest Unstable Version Documentation Status

Usage

Extracting Annotations from Source Folder

use Scabbia\Scanners\Scanners;
use Scabbia\Scanners\AnnotationScanner;

$annotationScanner = new AnnotationScanner();

$scanners = new Scanners();
$scanners->register($annotationScanner);
$scanners->processFolder('src/');

var_dump($annotationScanner->result);

Custom Scanner

use Scabbia\Scanners\Scanners;
use Scabbia\Scanners\ScannerInterface;
use Scabbia\Scanners\TokenStream;
use ReflectionClass;

$customScanner = new class () implements ScannerInterface {
    public function processFile($file, $fileContents) {
        echo 'processing file ', $file;
    }

    public function processTokenStream(TokenStream $tokenStream) {
    }

    public function processClass($class, ReflectionClass $reflection) {
        echo 'processing class ', $class;
    }

    public function finalize() {
        echo 'done.';
    }
};

$scanners = new Scanners();
$scanners->register($customScanner);
$scanners->processFolder('src/');

Links

Contributing

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the eserozvataf/scabbia2-scanners repository.

  • To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
  • To report a bug: If something does not work, please report it using GitHub issues.
  • To support: Donate

统计信息

  • 总下载量: 123
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-09-16