Download the PHP package khalyomede/expose without Composer
On this page you can find all versions of the php package khalyomede/expose. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khalyomede/expose
More information about khalyomede/expose
Files in khalyomede/expose
Package expose
Short Description Expose your classes through functions to speed up your development
License MIT
Informations about the package expose
Warning
This package is now abandoned because of security issue regarding a core function of php (more information by following this link).
Expose
Expose your classes through functions to speed up your development.
From
To
Summary
- Prerequisites
- Installation
- Examples of uses
- Methods definitions
- MIT Licence
Prerequisites
- PHP version >= 7.0.0
Installation
In your project folder:
Examples of uses
All the examples are available inside /example
folder.
All the examples bellow assume the following classes exists:
- Example 1: exposing a simple class
- Example 2: exposing multiples classes at once
Example 1: exposing a simple class
Will display:
Example 2: exposing multiple classes at once
Will display:
Methods definition
- make()
make()
Expose the class using its alias a shortcut, and create the related function.
Exceptions
InvalidArgumentException
:
- If the first parameter is not a string when using 2 parameters
- If the second parameter is not a string when using 2 parameters
- If the function name already exists
- If the parameter is not an array when using a single parameter
- If the parameter is not an array of array when using a single parameter
- If the paramter is not an array of array containing string when using a single parameter
- If the parameter contains an empty row on its array of array when using a single parameter
Note
This function can exposes static classes as well.
MIT Licence
Expose
Copyright © 2018 Khalyomede
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the oftware, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN CTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.