Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.01 KB

readme.md

File metadata and controls

43 lines (28 loc) · 1.01 KB

PhpDepend

Extracts list of dependencies (classes, interfaces & traits) from PHP file or code snippet.

Usage

$phpdepend = new Cz\PhpDepend;
$phpdepend->parseFile('MyClass.php');

/* or use
$source = file_get_contents('MyClass.php');
$phpdepend->parse($source);
*/

// returns list of defined classes, interfaces & traits
var_dump($phpdepend->getClasses());
// returns list of required classes, interfaces & traits
var_dump($phpdepend->getDependencies());

API documentation

Installation

Download a latest package or use Composer:

composer require czproject/phpdepend

PHPDepend requires PHP 5.3.0 or later and enabled Tokenizer extension (enabled by default from PHP 4.3.0).


License: New BSD License
Author: Jan Pecha, http://janpecha.iunas.cz/