2017 © Pedro Peláez
 

library scabbia2-scanners

Scabbia2 Scanners Component

image

scabbiafw/scabbia2-scanners

Scabbia2 Scanners Component

  • Tuesday, September 22, 2015
  • by eserozvataf
  • Repository
  • 1 Watchers
  • 1 Stars
  • 103 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Scabbia2 Scanners Component

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., (*1)

Build Status Scrutinizer Code Quality Total Downloads Latest Stable Version Latest Unstable Version Documentation Status, (*2)

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/');

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., (*3)

  • 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

The Versions

22/09 2015

dev-master

9999999-dev http://www.scabbiafw.com/

Scabbia2 Scanners Component

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

scabbia larukedi scabbia2 scabbiafw scanners

16/09 2015

v0.1.2

0.1.2.0 http://www.scabbiafw.com/

Scabbia2 Scanners Component

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

scabbia larukedi scabbia2 scabbiafw scanners