Source for file ObjectMixin.php
Documentation is available at ObjectMixin.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * Nette\Object behaviour mixin.
- 17: *
- 20: */
- 22: {
- 28: /**
- 29: * Static class - cannot be instantiated.
- 30: */
- 32: {
- 34: }
- 38: /**
- 39: * Call to undefined method.
- 40: *
- 45: */
- 47: {
- 52: }
- 54: // event functionality
- 59: }
- 60: }
- 62: }
- 64: // extension methods
- 68: }
- 71: }
- 75: /**
- 76: * Returns property value.
- 77: *
- 81: */
- 83: {
- 88: }
- 91: // get_class_methods returns ONLY PUBLIC methods of objects
- 92: // but returns static methods too (nothing doing...)
- 93: // and is much faster than reflection
- 94: // (works good since 5.0.4)
- 96: }
- 98: // property getter support
- 102: // ampersands:
- 103: // - uses &__get() because declaration should be forward compatible (e.g. with Nette\Web\Html)
- 104: // - doesn't call &$_this->$m because user could bypass property setter by: $x = & $obj->property; $x = 'new value';
- 107: }
- 113: }
- 117: }
- 121: /**
- 122: * Sets value of a property.
- 123: *
- 128: */
- 130: {
- 135: }
- 139: }
- 141: // property setter support
- 143: if (isset(self::$methods[$class]['get' . $name]) || isset(self::$methods[$class]['is' . $name])) {
- 152: }
- 153: }
- 157: }
- 161: /**
- 162: * Is property defined?
- 163: *
- 166: */
- 168: {
- 171: }
- 176: }
- 179: return isset(self::$methods[$class]['get' . $name]) || isset(self::$methods[$class]['is' . $name]);
- 180: }
- 182: }