Source for file PresenterLoader.php
Documentation is available at PresenterLoader.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * Default presenter loader.
- 17: *
- 20: */
- 22: {
- 34: /**
- 36: */
- 38: {
- 40: }
- 44: /**
- 48: */
- 50: {
- 54: }
- 57: throw new InvalidPresenterException("Presenter name must be alphanumeric string, '$name' is invalid.");
- 58: }
- 63: // internal autoloading
- 67: }
- 70: throw new InvalidPresenterException("Cannot load presenter '$name', class '$class' was not found in '$file'.");
- 71: }
- 72: }
- 78: throw new InvalidPresenterException("Cannot load presenter '$name', class '$class' is not Nette\\Application\\IPresenter implementor.");
- 79: }
- 82: throw new InvalidPresenterException("Cannot load presenter '$name', class '$class' is abstract.");
- 83: }
- 85: // canonicalize presenter name
- 89: throw new InvalidPresenterException("Cannot load presenter '$name', case mismatch. Real name is '$realName'.");
- 93: }
- 96: }
- 99: }
- 103: /**
- 104: * Formats presenter class name from its name.
- 107: */
- 109: {
- 110: // PHP 5.3
- 113: }
- 117: /**
- 118: * Formats presenter name from class name.
- 121: */
- 123: {
- 124: // PHP 5.3
- 127: }
- 131: /**
- 132: * Formats presenter class file name.
- 135: */
- 137: {
- 139: return $this->baseDir . substr_replace($path, '/presenters', strrpos($path, '/'), 0) . 'Presenter.php';
- 140: }
- 142: }