Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

Class ResponseBehavior

Behavior class providing utilities for responding in a uniform yet also context-sensitive manner. Utilizes the standalone class ResponseUtil.

CComponent
Extended by CBehavior implements IBehavior
Extended by ResponseBehavior

Direct known subclasses

UpdaterBehavior
Package: application\components
Located at x2engine/protected/components/ResponseBehavior.php
Methods summary
public
# __construct( )
public
# attach( type $owner )

Parameters

$owner
type
$owner

Overrides

CBehavior::attach()
public boolean
# getIsConsole( )

isConsole

isConsole

Returns

boolean
public type
# getLogCategory( )

logCategory

logCategory

Returns

type
public
# getResponse( )

Returns the response utility object in use.

Returns the response utility object in use.

public
# mergeResponse( array $properties )

Incorporate more properties into the response.

Incorporate more properties into the response.

Parameters

$properties
array
$properties
public
# output( string $msg, boolean $error = false )

A web-safe wrapper for ResponseBehavior::respond()

A web-safe wrapper for ResponseBehavior::respond()

For use when logging (and in console commands, output) are needed, but halting is not.

Parameters

$msg
string
$msg Message to log/respond with
$error
boolean
$error Whether an error has occurred
public
# respond( type $msg, type $error = false )

Wrapper method for

Wrapper method for

Parameters

$msg
type
$msg
$error
type
$error
public
# ruProperty( type $name, type $value )

Sets a named static property of ResponseUtil, if it exists.

Sets a named static property of ResponseUtil, if it exists.

This is a means of hedging the behavior against backwards compatibility glitches of versions 3.5 - 3.7.5 wherein ResponseUtil was not declared as a dependency (despite how it was later) and thus not updated during self-refreshes.

Parameters

$name
type
$name
$value
type
$value
public
# setErrorCode( integer $value )

Set the default error code in ResponseUtil

Set the default error code in ResponseUtil

Parameters

$value
integer
$value
public boolean
# setExitNonFatal( mixed $value )

Sets ResponseUtil::$exitNonFatal

Sets ResponseUtil::$exitNonFatal

Returns

boolean
public
# setIsConsole( mixed $value )

isConsole

isConsole

public
# setLogCategory( mixed $value )

logCategory

logCategory

public
# setLongErrorTrace( mixed $value )

longErrorTrace

longErrorTrace

public
# setShutdown( mixed $value )
Methods inherited from CBehavior
detach(), events(), getEnabled(), getOwner(), setEnabled()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public boolean $handleErrors false
#

If true: the error handling methods of ResponseUtil should be used.

If true: the error handling methods of ResponseUtil should be used.

public type $handleExceptions false
#

If true: the exception handling method ResponseUtil::respondWithException() should be used

If true: the exception handling method ResponseUtil::respondWithException() should be used

Magic properties summary
public boolean $exitNonFatal
#

(write-only) Sets the value of ResponseUtil::$exitNonFatal.

(write-only) Sets the value of ResponseUtil::$exitNonFatal.

public boolean $isConsole
#

If true, run methods as though there's no HTTP request happening.

If true, run methods as though there's no HTTP request happening.

public string $logCategory
#

The log category to which informational output should be sent.

The log category to which informational output should be sent.

public boolean $longErrorTrace
#

(write-only) Sets the value of ResponseUtil::$longErrorTrace

(write-only) Sets the value of ResponseUtil::$longErrorTrace

public ResponseUtil $response
#

The response utility singleton

The response utility singleton

public boolean $shutdown
#

(write-only) Sets the value of ResponseUtil::$shutdown

(write-only) Sets the value of ResponseUtil::$shutdown

Magic properties inherited from CBehavior
$enabled, $owner
X2CRM Documentation API documentation generated by ApiGen 2.8.0