2017-25 © Pedro Peláez
 

library classnames

A missing class name extractor from PHP files.

image

alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  • Wednesday, December 20, 2017
  • by alex.oleshkevich
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,154 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 12 % Grown

The README.md

PHP Class\Interface\Trait names extractor from files.

This library extracts entity names from php files.
Supports plain classes, multiple entity per file, classes within curly namespaces, etc., (*1)

Build Status Latest Stable Version Monthly Downloads Total Downloads Latest Unstable Version Deps. Status, (*2)

Installation

composer install alex-oleshkevich/classnames

Example

$extractor = new \ClassNames\ClassNames;
$classes = $extractor->getClassNames('/path/to/file.php');
// or 
$interfaces = $extractor->getInterfaceNames('/path/to/file.php');
// or 
$traits = $extractor->getTraitNames('/path/to/file.php');

All functions listed above return a plain array of found entities., (*3)

// file "/path/to/file.php"
namespace TestAsset {
    class Asset {}
    class Asset2 {}
}

$extractor = new \ClassNames\ClassNames;
$classes = $extractor->getClassNames('/path/to/file.php');
print_r($classes);
/**
* Array
* (
*     [0] => TestAsset\Asset
*     [1] => TestAsset\Asset2
* )
*/

The Versions

20/12 2017

dev-master

9999999-dev https://github.com/alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

20/12 2017

1.1

1.1.0.0 https://github.com/alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

22/09 2016

1.0.4

1.0.4.0 https://github.com/alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

22/09 2016

1.0.3

1.0.3.0 https://github.com/alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

22/09 2016

1.0.2

1.0.2.0 https://github.com/alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

22/09 2016

1.0.1

1.0.1.0 https://github.com/alex-oleshkevich/classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

21/09 2016

1.0

1.0.0.0 https://github.com/alex-oleshkevich/php-classnames

A missing class name extractor from PHP files.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires