2017 © Pedro Peláez
 

library amylian-utils

ATTENTION: EXPERIMENTAL! Amylian Utilities

image

amylian/amylian-utils

ATTENTION: EXPERIMENTAL! Amylian Utilities

  • Wednesday, May 9, 2018
  • by ancpru
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Amylian Utils for PHP (Package amylian/amylian-utils)

Copyright (c) 2018, Andreas Prucha (Abexto - Helicon Software Development / Amylian Project) andreas.prucha@gmail.com, (*1)

This package contains a collection of miscellaneous utility classes and functions, (*2)

Installation

To install this library, run the command below and you will get the latest version, (*3)

``` bash composer require amylian/amylian-utils --dev, (*4)


##PropertyTrait 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. Example:

/** * @property mixed $prop Property automatically getted and setted by getProp and setProp */ class ObjectWithProperties { use \Amylian\Utils\ṔropertyTrait;, (*5)

public $memb = null;

private $prop = null;

public function getProp()
{
    return $this->prop;
}

public function setProp($value)
{
    $this->prop = $value;
}

} ```, (*6)

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., (*7)

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

The Versions

09/05 2018

dev-master

9999999-dev

ATTENTION: EXPERIMENTAL! Amylian Utilities

  Sources   Download

BSD-3-Clause