mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Make Amp\Struct abstract to better represent its purpose
This commit is contained in:
parent
dcfe12cad8
commit
7e451251ab
@ -2,7 +2,14 @@
|
||||
|
||||
namespace Amp;
|
||||
|
||||
class Struct {
|
||||
/**
|
||||
* A "safe" Struct class for public property aggregators
|
||||
*
|
||||
* This class is intended to make using public properties a little safer by throwing when
|
||||
* nonexistent property names are read or written. All property aggregation classes in the
|
||||
* Amp library descend from Struct somewhere in their inheritance heirarchies.
|
||||
*/
|
||||
abstract class Struct {
|
||||
final public function __get($property) {
|
||||
throw new \DomainException(
|
||||
$this->generatePropertyError($property)
|
||||
|
Loading…
Reference in New Issue
Block a user