public static function remove($_this, $name) { $class = get_class($_this); if (!self::hasProperty($class, $name)) { throw new MemberAccessException("Cannot unset the property {$class}::\${$name}."); } }
/** * Removes property. * @param string property name * @return void * @throws Nette\MemberAccessException */ public function __unset($name) { Nette\Utils\ObjectMixin::remove($this, $name); }