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

  • ActionMetaData
  • ActionText
  • Admin
  • AmorphousModel
  • ApiHook
  • APIModel
  • ChartSetting
  • ContactForm
  • ContactList
  • Credentials
  • Criteria
  • Dropdowns
  • Events
  • EventsData
  • Fields
  • FormLayout
  • Imports
  • InlineEmail
  • LeadRouting
  • Locations
  • LoginForm
  • Maps
  • Modules
  • Notes
  • Notification
  • PhoneNumber
  • Profile
  • Record
  • Relationships
  • Roles
  • RoleToPermission
  • RoleToUser
  • RoleToWorkflow
  • Rules
  • Session
  • SessionLog
  • Social
  • Tags
  • TempFile
  • Tips
  • Tours
  • TrackEmail
  • TriggerLog
  • URL
  • ViewLog
  • Widgets
  • X2List
  • X2ListCriterion
  • X2ListItem
  • X2Model
  • Overview
  • Package
  • Class
  • Tree

Class AmorphousModel

Model that assumes any attributes given to it.

Intended for handling special data validation in Fields input.

CComponent
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by AmorphousModel
Package: application\models
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/models/AmorphousModel.php
Methods summary
public mixed
# __get( string $name )

Returns a property value, an event handler list or a behavior based on its name. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property or obtain event handlers:

$value=$component->propertyName;
$handlers=$component->eventName;

Returns a property value, an event handler list or a behavior based on its name. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property or obtain event handlers:

$value=$component->propertyName;
$handlers=$component->eventName;

Parameters

$name
string
$name the property name or event name

Returns

mixed
the property value, event handlers attached to the event, or the named behavior

Throws

CException
if the property or event is not defined

See

AmorphousModel::__set()

Overrides

CComponent::__get()
public mixed
# __set( string $name, mixed $value )

Sets value of a component property. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to set a property or attach an event handler

$this->propertyName=$value;
$this->eventName=$callback;

Sets value of a component property. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to set a property or attach an event handler

$this->propertyName=$value;
$this->eventName=$callback;

Parameters

$name
string
$name the property name or the event name
$value
mixed
$value the property value or callback

Returns

mixed

Throws

CException
if the property/event is not defined or the property is read only.

See

AmorphousModel::__get()

Overrides

CComponent::__set()
public
# addField( Fields $field, mixed $name = null )
public array
# attributeNames( )

Returns the list of attribute names of the model.

Returns the list of attribute names of the model.

Returns

array
list of attribute names.
public
# getAttribute( mixed $name )
public string
# getAttributeLabel( string $name )

Returns the text label for the specified attribute.

Returns the text label for the specified attribute.

Parameters

$name
string
$attribute the attribute name

Returns

string
the attribute label

See

CModel::generateAttributeLabel()
CModel::attributeLabels()

Overrides

CModel::getAttributeLabel()
public array
# getAttributes( array $names = null )

Returns all attribute values.

Returns all attribute values.

Parameters

$names
array
$names list of attributes whose value needs to be returned. Defaults to null, meaning all attributes as listed in AmorphousModel::attributeNames() will be returned. If it is an array, only the attributes in the array will be returned.

Returns

array
attribute values (name=>value).

Overrides

CModel::getAttributes()
public
# hasAttribute( mixed $name )
public array
# rules( )

Automatically generate rules from X2Model.

Automatically generate rules from X2Model.

The "required" validator is excluded because, when validating input for a default value for a field that is required, blank should be a valid value because otherwise having the field be required would force the user to specify a non-blank default value.

Returns

array

Overrides

CModel::rules()
public
# setAttribute( mixed $name, mixed $value )
public
# setTableName( mixed $value )
public
# tableName( )
Methods inherited from CModel
addError(), addErrors(), afterConstruct(), afterValidate(), attributeLabels(), beforeValidate(), behaviors(), clearErrors(), createValidators(), generateAttributeLabel(), getError(), getErrors(), getIterator(), getSafeAttributeNames(), getScenario(), getValidatorList(), getValidators(), hasErrors(), isAttributeRequired(), isAttributeSafe(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), onAfterConstruct(), onAfterValidate(), onBeforeValidate(), onUnsafeAttribute(), setAttributes(), setScenario(), unsetAttributes(), validate()
Methods inherited from CComponent
__call(), __isset(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Magic properties inherited from CModel
$attributes, $errors, $iterator, $safeAttributeNames, $scenario, $validatorList, $validators
X2CRM Documentation API documentation generated by ApiGen 2.8.0