Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagodp/rtti
A Run-Time Type Information extractor, useful for getting/setting private attributes from/to PHP objects.
https://github.com/thiagodp/rtti
attribute class php phputil run-time type
Last synced: 8 days ago
JSON representation
A Run-Time Type Information extractor, useful for getting/setting private attributes from/to PHP objects.
- Host: GitHub
- URL: https://github.com/thiagodp/rtti
- Owner: thiagodp
- License: mit
- Created: 2015-10-22T19:25:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-27T17:00:58.000Z (almost 7 years ago)
- Last Synced: 2024-12-07T20:12:02.479Z (26 days ago)
- Topics: attribute, class, php, phputil, run-time, type
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RTTI
A Run-Time Type Information extractor, useful for getting or setting private and protected attributes from/to PHP objects.
We use [semantic versioning](http://semver.org/). See [our releases](https://github.com/thiagodp/rtti/releases).
Classes:
* [phputil\RTTI](https://github.com/thiagodp/rtti/blob/master/lib/RTTI.php)
### Installation
```command
composer require phputil/rtti
```### Example
Extracting all attributes from a class (even `private` or `protected`).
```php
name = $n; }
function getName() { return $this->name; }
}// array( 'user' => 'Bob' )
var_dump( RTTI::getAttributes( new User( 'Bob' ), RTTI::allFlags() ) );
?>
```## License
[MIT](https://choosealicense.com/licenses/mit/) (c) [Thiago Delgado Pinto](https://github.com/thiagodp)