Download the PHP package raphhh/trex-reflection without Composer

On this page you can find all versions of the php package raphhh/trex-reflection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package trex-reflection

TRex Reflection

Latest Stable Version Build Status Scrutinizer Quality Score Code Coverage Dependency Status Total Downloads Reference Status License

PHP tool to reflect callables an types.

Installation

Use composer command:

Documentation

CallableReflection

You can use CallableReflection to inspect and call a callable, like a callback or a Closure for example.

All kind of callable

You can know which kind of callable is given.

Closure
Function
Static method
Instance method
Invoked object

Retrieve contexts

You can retrieve the callable, like the object or the method name for example.

Closure
Function
Static method
Instance method
Invoked object

Invoke callable

You can invoke every kind of callable in a same way.

With a list of args

This method calls the method and give to it all its args.

With an array of args

This method allows to map each value of an array with every params of a function. Useful to use dynamic args with func_get_args().

With a map of args

This method allows to map the keys of an array with the name of the params of a function. So, the order of the args has no importance.

Retrieve the associated reflection class

Retrieve the ReflectionFunctionAbstract of the callable.

For a function or a closure
For a method
For a class

Note that for a class, we get a ReflectionMethod for the __invoke method of the current object, and not a ReflectionClass.

TypeReflection

Reflection on the type of a variable or function.

What is a type?

A type is a string defined by a specific value related to one of the PHP types.

If you work with a variable, you can use TypeReflection::createFromVariable($variable)

Note the TypeReflection is case insensitive.

Standardized types

TypeReflection standardizes types with following values:

Valid any type

Recognition
boolean
string
integer
float
number

Any integer or float value.

scalar

Any boolean, string or number value.

array
object
resource
callable
void
null
mixed

Retrieve a standard notation


All versions of trex-reflection with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package raphhh/trex-reflection contains the following files

Loading the files please wait ....