Registry / utility / granam-strict-object

granam-strict-object

JSON →
library3.1.0phppackagistunverified

Base object that checks access to undefined properties and methods, enforcing strict behavior.

composer require granam/strict-object
INSTALL
IMPORT
SIG · GRANAM-STRICT-OBJE
G
granam-strict-object
utilityphpv3.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StrictObject
use Granam\Strict\Object\StrictObject;

Extend StrictObject to enforce strict property access.

use Granam\Strict\Object\StrictObject; class MyClass extends StrictObject { public $allowedProperty = 'value'; } $obj = new MyClass(); echo $obj->allowedProperty; // works $obj->undefinedProperty; // throws exception
Debug
Known issues
breakingAccessing undefined properties or methods throws exceptions, which may break existing code.
fix
Ensure all properties and methods are defined before use, or catch exceptions.
affects: >=3.0.0
Upgrade
Version history
3.1.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
granam-strict-object — pip install granam-strict-object · libregistry