本文整理汇总了PHP中CM_Params::getArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CM_Params::getArray方法的具体用法?PHP CM_Params::getArray怎么用?PHP CM_Params::getArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CM_Params
的用法示例。
在下文中一共展示了CM_Params::getArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _execute
protected function _execute(CM_Params $params)
{
$code = $params->getString('code');
$identityList = $params->getArray('identityList');
$eventName = $params->getString('eventName');
$propertyList = $params->getArray('propertyList');
$kissMetrics = new CMService_KissMetrics_Client($code);
$kissMetrics->setIdentityList($identityList);
$kissMetrics->trackEvent($eventName, $propertyList);
}
示例2: _execute
protected function _execute(CM_Params $params)
{
$propertyId = $params->getString('propertyId');
$parameterList = $params->getArray('parameterList');
$client = new CMService_GoogleAnalytics_MeasurementProtocol_Client($propertyId);
$client->_submitHit($parameterList);
}
示例3: _execute
protected function _execute(CM_Params $params)
{
$id = $params->getInt('id');
$values = $params->getArray('values');
$svm = new CM_SVM_Model($id);
return $svm->predict($values);
}
示例4: _execute
protected function _execute(CM_Params $params)
{
$id = $params->getInt('id');
$class = $params->getInt('class');
$values = $params->getArray('values');
$svm = new CM_SVM_Model($id);
$svm->addTraining($class, $values);
}
示例5: ajax_validate
public function ajax_validate(CM_Params $params, CM_Frontend_JavascriptContainer_View $handler, CM_Http_Response_View_Ajax $response)
{
$data = $params->getArray('data');
$result = [];
foreach ($data as $name => $userInput) {
$field = $this->getField($name);
$empty = $field->isEmpty($userInput);
$value = null;
$validationError = null;
if (!$empty) {
try {
$value = $field->validate($response->getEnvironment(), $userInput);
} catch (CM_Exception_FormFieldValidation $e) {
$validationError = $e->getMessagePublic($response->getRender());
}
}
$result[$name] = ['value' => $value, 'empty' => $empty, 'validationError' => $validationError];
}
return $result;
}
示例6: ajax_getSuggestions
public function ajax_getSuggestions(CM_Params $params, CM_Frontend_JavascriptContainer_View $handler, CM_Http_Response_View_Ajax $response)
{
return $this->_getSuggestions($params->getString('term'), $params->getArray('options'), $response->getRender());
}