Object system for PHP

0.6.0 2016-10-08 15:52 UTC

This package is not auto-updated.

Last update: 2023-03-18 08:28:09 UTC


Package version Build Status Packagist Scrutinizer Code Quality

Object system implementation for PHP




cd /path/to/your/project
composer require zonuexe/objectsystem


  • Property type check at run time
    • trait TypedProperty
    • trait TypeAssert
    • class TypeDefinision
  • Object container
    • class ObjectArray
    • interface ToArrayInterface
  • Trait for general class
    • trait ReadOnly: 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() and set_error_handler().
    • 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.



see ./LICENSE.

Object system implementation for PHP
Copyright (c) 2016 [Baguette HQ](http://baguettephp.github.io/) / [USAMI Kenta](https://tadsan.github.io/) <tadsan@zonu.me>

Teto Kasane

I love Teto Kasane. (ja: Teto Kasane official site)

       r /
  __ , --ヽ!-- .、_
 !  `/::::;::::ヽ l
 !ニニ.|:/ ノ/ }::::}コ
 L二lイ  0´ 0 ,':ノコ
 lヽノ/ヘ、 '' ▽_ノイ ソ
  ソ´ /}`ス / ̄ ̄ ̄ ̄/
   .(_:;つ/  0401 / カタカタ
  ̄ ̄ ̄ ̄ ̄\/____/