本文整理匯總了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());
}