Amylian Core Utilities

v0.2.2 2019-05-08 02:31 UTC

This package is auto-updated.

Last update: 2024-05-08 14:01:41 UTC


Copyright (c) 2018, Andreas Prucha (Abexto - Helicon Software Development / Amylian Project)

This package contains a collection of miscellaneous utility classes and functions


To install this library, run the command below and you will get the latest version

composer require amylian/amylian-utils --dev


Using \Amylian\Utils\PropertyTrait in a class enables property support by getter and setter.

Access to private/protected member variables are automatically redirected to methods following the getXxx and setXxx convention.


 * @property mixed $prop Property automatically getted and setted by getProp and setProp
class ObjectWithProperties
    use \Amylian\Utils\ṔropertyTrait;
    public $memb = null;
    private $prop = null;
    public function getProp()
        return $this->prop;
    public function setProp($value)
        $this->prop = $value;

In this example, both $obj->memb and $obj->prop will be acceable from outside as the methods getProp() and setProp() are public and automatically called.

NOTE: \Amylian\Utils\ṔropertyTrait implements the magic functions __get(), __set(), __isset() and __unset().