- sfBrowserBase.class.php
- abstract class sfBrowserBase
- {
- protected
- $hostname = null,
- $remote = null,
- $dom = null,
- $stack = array(),
- $stackPosition = -1,
- $cookieJar = array(),
- $fields = array(),
- $files = array(),
- $vars = array(),
- $defaultServerArray = array(),
- $headers = array(),
- $currentException = null,
- $domCssSelector = null;
-
- public function __construct($hostname = null, $remote = null, $options = array())
- {
- $this->initialize($hostname, $remote, $options);
- }
-
- public function initialize($hostname = null, $remote = null, $options = array())
- {
- unset($_SERVER['argv']);
- unset($_SERVER['argc']);
-
- $this->hostname = null === $hostname ? 'localhost' : $hostname;
- $this->remote = null === $remote ? '127.0.0.1' : $remote;
-
- $this->newSession();
-
- $this->defaultServerArray = $_SERVER;
-
- register_shutdown_function(array($this, 'shutdown'));
- }
-
- public function setVar($name, $value)
- {
- $this->vars[$name] = $value;
- return $this;
- }
-
- public function setHttpHeader($header, $value)
- {
- $this->headers[$header] = $value;
- return $this;
- }
-
- public function setCookie($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)
- {
- $this->cookieJar[$name] = array(
- 'name' => $name,
- 'value' => $value,
- 'expire' => $expire,
- 'path' => $path,
- 'domain' => $domain,
- 'secure' => (Boolean) $secure,
- 'httpOnly' => $httpOnly,
- );
- return $this;
- }
-
- public function removeCookie($name)
- {
- unset($this->cookieJar[$name]);
- return $this;
- }
-
- public function clearCookies()
- {
- $this->cookieJar = array();
- return $this;
- }
-
- public function setAuth($username, $password)
- {
- $this->vars['PHP_AUTH_USER'] = $username;
- $this->vars['PHP_AUTH_PW'] = $password;
- return $this;
- }
-
- public function get($uri, $parameters = array(), $changeStack = true)
- {
- return $this->call($uri, 'get', $parameters);
- }
-
- public function post($uri, $parameters = array(), $changeStack = true)
- {
- return $this->call($uri, 'post', $parameters);
- }
-
- public function call($uri, $method = 'get', $parameters = array(), $changeStack = true)
- {
-
- $this->checkCurrentExceptionIsEmpty();
- $uri = $this->fixUri($uri);
-
- if ($changeStack)
- {
- $this->stack = array_slice($this->stack, 0, $this->stackPosition + 1);
- $this->stack[] = array(
- 'uri' => $uri,
- 'method' => $method,
- 'parameters' => $parameters,
- );
- $this->stackPosition = count($this->stack) - 1;
- }
- list($path, $queryString) = false !== ($pos = strpos($uri, '?')) ? array(substr($uri, 0, $pos), substr($uri, $pos + 1)) : array($uri, '');
- $queryString = html_entity_decode($queryString);
-
- $path = preg_replace('/#.*/', '', $path);
-
- $this->fields = array();
-
- $_SERVER = $this->defaultServerArray;
- $_SERVER['HTTP_HOST'] = $this->hostname;
- $_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
- $_SERVER['SERVER_PORT'] = 80;
- $_SERVER['HTTP_USER_AGENT'] = 'PHP5/CLI';
- $_SERVER['REMOTE_ADDR'] = $this->remote;
- $_SERVER['REQUEST_METHOD'] = strtoupper($method);
- $_SERVER['PATH_INFO'] = $path;
- $_SERVER['REQUEST_URI'] = '/index.php'.$uri;
- $_SERVER['SCRIPT_NAME'] = '/index.php';
- $_SERVER['SCRIPT_FILENAME'] = '/index.php';
- $_SERVER['QUERY_STRING'] = $queryString;
- if ($this->stackPosition >= 1)
- {
- $_SERVER['HTTP_REFERER'] = sprintf('http%s://%s%s', isset($this->defaultServerArray['HTTPS']) ? 's' : '', $this->hostname, $this->stack[$this->stackPosition - 1]['uri']);
- }
- foreach ($this->vars as $key => $value)
- {
- $_SERVER[strtoupper($key)] = $value;
- }
- foreach ($this->headers as $header => $value)
- {
- $_SERVER['HTTP_'.strtoupper(str_replace('-', '_', $header))] = $value;
- }
- $this->headers = array();
-
- $_GET = $_POST = array();
- if (in_array(strtoupper($method), array('POST', 'DELETE', 'PUT')))
- {
- if (isset($parameters['_with_csrf']) && $parameters['_with_csrf'])
- {
- unset($parameters['_with_csrf']);
- $form = new BaseForm();
- $parameters[$form->getCSRFFieldName()] = $form->getCSRFToken();
- }
- $_POST = $parameters;
- }
- if (strtoupper($method) == 'GET')
- {
- $_GET = $parameters;
- }
-
- $_FILES = array();
- if (count($this->files))
- {
- $_FILES = $this->files;
- }
- $this->files = array();
- parse_str($queryString, $qs);
- if (is_array($qs))
- {
- $_GET = array_merge($qs, $_GET);
- }
-
- $cookies = $this->cookieJar;
- foreach ($cookies as $name => $cookie)
- {
- if ($cookie['expire'] && $cookie['expire'] < time())
- {
- unset($this->cookieJar[$name]);
- }
- }
-
- $_COOKIE = array();
- foreach ($this->cookieJar as $name => $cookie)
- {
- $_COOKIE[$name] = $cookie['value'];
- }
- $this->doCall();
- $response = $this->getResponse();
-
- foreach ($response->getCookies() as $name => $cookie)
- {
-
- $this->cookieJar[$name] = $cookie;
- }
-
- if ($etag = $response->getHttpHeader('Etag'))
- {
- $this->vars['HTTP_IF_NONE_MATCH'] = $etag;
- }
- else
- {
- unset($this->vars['HTTP_IF_NONE_MATCH']);
- }
-
- if ($lastModified = $response->getHttpHeader('Last-Modified'))
- {
- $this->vars['HTTP_IF_MODIFIED_SINCE'] = $lastModified;
- }
- else
- {
- unset($this->vars['HTTP_IF_MODIFIED_SINCE']);
- }
-
- $this->dom = null;
- $this->domCssSelector = null;
- if (preg_match('/(x|ht)ml/i', $response->getContentType(), $matches))
- {
- $this->dom = new DomDocument('1.0', $response->getCharset());
- $this->dom->validateOnParse = true;
- if ('x' == $matches[1])
- {
- @$this->dom->loadXML($response->getContent());
- }
- else
- {
- @$this->dom->loadHTML($response->getContent());
- }
- $this->domCssSelector = new sfDomCssSelector($this->dom);
- }
- return $this;
- }
-
- abstract protected function doCall();
-
- public function back()
- {
- if ($this->stackPosition < 1)
- {
- throw new LogicException('You are already on the first page.');
- }
- --$this->stackPosition;
- return $this->call($this->stack[$this->stackPosition]['uri'], $this->stack[$this->stackPosition]['method'], $this->stack[$this->stackPosition]['parameters'], false);
- }
-
- public function forward()
- {
- if ($this->stackPosition > count($this->stack) - 2)
- {
- throw new LogicException('You are already on the last page.');
- }
- ++$this->stackPosition;
- return $this->call($this->stack[$this->stackPosition]['uri'], $this->stack[$this->stackPosition]['method'], $this->stack[$this->stackPosition]['parameters'], false);
- }
-
- public function reload()
- {
- if (-1 == $this->stackPosition)
- {
- throw new LogicException('No page to reload.');
- }
- return $this->call($this->stack[$this->stackPosition]['uri'], $this->stack[$this->stackPosition]['method'], $this->stack[$this->stackPosition]['parameters'], false);
- }
-
- public function getResponseDomCssSelector()
- {
- if (null === $this->domCssSelector)
- {
- throw new LogicException('The DOM is not accessible because the browser response content type is not HTML.');
- }
- return $this->domCssSelector;
- }
-
- public function getResponseDomXpath()
- {
- return new DOMXPath($this->getResponseDom());
- }
-
- public function getResponseDom()
- {
- if (null === $this->dom)
- {
- throw new LogicException('The DOM is not accessible because the browser response content type is not HTML.');
- }
- return $this->dom;
- }
-
- abstract public function getResponse();
-
- abstract public function getRequest();
-
- abstract public function getUser();
-
- public function getCurrentException()
- {
- return $this->currentException;
- }
-
- public function setCurrentException(Exception $exception)
- {
- $this->currentException = $exception;
- }
-
- public function resetCurrentException()
- {
- $this->currentException = null;
- sfException::clearLastException();
- }
-
- public function checkCurrentExceptionIsEmpty()
- {
- return null === $this->getCurrentException() || $this->getCurrentException() instanceof sfError404Exception;
- }
-
- public function followRedirect()
- {
- if (null === $this->getResponse()->getHttpHeader('Location'))
- {
- throw new LogicException('The request was not redirected.');
- }
- return $this->get($this->getResponse()->getHttpHeader('Location'));
- }
-
- public function setField($name, $value)
- {
-
- $this->parseArgumentAsArray($name, $value, $this->fields);
- return $this;
- }
-
- public function deselect($name)
- {
- $this->doSelect($name, false);
- return $this;
- }
-
- public function select($name)
- {
- $this->doSelect($name, true);
- return $this;
- }
-
- public function doSelect($name, $selected)
- {
- $xpath = $this->getResponseDomXpath();
- if ($element = $xpath->query(sprintf('//input[(@type="radio" or @type="checkbox") and (.="%s" or @id="%s" or @name="%s")]', $name, $name, $name))->item(0))
- {
- if ($selected)
- {
- if ($element->getAttribute('type') == 'radio')
- {
-
- foreach ($xpath->query(sprintf('//input[@type="radio" and @name="%s"]', $element->getAttribute('name'))) as $radio)
- {
- $radio->removeAttribute('checked');
- }
- }
- $element->setAttribute('checked', 'checked');
- }
- else
- {
- if ($element->getAttribute('type') == 'radio')
- {
- throw new InvalidArgumentException('Radiobutton cannot be deselected - Select another radiobutton to deselect the current.');
- }
- $element->removeAttribute('checked');
- }
- }
- else
- {
- throw new InvalidArgumentException(sprintf('Cannot find the "%s" checkbox or radiobutton.', $name));
- }
- }
-
- public function click($name, $arguments = array(), $options = array())
- {
- if ($name instanceof DOMElement)
- {
- list($uri, $method, $parameters) = $this->doClickElement($name, $arguments, $options);
- }
- else
- {
- try
- {
- list($uri, $method, $parameters) = $this->doClick($name, $arguments, $options);
- }
- catch (InvalidArgumentException $e)
- {
- list($uri, $method, $parameters) = $this->doClickCssSelector($name, $arguments, $options);
- }
- }
- return $this->call($uri, $method, $parameters);
- }
-
- public function doClick($name, $arguments = array(), $options = array())
- {
- if (false !== strpos($name, '[') || false !== strpos($name, ']'))
- {
- throw new InvalidArgumentException(sprintf('The name "%s" is not valid', $name));
- }
- $query = sprintf('//a[.="%s"]', $name);
- $query .= sprintf('|//a/img[@alt="%s"]/ancestor::a', $name);
- $query .= sprintf('|//input[((@type="submit" or @type="button") and @value="%s") or (@type="image" and @alt="%s")]', $name, $name);
- $query .= sprintf('|//button[.="%s" or @id="%s" or @name="%s"]', $name, $name, $name);
- $list = $this->getResponseDomXpath()->query($query);
- $position = isset($options['position']) ? $options['position'] - 1 : 0;
- if (!$item = $list->item($position))
- {
- throw new InvalidArgumentException(sprintf('Cannot find the "%s" link or button (position %d).', $name, $position + 1));
- }
- return $this->doClickElement($item, $arguments, $options);
- }
-
- public function doClickCssSelector($selector, $arguments = array(), $options = array())
- {
- $elements = $this->getResponseDomCssSelector()->matchAll($selector)->getNodes();
- $position = isset($options['position']) ? $options['position'] - 1 : 0;
- if (isset($elements[$position]))
- {
- return $this->doClickElement($elements[$position], $arguments, $options);
- }
- else
- {
- throw new InvalidArgumentException(sprintf('Could not find the element "%s" (position %d) in the current DOM.', $selector, $position + 1));
- }
- }
-
- public function doClickElement(DOMElement $item, $arguments = array(), $options = array())
- {
- $method = strtolower(isset($options['method']) ? $options['method'] : 'get');
- if ('a' == $item->nodeName)
- {
- if (in_array($method, array('post', 'put', 'delete')))
- {
- if (isset($options['_with_csrf']) && $options['_with_csrf'])
- {
- $arguments['_with_csrf'] = true;
- }
- return array($item->getAttribute('href'), $method, $arguments);
- }
- else
- {
- return array($item->getAttribute('href'), 'get', $arguments);
- }
- }
- else if ('button' == $item->nodeName || ('input' == $item->nodeName && in_array($item->getAttribute('type'), array('submit', 'button', 'image'))))
- {
-
- $this->parseArgumentAsArray($item->getAttribute('name'), $item->getAttribute('value'), $arguments);
-
- do
- {
- if (null === $item = $item->parentNode)
- {
- throw new Exception('The clicked form element does not have a form ancestor.');
- }
- }
- while ('form' != $item->nodeName);
- }
-
- $url = $item->getAttribute('action');
- if (!$url || '#' == $url)
- {
- $url = $this->stack[$this->stackPosition]['uri'];
- }
- $method = strtolower(isset($options['method']) ? $options['method'] : ($item->getAttribute('method') ? $item->getAttribute('method') : 'get'));
-
- $defaults = array();
- $arguments = sfToolkit::arrayDeepMerge($this->fields, $arguments);
- $xpath = $this->getResponseDomXpath();
- foreach ($xpath->query('descendant::input | descendant::textarea | descendant::select', $item) as $element)
- {
- $elementName = $element->getAttribute('name');
- $nodeName = $element->nodeName;
- $value = null;
- if ($nodeName == 'input' && ($element->getAttribute('type') == 'checkbox' || $element->getAttribute('type') == 'radio'))
- {
- if ($element->getAttribute('checked'))
- {
- $value = $element->hasAttribute('value') ? $element->getAttribute('value') : '1';
- }
- }
- else if ($nodeName == 'input' && $element->getAttribute('type') == 'file')
- {
- $filename = array_key_exists($elementName, $arguments) ? $arguments[$elementName] : sfToolkit::getArrayValueForPath($arguments, $elementName, '');
- if (is_readable($filename))
- {
- $fileError = UPLOAD_ERR_OK;
- $fileSize = filesize($filename);
- }
- else
- {
- $fileError = UPLOAD_ERR_NO_FILE;
- $fileSize = 0;
- }
- unset($arguments[$elementName]);
- $this->parseArgumentAsArray($elementName, array('name' => basename($filename), 'type' => '', 'tmp_name' => $filename, 'error' => $fileError, 'size' => $fileSize), $this->files);
- }
- else if ('input' == $nodeName && !in_array($element->getAttribute('type'), array('submit', 'button', 'image')))
- {
- $value = $element->getAttribute('value');
- }
- else if ($nodeName == 'textarea')
- {
- $value = '';
- foreach ($element->childNodes as $el)
- {
- $value .= $this->getResponseDom()->saveXML($el);
- }
- }
- else if ($nodeName == 'select')
- {
- if ($multiple = $element->hasAttribute('multiple'))
- {
- $elementName = str_replace('[]', '', $elementName);
- $value = array();
- }
- else
- {
- $value = null;
- }
- $found = false;
- foreach ($xpath->query('descendant::option', $element) as $option)
- {
- if ($option->getAttribute('selected'))
- {
- $found = true;
- if ($multiple)
- {
- $value[] = $option->getAttribute('value');
- }
- else
- {
- $value = $option->getAttribute('value');
- }
- }
- }
-
- $option = $xpath->query('descendant::option', $element)->item(0);
- if (!$found && !$multiple && $option instanceof DOMElement)
- {
- $value = $option->getAttribute('value');
- }
- }
- if (null !== $value)
- {
- $this->parseArgumentAsArray($elementName, $value, $defaults);
- }
- }
-
- $arguments = sfToolkit::arrayDeepMerge($defaults, $arguments);
- if (in_array($method, array('post', 'put', 'delete')))
- {
- return array($url, $method, $arguments);
- }
- else
- {
- $queryString = http_build_query($arguments, null, '&');
- $sep = false === strpos($url, '?') ? '?' : '&';
- return array($url.($queryString ? $sep.$queryString : ''), 'get', array());
- }
- }
-
- protected function parseArgumentAsArray($name, $value, &$vars)
- {
- if (false !== $pos = strpos($name, '['))
- {
- $var = &$vars;
- $tmps = array_filter(preg_split('/(\[ | \[\] | \])/x', $name), create_function('$s', 'return $s !== "";'));
- foreach ($tmps as $tmp)
- {
- $var = &$var[$tmp];
- }
- if ($var)
- {
- if (!is_array($var))
- {
- $var = array($var);
- }
- $var[] = $value;
- }
- else
- {
- $var = $value;
- }
- }
- else
- {
- $vars[$name] = $value;
- }
- }
-
- public function restart()
- {
- $this->newSession();
- $this->cookieJar = array();
- $this->stack = array();
- $this->fields = array();
- $this->vars = array();
- $this->dom = null;
- $this->stackPosition = -1;
- return $this;
- }
-
- public function shutdown()
- {
- $this->checkCurrentExceptionIsEmpty();
- }
-
- public function fixUri($uri)
- {
-
- if (0 === strpos($uri, 'http'))
- {
-
- if (0 === strpos($uri, 'https'))
- {
- $this->defaultServerArray['HTTPS'] = 'on';
- }
- else
- {
- unset($this->defaultServerArray['HTTPS']);
- }
- $uri = preg_replace('#^https?\://[^/]+/#', '/', $uri);
- }
- $uri = str_replace('/index.php', '', $uri);
-
- if ($uri && '#' == $uri[0])
- {
- $uri = $this->stack[$this->stackPosition]['uri'].$uri;
- }
- return $uri;
- }
-
- protected function newSession()
- {
- $this->defaultServerArray['session_id'] = $_SERVER['session_id'] = md5(uniqid(rand(), true));
- }
- }
Configuration
- debug
- xdebug
- logging
- cache
- compression
- tokenizer
- eaccelerator
- apc
- xcache
Request 
options:
path_info_key: PATH_INFO
path_info_array: SERVER
default_format: null
logging: '1'
relative_url_root: null
formats: { txt: text/plain, js: [application/javascript, application/x-javascript, text/javascript], css: text/css, json: [application/json, application/x-json], xml: [text/xml, application/xml, application/x-xml], rdf: application/rdf+xml, atom: application/atom+xml }
no_script_name: false
parameterHolder:
action: index
class: sfBrowserBase
method: ''
module: sfCodeView
attributeHolder:
sf_route: 'sfRoute Object()'
Response 
status:
code: 200
text: OK
options:
http_protocol: HTTP/1.1
logging: '1'
charset: utf-8
send_http_headers: false
content_type: 'text/html; charset=utf-8'
cookies: { }
httpHeaders:
Content-Type: 'text/html; charset=utf-8'
javascripts:
'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js': { }
/sfCodeViewPlugin/js/sfCodeViewPlugin.js: { }
stylesheets:
main.css: { }
/sfCodeViewPlugin/css/sfCodeViewPlugin.css: { }
metas: { }
httpMetas:
Content-Type: 'text/html; charset=utf-8'
User 
options:
auto_shutdown: false
culture: null
default_culture: en
use_flash: true
logging: '1'
timeout: 1800
attributeHolder:
symfony/user/sfUser/attributes: { history: [sfBrowserBase, sfBrowser, sfBasicSecurityUser, sfBasicSecurityFilter, sfBaseTask, sfAutoloadConfigHandler, sfAutoloadAgain, sfAutoload, sfApplicationConfiguration, sfAppRoutesTask] }
culture: en
Settings 
app_sfCodeViewPlugin_javascripts:
- /sfCodeViewPlugin/js/sfCodeViewPlugin.js
app_sfCodeViewPlugin_stylesheets:
- /sfCodeViewPlugin/css/sfCodeViewPlugin.css
mod_sfcodeview_enabled: true
mod_sfcodeview_view_class: sfPHP
sf_admin_module_web_dir: /sfDoctrinePlugin
sf_admin_web_dir: /sf/sf_admin
sf_app: frontend
sf_app_base_cache_dir: /www/redotheoffice/codeview/cache/frontend
sf_app_cache_dir: /www/redotheoffice/codeview/cache/frontend/dev
sf_app_config_dir: /www/redotheoffice/codeview/apps/frontend/config
sf_app_dir: /www/redotheoffice/codeview/apps/frontend
sf_app_i18n_dir: /www/redotheoffice/codeview/apps/frontend/i18n
sf_app_lib_dir: /www/redotheoffice/codeview/apps/frontend/lib
sf_app_module_dir: /www/redotheoffice/codeview/apps/frontend/modules
sf_app_template_dir: /www/redotheoffice/codeview/apps/frontend/templates
sf_apps_dir: /www/redotheoffice/codeview/apps
sf_cache: false
sf_cache_dir: /www/redotheoffice/codeview/cache
sf_charset: utf-8
sf_check_lock: false
sf_compressed: false
sf_config_cache_dir: /www/redotheoffice/codeview/cache/frontend/dev/config
sf_config_dir: /www/redotheoffice/codeview/config
sf_csrf_secret: 220ab365e581d678efc07c41371dbc49a1fdcec3
sf_data_dir: /www/redotheoffice/codeview/data
sf_debug: true
sf_default_culture: en
sf_enabled_modules:
- default
- sfCodeView
sf_environment: dev
sf_error_404_action: error404
sf_error_404_module: default
sf_error_reporting: 8191
sf_escaping_method: ESC_SPECIALCHARS
sf_escaping_strategy: true
sf_etag: false
sf_file_link_format: null
sf_i18n: false
sf_i18n_cache_dir: /www/redotheoffice/codeview/cache/frontend/dev/i18n
sf_lib_dir: /www/redotheoffice/codeview/lib
sf_log_dir: /www/redotheoffice/codeview/log
sf_logging_enabled: true
sf_login_action: login
sf_login_module: default
sf_module_cache_dir: /www/redotheoffice/codeview/cache/frontend/dev/modules
sf_module_disabled_action: disabled
sf_module_disabled_module: default
sf_no_script_name: false
sf_orm: doctrine
sf_plugins_dir: /www/redotheoffice/codeview/plugins
sf_root_dir: /www/redotheoffice/codeview
sf_secure_action: secure
sf_secure_module: default
sf_standard_helpers:
- Partial
- Cache
sf_symfony_lib_dir: /www/redotheoffice/lib/symfony/1.4/lib
sf_template_cache_dir: /www/redotheoffice/codeview/cache/frontend/dev/template
sf_test_cache_dir: /www/redotheoffice/codeview/cache/frontend/dev/test
sf_test_dir: /www/redotheoffice/codeview/test
sf_upload_dir: /www/redotheoffice/codeview/web/uploads
sf_use_database: true
sf_web_debug: true
sf_web_debug_web_dir: /sf/sf_web_debug
sf_web_dir: /www/redotheoffice/codeview/web
symfony.asset.javascripts_included: true
symfony.asset.stylesheets_included: true
Globals 
cookie:
symfony: igbg1vov0kr106fi7q336aqd75
env: { }
files: { }
get: { }
post: { }
server:
DOCUMENT_ROOT: /Library/WebServer/Documents
GATEWAY_INTERFACE: CGI/1.1
HTTP_ACCEPT: 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING: gzip
HTTP_ACCEPT_LANGUAGE: 'en-us,en;q=0.5'
HTTP_CACHE_CONTROL: no-cache
HTTP_CONNECTION: close
HTTP_COOKIE: symfony=igbg1vov0kr106fi7q336aqd75
HTTP_HOST: codeview.redotheoffice.com
HTTP_PRAGMA: no-cache
HTTP_USER_AGENT: 'CCBot/1.0 (+http://www.commoncrawl.org/bot.html)'
HTTP_X_CC_ID: ccc04-02
PATH: '/usr/bin:/bin:/usr/sbin:/sbin'
PATH_INFO: /sfCodeView/sfBrowserBase
PATH_TRANSLATED: 'redirect:/www/redotheoffice/codeview/web/index.php/sfBrowserBase'
PHP_SELF: /index.php/sfCodeView/sfBrowserBase
QUERY_STRING: ''
REMOTE_ADDR: 38.107.179.240
REMOTE_PORT: '41454'
REQUEST_METHOD: GET
REQUEST_TIME: 1337452856
REQUEST_URI: /index.php/sfCodeView/sfBrowserBase
SCRIPT_FILENAME: /www/redotheoffice/codeview/web/index.php
SCRIPT_NAME: /index.php
SERVER_ADDR: 192.168.0.108
SERVER_ADMIN: webmaster@weett.nl
SERVER_NAME: codeview.redotheoffice.com
SERVER_PORT: '80'
SERVER_PROTOCOL: HTTP/1.1
SERVER_SIGNATURE: ''
SERVER_SOFTWARE: 'Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6'
session:
symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes: { history: [sfBrowser, sfBasicSecurityUser, sfBasicSecurityFilter, sfBaseTask, sfAutoloadConfigHandler, sfAutoloadAgain, sfAutoload, sfApplicationConfiguration, sfAppRoutesTask, sfAnsiColorFormatter] } }
symfony/user/sfUser/authenticated: false
symfony/user/sfUser/credentials: { }
symfony/user/sfUser/culture: en
symfony/user/sfUser/lastRequest: 1337452819
Php 
php: 5.3.6
os: 'Darwin Mac-mini-van-Sjoerd-de-Jong.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386'
extensions:
54: apache2handler
33: 'apc (3.1.7)'
8: bcmath
9: bz2
10: calendar
0: 'Core (5.3.6)'
11: ctype
56: curl
1: 'date (5.3.6)'
12: 'dom (20031129)'
2: ereg
42: 'exif (1.4 $Id: exif.c 308362 2011-02-15 14:02:26Z pajoye $)'
14: 'fileinfo (1.0.5-dev)'
15: 'filter (0.11.0)'
16: ftp
17: gd
18: gettext
13: 'hash (1.0)'
20: iconv
36: imap
57: 'intl (1.1.0)'
22: 'json (1.2.1)'
23: ldap
3: libxml
24: mbstring
58: mcrypt
59: 'memcache (3.0.4)'
60: 'memcached (1.0.1)'
71: mhash
61: 'mongo (1.1.4)'
62: mssql
29: 'mysql (1.0)'
27: 'mysqli (0.1)'
26: 'mysqlnd (mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $)'
63: 'OAuth (1.0-dev)'
28: 'odbc (1.0)'
4: openssl
5: pcre
30: 'PDO (1.0.4dev)'
64: 'pdo_dblib (1.0.1)'
31: 'pdo_mysql (1.0.2)'
65: 'pdo_pgsql (1.0.2)'
32: 'pdo_sqlite (1.0.1)'
66: pgsql
55: 'Phar (2.0.1)'
34: posix
35: 'Reflection ($Revision: 307971 $)'
21: session
37: shmop
38: 'SimpleXML (0.1)'
39: soap
40: sockets
67: 'solr (0.9.11)'
19: 'SPL (0.2)'
41: 'SQLite (2.0-dev)'
6: 'sqlite3 (0.7-dev)'
25: 'standard (5.3.6)'
43: sysvmsg
44: sysvsem
45: sysvshm
46: 'tidy (2.0)'
47: 'tokenizer (0.1)'
68: 'uploadprogress (1.0.1)'
48: wddx
72: 'xdebug (2.2.0-dev)'
69: 'xhprof (0.9.2)'
49: xml
50: 'xmlreader (0.1)'
51: 'xmlrpc (0.51)'
52: 'xmlwriter (0.1)'
70: 'xsl (0.1)'
53: 'zip (1.9.1)'
7: 'zlib (1.1)'
Symfony 
version: 1.4.2-DEV
path: /www/redotheoffice/lib/symfony/1.4/lib
View Layer
Template: sfCodeView … indexSuccess.php 
Parameters:
$class (string)
$method (NULL)
$viewer (sfCodeViewer)
$history (array)
Logs
| # |
type |
message |
| 1 | sfPatternRouting | Match route "sfCodeView" (/sfCodeView/:class/:method) for /sfCodeView/sfBrowserBase with parameters array ( 'module' => 'sfCodeView', 'action' => 'index', 'class' => 'sfBrowserBase', 'method' => '',) |
| 2 | sfFilterChain | Executing filter "sfRenderingFilter" |
| 3 | sfFilterChain | Executing filter "sfExecutionFilter" |
| 4 | sfCodeViewActions | Call "sfCodeViewActions->executeIndex()" |
| 5 | sfPHPView | Render "sf_root_dir/plugins/sfCodeViewPlugin/modules/sfCodeView/templates/indexSuccess.php" |
| 6 | sfPHPView | Decorate content with "sf_app_dir/templates/layout.php" |
| 7 | sfPHPView | Render "sf_app_dir/templates/layout.php" |
| 8 | sfWebResponse | Send status "HTTP/1.1 200 OK" |
| 9 | sfWebResponse | Send header "Content-Type: text/html; charset=utf-8" |
Timers
| type | calls | time (ms) | time (%) |
|---|
| Configuration | 11 | 32.27 | 9 |
| Factories | 1 | 6.50 | 2 |
| Action "sfCodeView/index" | 1 | 0.71 | 0 |
| View "Success" for "sfCodeView/index" | 1 | 283.44 | 87 |
View php class code
Enter the name of a class you want to view in the toolbar and hit 'enter' to view its code, or click one of the available classes below.
User classes
- apps/frontend/config
- apps/frontend/lib
- config
- lib/form
- plugins/sfCodeViewPlugin/config
- plugins/sfCodeViewPlugin/lib
- plugins/sfCodeViewPlugin/modules/sfCodeView/actions
- plugins/sfCodeViewPlugin/modules/sfCodeView/lib
Symfony classes
- action
- addon
- autoload
- cache
- command
- config
- controller
- database
- debug
- escaper
- exception
- filter
- form/addon
- form
- generator
- i18n/Gettext
- i18n/extract
- i18n
- log
- mailer
- plugin
- request
- response
- routing
- storage
- task/app
- task/cache
- task/configure
- task/generator
- task/help
- task/i18n
- task/log
- task/plugin
- task/project
- task/project/validation
- task
- task/symfony
- task/test
- test
- user
- util
- validator/i18n
- validator
- view
- widget/i18n
- widget