- sfForm.class.php
- class sfForm implements ArrayAccess, Iterator, Countable
- {
- protected static
- $CSRFSecret = false,
- $CSRFFieldName = '_csrf_token',
- $toStringException = null;
- protected
- $widgetSchema = null,
- $validatorSchema = null,
- $errorSchema = null,
- $formFieldSchema = null,
- $formFields = array(),
- $isBound = false,
- $taintedValues = array(),
- $taintedFiles = array(),
- $values = null,
- $defaults = array(),
- $fieldNames = array(),
- $options = array(),
- $count = 0,
- $localCSRFSecret = null,
- $embeddedForms = array();
-
- public function __construct($defaults = array(), $options = array(), $CSRFSecret = null)
- {
- $this->setDefaults($defaults);
- $this->options = $options;
- $this->localCSRFSecret = $CSRFSecret;
- $this->validatorSchema = new sfValidatorSchema();
- $this->widgetSchema = new sfWidgetFormSchema();
- $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
- $this->setup();
- $this->configure();
- $this->addCSRFProtection($this->localCSRFSecret);
- $this->resetFormFields();
- }
-
- public function __toString()
- {
- try
- {
- return $this->render();
- }
- catch (Exception $e)
- {
- self::setToStringException($e);
-
- return 'Exception: '.$e->getMessage();
- }
- }
-
- public function configure()
- {
- }
-
- public function setup()
- {
- }
-
- public function render($attributes = array())
- {
- return $this->getFormFieldSchema()->render($attributes);
- }
-
- public function renderUsing($formatterName, $attributes = array())
- {
- $currentFormatterName = $this->widgetSchema->getFormFormatterName();
- $this->widgetSchema->setFormFormatterName($formatterName);
- $output = $this->render($attributes);
- $this->widgetSchema->setFormFormatterName($currentFormatterName);
- return $output;
- }
-
- public function renderHiddenFields($recursive = true)
- {
- return $this->getFormFieldSchema()->renderHiddenFields($recursive);
- }
-
- public function renderGlobalErrors()
- {
- return $this->widgetSchema->getFormFormatter()->formatErrorsForRow($this->getGlobalErrors());
- }
-
- public function hasGlobalErrors()
- {
- return (Boolean) count($this->getGlobalErrors());
- }
-
- public function getGlobalErrors()
- {
- return $this->widgetSchema->getGlobalErrors($this->getErrorSchema());
- }
-
- public function bind(array $taintedValues = null, array $taintedFiles = null)
- {
- $this->taintedValues = $taintedValues;
- $this->taintedFiles = $taintedFiles;
- $this->isBound = true;
- $this->resetFormFields();
- if (null === $this->taintedValues)
- {
- $this->taintedValues = array();
- }
- if (null === $this->taintedFiles)
- {
- if ($this->isMultipart())
- {
- throw new InvalidArgumentException('This form is multipart, which means you need to supply a files array as the bind() method second argument.');
- }
- $this->taintedFiles = array();
- }
- try
- {
- $this->doBind(self::deepArrayUnion($this->taintedValues, self::convertFileInformation($this->taintedFiles)));
- $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
-
- unset($this->values[self::$CSRFFieldName]);
- }
- catch (sfValidatorErrorSchema $e)
- {
- $this->values = array();
- $this->errorSchema = $e;
- }
- }
-
- protected function doBind(array $values)
- {
- $this->values = $this->validatorSchema->clean($values);
- }
-
- public function isBound()
- {
- return $this->isBound;
- }
-
- public function getTaintedValues()
- {
- if (!$this->isBound)
- {
- return array();
- }
- return $this->taintedValues;
- }
-
- public function isValid()
- {
- if (!$this->isBound)
- {
- return false;
- }
- return 0 == count($this->errorSchema);
- }
-
- public function hasErrors()
- {
- if (!$this->isBound)
- {
- return false;
- }
- return count($this->errorSchema) > 0;
- }
-
- public function getValues()
- {
- return $this->isBound ? $this->values : array();
- }
-
- public function getValue($field)
- {
- return ($this->isBound && isset($this->values[$field])) ? $this->values[$field] : null;
- }
-
- public function getName()
- {
- if ('%s' == $nameFormat = $this->widgetSchema->getNameFormat())
- {
- return false;
- }
- return str_replace('[%s]', '', $nameFormat);
- }
-
- public function getErrorSchema()
- {
- return $this->errorSchema;
- }
-
- public function embedForm($name, sfForm $form, $decorator = null)
- {
- $name = (string) $name;
- if (true === $this->isBound() || true === $form->isBound())
- {
- throw new LogicException('A bound form cannot be embedded');
- }
- $this->embeddedForms[$name] = $form;
- $form = clone $form;
- unset($form[self::$CSRFFieldName]);
- $widgetSchema = $form->getWidgetSchema();
- $this->setDefault($name, $form->getDefaults());
- $decorator = null === $decorator ? $widgetSchema->getFormFormatter()->getDecoratorFormat() : $decorator;
- $this->widgetSchema[$name] = new sfWidgetFormSchemaDecorator($widgetSchema, $decorator);
- $this->validatorSchema[$name] = $form->getValidatorSchema();
- $this->resetFormFields();
- }
-
- public function embedFormForEach($name, sfForm $form, $n, $decorator = null, $innerDecorator = null, $options = array(), $attributes = array(), $labels = array())
- {
- if (true === $this->isBound() || true === $form->isBound())
- {
- throw new LogicException('A bound form cannot be embedded');
- }
- $this->embeddedForms[$name] = new sfForm();
- $form = clone $form;
- unset($form[self::$CSRFFieldName]);
- $widgetSchema = $form->getWidgetSchema();
-
- $defaults = array();
- for ($i = 0; $i < $n; $i++)
- {
- $defaults[$i] = $form->getDefaults();
- $this->embeddedForms[$name]->embedForm($i, $form);
- }
- $this->setDefault($name, $defaults);
- $decorator = null === $decorator ? $widgetSchema->getFormFormatter()->getDecoratorFormat() : $decorator;
- $innerDecorator = null === $innerDecorator ? $widgetSchema->getFormFormatter()->getDecoratorFormat() : $innerDecorator;
- $this->widgetSchema[$name] = new sfWidgetFormSchemaDecorator(new sfWidgetFormSchemaForEach(new sfWidgetFormSchemaDecorator($widgetSchema, $innerDecorator), $n, $options, $attributes), $decorator);
- $this->validatorSchema[$name] = new sfValidatorSchemaForEach($form->getValidatorSchema(), $n);
-
- for ($i = 0; $i < $n; $i++)
- {
- if (!isset($labels[$i]))
- {
- $labels[$i] = sprintf('%s (%s)', $this->widgetSchema->getFormFormatter()->generateLabelName($name), $i);
- }
- }
- $this->widgetSchema[$name]->setLabels($labels);
- $this->resetFormFields();
- }
-
- public function getEmbeddedForms()
- {
- return $this->embeddedForms;
- }
-
- public function getEmbeddedForm($name)
- {
- if (!isset($this->embeddedForms[$name]))
- {
- throw new InvalidArgumentException(sprintf('There is no embedded "%s" form.', $name));
- }
- return $this->embeddedForms[$name];
- }
-
- public function mergeForm(sfForm $form)
- {
- if (true === $this->isBound() || true === $form->isBound())
- {
- throw new LogicException('A bound form cannot be merged');
- }
- $form = clone $form;
- unset($form[self::$CSRFFieldName]);
- $this->defaults = array_merge($this->defaults, $form->getDefaults());
- foreach ($form->getWidgetSchema()->getPositions() as $field)
- {
- $this->widgetSchema[$field] = $form->getWidget($field);
- }
- foreach ($form->getValidatorSchema()->getFields() as $field => $validator)
- {
- $this->validatorSchema[$field] = $validator;
- }
- $this->getWidgetSchema()->setLabels(array_merge($this->getWidgetSchema()->getLabels(), $form->getWidgetSchema()->getLabels()));
- $this->getWidgetSchema()->setHelps(array_merge($this->getWidgetSchema()->getHelps(), $form->getWidgetSchema()->getHelps()));
- $this->mergePreValidator($form->getValidatorSchema()->getPreValidator());
- $this->mergePostValidator($form->getValidatorSchema()->getPostValidator());
- $this->resetFormFields();
- }
-
- public function mergePreValidator(sfValidatorBase $validator = null)
- {
- if (null === $validator)
- {
- return;
- }
- if (null === $this->validatorSchema->getPreValidator())
- {
- $this->validatorSchema->setPreValidator($validator);
- }
- else
- {
- $this->validatorSchema->setPreValidator(new sfValidatorAnd(array(
- $this->validatorSchema->getPreValidator(),
- $validator,
- )));
- }
- }
-
- public function mergePostValidator(sfValidatorBase $validator = null)
- {
- if (null === $validator)
- {
- return;
- }
- if (null === $this->validatorSchema->getPostValidator())
- {
- $this->validatorSchema->setPostValidator($validator);
- }
- else
- {
- $this->validatorSchema->setPostValidator(new sfValidatorAnd(array(
- $this->validatorSchema->getPostValidator(),
- $validator,
- )));
- }
- }
-
- public function setValidators(array $validators)
- {
- $this->setValidatorSchema(new sfValidatorSchema($validators));
- return $this;
- }
-
- public function setValidator($name, sfValidatorBase $validator)
- {
- $this->validatorSchema[$name] = $validator;
- $this->resetFormFields();
- return $this;
- }
-
- public function getValidator($name)
- {
- if (!isset($this->validatorSchema[$name]))
- {
- throw new InvalidArgumentException(sprintf('The validator "%s" does not exist.', $name));
- }
- return $this->validatorSchema[$name];
- }
-
- public function setValidatorSchema(sfValidatorSchema $validatorSchema)
- {
- $this->validatorSchema = $validatorSchema;
- $this->resetFormFields();
- return $this;
- }
-
- public function getValidatorSchema()
- {
- return $this->validatorSchema;
- }
-
- public function setWidgets(array $widgets)
- {
- $this->setWidgetSchema(new sfWidgetFormSchema($widgets));
- return $this;
- }
-
- public function setWidget($name, sfWidgetForm $widget)
- {
- $this->widgetSchema[$name] = $widget;
- $this->resetFormFields();
- return $this;
- }
-
- public function getWidget($name)
- {
- if (!isset($this->widgetSchema[$name]))
- {
- throw new InvalidArgumentException(sprintf('The widget "%s" does not exist.', $name));
- }
- return $this->widgetSchema[$name];
- }
-
- public function setWidgetSchema(sfWidgetFormSchema $widgetSchema)
- {
- $this->widgetSchema = $widgetSchema;
- $this->resetFormFields();
- return $this;
- }
-
- public function getWidgetSchema()
- {
- return $this->widgetSchema;
- }
-
- public function getStylesheets()
- {
- return $this->widgetSchema->getStylesheets();
- }
-
- public function getJavaScripts()
- {
- return $this->widgetSchema->getJavaScripts();
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function setOption($name, $value)
- {
- $this->options[$name] = $value;
- return $this;
- }
-
- public function getOption($name, $default = null)
- {
- return isset($this->options[$name]) ? $this->options[$name] : $default;
- }
-
- public function setDefault($name, $default)
- {
- $this->defaults[$name] = $default;
- $this->resetFormFields();
- return $this;
- }
-
- public function getDefault($name)
- {
- return isset($this->defaults[$name]) ? $this->defaults[$name] : null;
- }
-
- public function hasDefault($name)
- {
- return array_key_exists($name, $this->defaults);
- }
-
- public function setDefaults($defaults)
- {
- $this->defaults = null === $defaults ? array() : $defaults;
- if ($this->isCSRFProtected())
- {
- $this->setDefault(self::$CSRFFieldName, $this->getCSRFToken(self::$CSRFSecret));
- }
- $this->resetFormFields();
- return $this;
- }
-
- public function getDefaults()
- {
- return $this->defaults;
- }
-
- public function addCSRFProtection($secret = null)
- {
- if (null === $secret)
- {
- $secret = $this->localCSRFSecret;
- }
- if (false === $secret || (null === $secret && false === self::$CSRFSecret))
- {
- return $this;
- }
- if (null === $secret)
- {
- if (null === self::$CSRFSecret)
- {
- self::$CSRFSecret = md5(__FILE__.php_uname());
- }
- $secret = self::$CSRFSecret;
- }
- $token = $this->getCSRFToken($secret);
- $this->validatorSchema[self::$CSRFFieldName] = new sfValidatorCSRFToken(array('token' => $token));
- $this->widgetSchema[self::$CSRFFieldName] = new sfWidgetFormInputHidden();
- $this->setDefault(self::$CSRFFieldName, $token);
- return $this;
- }
-
- public function getCSRFToken($secret = null)
- {
- if (null === $secret)
- {
- $secret = self::$CSRFSecret;
- }
- return md5($secret.session_id().get_class($this));
- }
-
- public function isCSRFProtected()
- {
- return null !== $this->validatorSchema[self::$CSRFFieldName];
- }
-
- static public function setCSRFFieldName($name)
- {
- self::$CSRFFieldName = $name;
- }
-
- static public function getCSRFFieldName()
- {
- return self::$CSRFFieldName;
- }
-
- public function enableLocalCSRFProtection($secret = null)
- {
- $this->localCSRFSecret = $secret;
- }
-
- public function disableLocalCSRFProtection()
- {
- $this->localCSRFSecret = false;
- }
-
- static public function enableCSRFProtection($secret = null)
- {
- self::$CSRFSecret = $secret;
- }
-
- static public function disableCSRFProtection()
- {
- self::$CSRFSecret = false;
- }
-
- public function isMultipart()
- {
- return $this->widgetSchema->needsMultipartForm();
- }
-
- public function renderFormTag($url, array $attributes = array())
- {
- $attributes['action'] = $url;
- $attributes['method'] = isset($attributes['method']) ? strtolower($attributes['method']) : 'post';
- if ($this->isMultipart())
- {
- $attributes['enctype'] = 'multipart/form-data';
- }
- $html = '';
- if (!in_array($attributes['method'], array('get', 'post')))
- {
- $html = $this->getWidgetSchema()->renderTag('input', array('type' => 'hidden', 'name' => 'sf_method', 'value' => $attributes['method'], 'id' => false));
- $attributes['method'] = 'post';
- }
- return sprintf('<form%s>', $this->getWidgetSchema()->attributesToHtml($attributes)).$html;
- }
- public function resetFormFields()
- {
- $this->formFields = array();
- $this->formFieldSchema = null;
- }
-
- public function offsetExists($name)
- {
- return isset($this->widgetSchema[$name]);
- }
-
- public function offsetGet($name)
- {
- if (!isset($this->formFields[$name]))
- {
- if (!$widget = $this->widgetSchema[$name])
- {
- throw new InvalidArgumentException(sprintf('Widget "%s" does not exist.', $name));
- }
- if ($this->isBound)
- {
- $value = isset($this->taintedValues[$name]) ? $this->taintedValues[$name] : null;
- }
- else if (isset($this->defaults[$name]))
- {
- $value = $this->defaults[$name];
- }
- else
- {
- $value = $widget instanceof sfWidgetFormSchema ? $widget->getDefaults() : $widget->getDefault();
- }
- $class = $widget instanceof sfWidgetFormSchema ? 'sfFormFieldSchema' : 'sfFormField';
- $this->formFields[$name] = new $class($widget, $this->getFormFieldSchema(), $name, $value, $this->errorSchema[$name]);
- }
- return $this->formFields[$name];
- }
-
- public function offsetSet($offset, $value)
- {
- throw new LogicException('Cannot update form fields.');
- }
-
- public function offsetUnset($offset)
- {
- unset(
- $this->widgetSchema[$offset],
- $this->validatorSchema[$offset],
- $this->defaults[$offset],
- $this->taintedValues[$offset],
- $this->values[$offset],
- $this->embeddedForms[$offset]
- );
- $this->resetFormFields();
- }
-
- public function useFields(array $fields = array(), $ordered = true)
- {
- $hidden = array();
- foreach ($this as $name => $field)
- {
- if ($field->isHidden())
- {
- $hidden[] = $name;
- }
- else if (!in_array($name, $fields))
- {
- unset($this[$name]);
- }
- }
- if ($ordered)
- {
- $this->widgetSchema->setPositions(array_merge($fields, $hidden));
- }
- }
-
- public function getFormFieldSchema()
- {
- if (null === $this->formFieldSchema)
- {
- $values = $this->isBound ? $this->taintedValues : array_merge($this->widgetSchema->getDefaults(), $this->defaults);
- $this->formFieldSchema = new sfFormFieldSchema($this->widgetSchema, null, null, $values, $this->errorSchema);
- }
- return $this->formFieldSchema;
- }
-
- public function rewind()
- {
- $this->fieldNames = $this->widgetSchema->getPositions();
- reset($this->fieldNames);
- $this->count = count($this->fieldNames);
- }
-
- public function key()
- {
- return current($this->fieldNames);
- }
-
- public function current()
- {
- return $this[current($this->fieldNames)];
- }
-
- public function next()
- {
- next($this->fieldNames);
- --$this->count;
- }
-
- public function valid()
- {
- return $this->count > 0;
- }
-
- public function count()
- {
- return count($this->getFormFieldSchema());
- }
-
- static public function convertFileInformation(array $taintedFiles)
- {
- $files = array();
- foreach ($taintedFiles as $key => $data)
- {
- $files[$key] = self::fixPhpFilesArray($data);
- }
- return $files;
- }
- static protected function fixPhpFilesArray($data)
- {
- $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
- $keys = array_keys($data);
- sort($keys);
- if ($fileKeys != $keys || !isset($data['name']) || !is_array($data['name']))
- {
- return $data;
- }
- $files = $data;
- foreach ($fileKeys as $k)
- {
- unset($files[$k]);
- }
- foreach (array_keys($data['name']) as $key)
- {
- $files[$key] = self::fixPhpFilesArray(array(
- 'error' => $data['error'][$key],
- 'name' => $data['name'][$key],
- 'type' => $data['type'][$key],
- 'tmp_name' => $data['tmp_name'][$key],
- 'size' => $data['size'][$key],
- ));
- }
- return $files;
- }
-
- static public function hasToStringException()
- {
- return null !== self::$toStringException;
- }
-
- static public function getToStringException()
- {
- return self::$toStringException;
- }
-
- static public function setToStringException(Exception $e)
- {
- if (null === self::$toStringException)
- {
- self::$toStringException = $e;
- }
- }
- public function __clone()
- {
- $this->widgetSchema = clone $this->widgetSchema;
- $this->validatorSchema = clone $this->validatorSchema;
-
- if ($this->isBound())
- {
- $this->bind($this->taintedValues, $this->taintedFiles);
- }
- }
-
- static protected function deepArrayUnion($array1, $array2)
- {
- foreach ($array2 as $key => $value)
- {
- if (is_array($value) && isset($array1[$key]) && is_array($array1[$key]))
- {
- $array1[$key] = self::deepArrayUnion($array1[$key], $value);
- }
- else
- {
- $array1[$key] = $value;
- }
- }
- return $array1;
- }
- }
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: sfForm
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: [sfForm, sfFinder, sfFilterException, sfFilterConfigHandler, sfFilterChain, sfFilter, sfFilesystem, sfFileException, sfFileCache, sfFactoryException] }
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/sfForm
PATH_TRANSLATED: 'redirect:/www/redotheoffice/codeview/web/index.php/sfForm'
PHP_SELF: /index.php/sfCodeView/sfForm
QUERY_STRING: ''
REMOTE_ADDR: 38.107.179.241
REMOTE_PORT: '56591'
REQUEST_METHOD: GET
REQUEST_TIME: 1337455802
REQUEST_URI: /index.php/sfCodeView/sfForm
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: [sfFinder, sfFilterException, sfFilterConfigHandler, sfFilterChain, sfFilter, sfFilesystem, sfFileException, sfFileCache, sfFactoryException, sfFactoryConfigHandler] } }
symfony/user/sfUser/authenticated: false
symfony/user/sfUser/credentials: { }
symfony/user/sfUser/culture: en
symfony/user/sfUser/lastRequest: 1337455774
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/sfForm with parameters array ( 'module' => 'sfCodeView', 'action' => 'index', 'class' => 'sfForm', '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.80 | 8 |
| Factories | 1 | 6.37 | 1 |
| Action "sfCodeView/index" | 1 | 0.52 | 0 |
| View "Success" for "sfCodeView/index" | 1 | 365.33 | 89 |
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