https://github.com/baguettephp/objectsystem
Object system implementation for PHP
https://github.com/baguettephp/objectsystem
magic-method object-system oop packagist php teto-kasane
Last synced: about 2 months ago
JSON representation
Object system implementation for PHP
- Host: GitHub
- URL: https://github.com/baguettephp/objectsystem
- Owner: BaguettePHP
- License: other
- Created: 2014-12-07T16:52:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-24T08:54:45.000Z (about 2 years ago)
- Last Synced: 2025-08-24T20:49:23.350Z (2 months ago)
- Topics: magic-method, object-system, oop, packagist, php, teto-kasane
- Language: PHP
- Homepage: https://packagist.org/packages/zonuexe/objectsystem
- Size: 194 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Teto Objectsystem
=================
[](https://packagist.org/packages/zonuexe/objectsystem)
[](https://travis-ci.org/BaguettePHP/objectsystem)
[](https://packagist.org/packages/zonuexe/objectsystem)
[](https://scrutinizer-ci.com/g/BaguettePHP/objectsystem/?branch=master)
Object system implementation for PHP
Document
--------
* [API Reference](http://baguettephp.github.io/objectsystem/) (generated By [ApiGen](https://github.com/ApiGen/ApiGen) 4.1.2)
* in Japanese: [`TypedProperty`について](./poem.ja.md).
* in Japanese: [private/protectedなプロパティを外部から読み込み可能にする - Qiita](http://qiita.com/tadsan/items/2049243e47495764b191)
Installation
------------
### [Composer](https://getcomposer.org/)
```sh
cd /path/to/your/project
composer require zonuexe/objectsystem
```
Features
--------
* Property type check at run time
* `trait TypedProperty`
* `trait TypeAssert`
* `class TypeDefinision`
* Object container
* `class ObjectArray`
* `interface ToArrayInterface`
* Trait for general class
* `trait ReadOnlyTrait`: Restrict write to not accessable property.
* `trait PrivateGetter`: Private property behaves like read only.
* Very simple, but you may not be able to imagine the behavior of trait in the inherited class.
* Behavior of undefined property depends on [error_reporting()](http://php.net/manual/function.error-reporting.php) and [set_error_handler()](http://php.net/manual/function.set-error-handler.php).
* `trait PrivateStrictGetter`: Private property behaves like read only.
* Throws `OutOfRangeException` if propery is undefined.
* `trait MethodAlias`: Make alias of method.
* `trait PropertyLikeMethod`: Call method as property.
References
----------
* [phpDocumentor Definition of a ‘Type’](http://www.phpdoc.org/docs/latest/references/phpdoc/types.html)
Copyright
---------
see `./LICENSE`.
Object system implementation for PHP
Copyright (c) 2016 [Baguette HQ](http://baguettephp.github.io/) / [USAMI Kenta](https://tadsan.github.io/)
Teto Kasane
-----------
I love [Teto Kasane](http://utau.wikia.com/wiki/Teto_Kasane). (ja: [Teto Kasane official site](http://kasaneteto.jp/))
```
r /
__ , --ヽ!-- .、_
! `/::::;::::ヽ l
!二二!::/}::::丿ハニ|
!ニニ.|:/ ノ/ }::::}コ
L二lイ 0´ 0 ,':ノコ
lヽノ/ヘ、 '' ▽_ノイ ソ
ソ´ /}`ス / ̄ ̄ ̄ ̄/
.(_:;つ/ 0401 / カタカタ
 ̄ ̄ ̄ ̄ ̄\/____/
```