Skip to content

Instantly share code, notes, and snippets.

@tareko
Created May 23, 2012 14:08
Show Gist options
  • Select an option

  • Save tareko/2775420 to your computer and use it in GitHub Desktop.

Select an option

Save tareko/2775420 to your computer and use it in GitHub Desktop.
data from form input
$this->request->data
array(
'Trade' => array(
'from_user_id' => 'A B',
'user_id' => '21',
'shift_id' => '3995'
),
'TradesDetail' => array(
(int) 0 => array(
'user_id' => '79'
)
)
)
Trade Object
(
[actsAs] => Array
(
[0] => Search.Searchable
[1] => Containable
)
[filterArgs] => Array
(
)
[validate] => Array
(
[id] => Array
(
[notempty] => Array
(
[rule] => Array
(
[0] => notempty
)
)
[numeric] => Array
(
[rule] => Array
(
[0] => numeric
)
)
)
[user_id] => Array
(
[numeric] => Array
(
[rule] => Array
(
[0] => numeric
)
)
[notempty] => Array
(
[rule] => Array
(
[0] => notempty
)
)
)
[shift_id] => Array
(
[numeric] => Array
(
[rule] => Array
(
[0] => numeric
)
)
[notempty] => Array
(
[rule] => Array
(
[0] => notempty
)
)
)
[status] => Array
(
[notempty] => Array
(
[rule] => Array
(
[0] => numeric
)
)
)
)
[belongsTo] => Array
(
[User] => Array
(
[className] => User
[foreignKey] => user_id
[conditions] =>
[fields] =>
[order] =>
[counterCache] =>
)
)
[hasOne] => Array
(
[Shift] => Array
(
[className] => Shift
[foreignKey] => id
[conditions] =>
[fields] =>
[order] =>
[dependent] =>
)
)
[hasMany] => Array
(
[TradesDetail] => Array
(
[className] => TradesDetail
[foreignKey] => trade_id
[conditions] =>
[fields] =>
[order] =>
[limit] =>
[offset] =>
[dependent] =>
[exclusive] =>
[finderQuery] =>
[counterQuery] =>
)
)
[useDbConfig] => default
[useTable] => trades
[id] => 22
[data] =>
[schemaName] => kitab
[table] => trades
[primaryKey] => id
[_schema:protected] => Array
(
[id] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
[key] => primary
)
[user_id] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
)
[shift_id] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
)
[status] => Array
(
[type] => integer
[null] =>
[default] =>
[length] => 11
)
[updated] => Array
(
[type] => timestamp
[null] =>
[default] => CURRENT_TIMESTAMP
[length] =>
)
[created] => Array
(
[type] => timestamp
[null] =>
[default] => 0000-00-00 00:00:00
[length] =>
)
)
[validationErrors] => Array
(
)
[validationDomain] =>
[name] => Trade
[alias] => Trade
[tableToModel] => Array
(
[trades] => Trade
)
[cacheQueries] =>
[hasAndBelongsToMany] => Array
(
)
[Behaviors] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[whitelist] => Array
(
)
[cacheSources] => 1
[findQueryType] =>
[recursive] => 1
[order] =>
[virtualFields] => Array
(
)
[_associationKeys:protected] => Array
(
[belongsTo] => Array
(
[0] => className
[1] => foreignKey
[2] => conditions
[3] => fields
[4] => order
[5] => counterCache
)
[hasOne] => Array
(
[0] => className
[1] => foreignKey
[2] => conditions
[3] => fields
[4] => order
[5] => dependent
)
[hasMany] => Array
(
[0] => className
[1] => foreignKey
[2] => conditions
[3] => fields
[4] => order
[5] => limit
[6] => offset
[7] => dependent
[8] => exclusive
[9] => finderQuery
[10] => counterQuery
)
[hasAndBelongsToMany] => Array
(
[0] => className
[1] => joinTable
[2] => with
[3] => foreignKey
[4] => associationForeignKey
[5] => conditions
[6] => fields
[7] => order
[8] => limit
[9] => offset
[10] => unique
[11] => finderQuery
[12] => deleteQuery
[13] => insertQuery
)
)
[_associations:protected] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[__backAssociation] => Array
(
)
[__backInnerAssociation] => Array
(
)
[__backOriginalAssociation] => Array
(
)
[__backContainableAssociation] => Array
(
)
[_insertID:protected] => 22
[_sourceConfigured:protected] => 1
[findMethods] => Array
(
[all] => 1
[first] => 1
[count] => 1
[neighbors] => 1
[list] => 1
[threaded] => 1
)
[_eventManager:protected] => CakeEventManager Object
(
[_listeners:protected] => Array
(
[Model.beforeFind] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => beforeFind
)
[passParams] => 1
)
)
)
[Model.afterFind] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => afterFind
)
[passParams] => 1
)
)
)
[Model.beforeValidate] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => beforeValidate
)
[passParams] => 1
)
)
)
[Model.beforeSave] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => beforeSave
)
[passParams] => 1
)
)
)
[Model.afterSave] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => afterSave
)
[passParams] => 1
)
)
)
[Model.beforeDelete] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => beforeDelete
)
[passParams] => 1
)
)
)
[Model.afterDelete] => Array
(
[10] => Array
(
[0] => Array
(
[callable] => Array
(
[0] => BehaviorCollection Object
(
[modelName] => Trade
[_methods:protected] => Array
(
[parseCriteria] => Array
(
[0] => Searchable
[1] => parseCriteria
)
[validateSearch] => Array
(
[0] => Searchable
[1] => validateSearch
)
[passedArgs] => Array
(
[0] => Searchable
[1] => passedArgs
)
[getQuery] => Array
(
[0] => Searchable
[1] => getQuery
)
[unbindAllModels] => Array
(
[0] => Searchable
[1] => unbindAllModels
)
[contain] => Array
(
[0] => Containable
[1] => contain
)
[resetBindings] => Array
(
[0] => Containable
[1] => resetBindings
)
[containments] => Array
(
[0] => Containable
[1] => containments
)
[fieldDependencies] => Array
(
[0] => Containable
[1] => fieldDependencies
)
[containmentsMap] => Array
(
[0] => Containable
[1] => containmentsMap
)
)
[_mappedMethods:protected] => Array
(
)
[_enabled:protected] => Array
(
[Searchable] => Array
(
[0] => 10
[1] => 1
)
[Containable] => Array
(
[0] => 10
[1] => 2
)
)
[_loaded:protected] => Array
(
[Searchable] => SearchableBehavior Object
(
[settings] => Array
(
[Trade] => Array
(
)
)
[_defaults:protected] => Array
(
)
[mapMethods] => Array
(
)
)
[Containable] => ContainableBehavior Object
(
[types] => Array
(
[0] => belongsTo
[1] => hasOne
[2] => hasMany
[3] => hasAndBelongsToMany
)
[runtime] => Array
(
)
[settings] => Array
(
[User] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Usergroup] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Group] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
[Trade] => Array
(
[recursive] => 1
[notices] => 1
[autoFields] => 1
)
)
[mapMethods] => Array
(
)
)
)
[defaultPriority] => 10
)
[1] => trigger
)
[passParams] =>
)
[1] => Array
(
[callable] => Array
(
[0] => Trade Object
*RECURSION*
[1] => afterDelete
)
[passParams] =>
)
)
)
)
[_isGlobal:protected] =>
)
[tablePrefix] =>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment