Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

Interfaces

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 6:  * @package Nette\Http
 7:  */
 8: 
 9: 
10: 
11: /**
12:  * Extended HTTP URL.
13:  *
14:  * <pre>
15:  * https://nette.org/admin/script.php/pathinfo/?name=param#fragment
16:  *                 \_______________/\________/
17:  *                        |              |
18:  *                   scriptPath       pathInfo
19:  * </pre>
20:  *
21:  * - scriptPath:  /admin/script.php (or simply /admin/ when script is directory index)
22:  * - pathInfo:    /pathinfo/ (additional path information)
23:  *
24:  * @author     David Grudl
25:  *
26:  * @property   string $scriptPath
27:  * @property-read string $pathInfo
28:  * @package Nette\Http
29:  */
30: class NUrlScript extends NUrl
31: {
32:     /** @var string */
33:     private $scriptPath = '/';
34: 
35: 
36:     /**
37:      * Sets the script-path part of URI.
38:      * @param  string
39:      * @return self
40:      */
41:     public function setScriptPath($value)
42:     {
43:         $this->updating();
44:         $this->scriptPath = (string) $value;
45:         return $this;
46:     }
47: 
48: 
49:     /**
50:      * Returns the script-path part of URI.
51:      * @return string
52:      */
53:     public function getScriptPath()
54:     {
55:         return $this->scriptPath;
56:     }
57: 
58: 
59:     /**
60:      * Returns the base-path.
61:      * @return string
62:      */
63:     public function getBasePath()
64:     {
65:         $pos = strrpos($this->scriptPath, '/');
66:         return $pos === FALSE ? '' : substr($this->path, 0, $pos + 1);
67:     }
68: 
69: 
70:     /**
71:      * Returns the additional path information.
72:      * @return string
73:      */
74:     public function getPathInfo()
75:     {
76:         return (string) substr($this->path, strlen($this->scriptPath));
77:     }
78: 
79: }
80: 
Nette Framework 2.0.18 (for PHP 5.2, prefixed) API documentation generated by ApiGen 2.8.0