Source for file PresenterComponent.php
Documentation is available at PresenterComponent.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * PresenterComponent is the base class for all presenters components.
- 17: *
- 18: * Components are persistent objects located on a presenter. They have ability to own
- 19: * other child components, and interact with user. Components have properties
- 20: * for storing their status, and responds to user command.
- 21: *
- 24: *
- 26: */
- 27: abstract class PresenterComponent extends ComponentContainer implements ISignalReceiver, IStatePersistent, ArrayAccess
- 28: {
- 34: /**
- 35: */
- 37: {
- 40: }
- 44: /**
- 45: * Returns the presenter where this component belongs to.
- 48: */
- 50: {
- 52: }
- 56: /**
- 57: * Returns a fully-qualified name that uniquely identifies the component
- 58: * within the presenter hierarchy.
- 60: */
- 62: {
- 64: }
- 68: /**
- 69: * This method will be called when the component (or component's parent)
- 70: * becomes attached to a monitored object. Do not call this method yourself.
- 73: */
- 75: {
- 78: }
- 79: }
- 83: /**
- 84: * Calls public method if exists.
- 88: */
- 90: {
- 97: }
- 98: }
- 100: }
- 104: /**
- 105: * Access to reflection.
- 107: */
- 109: {
- 111: }
- 115: /********************* interface IStatePersistent ****************d*g**/
- 119: /**
- 120: * Loads state informations.
- 123: */
- 125: {
- 127: {
- 134: }
- 135: }
- 137: }
- 138: }
- 140: }
- 144: /**
- 145: * Saves state informations for next request.
- 149: */
- 151: {
- 154: {
- 166: }
- 169: throw new InvalidStateException("Persistent parameter must be scalar or array, {$this->reflection->name}::\$$nm is " . gettype($val));
- 177: }
- 179: }
- 180: }
- 181: }
- 185: /**
- 186: * Returns component param.
- 187: * If no key is passed, returns the entire array.
- 191: */
- 193: {
- 202: }
- 203: }
- 207: /**
- 208: * Returns a fully-qualified name that uniquely identifies the parameter.
- 210: */
- 212: {
- 215: }
- 219: /**
- 220: * Returns array of classes persistent parameters. They have public visibility and are non-static.
- 221: * This default implementation detects persistent parameters by annotation @persistent.
- 223: */
- 225: {
- 231: }
- 232: }
- 234: }
- 238: /********************* interface ISignalReceiver ****************d*g**/
- 242: /**
- 243: * Calls signal handler method.
- 247: */
- 249: {
- 251: throw new BadSignalException("There is no handler for signal '$signal' in {$this->reflection->name} class.");
- 252: }
- 253: }
- 257: /**
- 258: * Formats signal handler method name -> case sensitivity doesn't matter.
- 261: */
- 263: {
- 265: }
- 269: /********************* navigation ****************d*g**/
- 273: /**
- 274: * Generates URL to presenter, action or signal.
- 279: */
- 281: {
- 285: }
- 292: }
- 293: }
- 297: /**
- 298: * Returns destination as Link object.
- 302: */
- 304: {
- 308: }
- 311: }
- 315: /**
- 317: */
- 319: {
- 321: }
- 325: /**
- 326: * Redirect to another presenter, action or signal.
- 332: */
- 334: {
- 339: }
- 344: }
- 347: $presenter->redirectUri($presenter->createRequest($this, $destination, $args, 'redirect'), $code);
- 348: }
- 352: /********************* interface \ArrayAccess ****************d*g**/
- 356: /**
- 357: * Adds the component to the container.
- 361: */
- 363: {
- 365: }
- 369: /**
- 370: * Returns component specified by name. Throws exception if component doesn't exist.
- 374: */
- 376: {
- 378: }
- 382: /**
- 383: * Does component specified by name exists?
- 386: */
- 388: {
- 390: }
- 394: /**
- 395: * Removes component from the container. Throws exception if component doesn't exist.
- 398: */
- 400: {
- 404: }
- 405: }
- 407: }