%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/wiki.varak.net/vendor/wikimedia/remex-html/RemexHtml/
Upload File :
Create Path :
Current File : //www/varak.net/wiki.varak.net/vendor/wikimedia/remex-html/RemexHtml/PropGuard.php

<?php

namespace RemexHtml;

/**
 * This is a statically configurable mechanism for preventing the setting of
 * undeclared properties on objects. The point of it is to detect programmer
 * errors.
 */
trait PropGuard {
	public static $armed = true;

	public function __set( $name, $value ) {
		if ( self::$armed ) {
			throw new \Exception( "Property \"$name\" on object of class " . get_class( $this ) .
				" is undeclared" );
		} else {
			$this->$name = $value;
		}
	}
}

Zerion Mini Shell 1.0