fdt2k/baseobject

ROOT style object for php

Installs: 82

Dependents: 3

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/fdt2k/baseobject

dev-master 2017-11-01 17:59 UTC

This package is auto-updated.

Last update: 2025-09-11 21:51:18 UTC


README

ROOT object for php providing the following features

1. Create function constructor.
Allow to instanciate and chain

$class::create()->foo();


2. Allow retrieving inherited classes and interfaces


3. Magic setter and getter with builtin functions

  //set and get

  $instance->setFooVar('hello world');
  //returns nothing


  $instance->getFooVar();
  // returns hello world;

  $instance->hasFooVar();
  //returns true

  $instance->hasBarVar();
  //return false

  //iterate if the content of fooVar is an Array and call the function parameter. If it's not an array it only call the callback with the value
  $instance->withFooVar(function($value){});