Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/vendor/yiisoft/yii2/base/ |
Upload File : |
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * Request represents a request that is handled by an [[Application]]. * * For more details and usage information on Request, see the [guide article on requests](guide:runtime-requests). * * @property bool $isConsoleRequest The value indicating whether the current request is made via console. * @property string $scriptFile Entry script file path (processed w/ realpath()). * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ abstract class Request extends Component { private $_scriptFile; private $_isConsoleRequest; /** * Resolves the current request into a route and the associated parameters. * @return array the first element is the route, and the second is the associated parameters. */ abstract public function resolve(); /** * Returns a value indicating whether the current request is made via command line. * @return bool the value indicating whether the current request is made via console */ public function getIsConsoleRequest() { return $this->_isConsoleRequest !== null ? $this->_isConsoleRequest : PHP_SAPI === 'cli'; } /** * Sets the value indicating whether the current request is made via command line. * @param bool $value the value indicating whether the current request is made via command line */ public function setIsConsoleRequest($value) { $this->_isConsoleRequest = $value; } /** * Returns entry script file path. * @return string entry script file path (processed w/ realpath()) * @throws InvalidConfigException if the entry script file path cannot be determined automatically. */ public function getScriptFile() { if ($this->_scriptFile === null) { if (isset($_SERVER['SCRIPT_FILENAME'])) { $this->setScriptFile($_SERVER['SCRIPT_FILENAME']); } else { throw new InvalidConfigException('Unable to determine the entry script file path.'); } } return $this->_scriptFile; } /** * Sets the entry script file path. * The entry script file path can normally be determined based on the `SCRIPT_FILENAME` SERVER variable. * However, for some server configurations, this may not be correct or feasible. * This setter is provided so that the entry script file path can be manually specified. * @param string $value the entry script file path. This can be either a file path or a [path alias](guide:concept-aliases). * @throws InvalidConfigException if the provided entry script file path is invalid. */ public function setScriptFile($value) { $scriptFile = realpath(Yii::getAlias($value)); if ($scriptFile !== false && is_file($scriptFile)) { $this->_scriptFile = $scriptFile; } else { throw new InvalidConfigException('Unable to determine the entry script file path.'); } } }