funkyproject/reflection-file

There is no license information available for the latest version (v0.1) of this package.

v0.1 2014-04-02 16:24 UTC

This package is auto-updated.

Last update: 2024-04-05 01:54:50 UTC


README

Use Attraktiv\ReflectionFile to retrieve a lot of information about class into the file.

Build Status Scrutinizer Code Quality Code Coverage

Installation

You can install this lib using composer

composer require funkyproject/reflection-file

or add the package to your composer.json file directly

Usage

use Funkyproject\ReflectionFIle;

$reflectionFile = new ReflectionFile($pathFileValid);
$reflectionFile->getName() // Namespace/ClassName
$instance = $reflectionFile->newInstance();

More information about methods are available on http://www.php.net/manual/en/class.reflectionclass.php

If file not found, ReflectionFile will throw a FileNotFoundException

If file is not a class, ReflectionFile will throw a ReflectionException

Tests

You can run the unit tests with the following command:

 $ cd path/to/ReflectionFile/
 $ composer.phar install
 $ phpunit