Amp\Struct trait Struct

A "safe" struct trait for public property aggregators.

This trait is intended to make using public properties a little safer by throwing when nonexistent property names are read or written.

Summary

Properties

Methods

Properties

$__propertySuggestThreshold — private $__propertySuggestThreshold = 70

The minimum percentage [0-100] at which to recommend a similar property name when generating error messages.

Methods

__get — public function __get(string $property)
No documentation.
Type Parameter Description Default Value
string $property No documentation. none
__set — public function __set(string $property, $value)
No documentation.
Type Parameter Description Default Value
string $property No documentation. none
mixed $value No documentation. none
generateStructPropertyError — private function generateStructPropertyError(string $property): string
No documentation.
Type Parameter Description Default Value
string $property No documentation. none
suggestPropertyName — private function suggestPropertyName(string $badProperty): string
No documentation.
Type Parameter Description Default Value
string $badProperty No documentation. none