<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* Base class for writing API_Wrappers which generically manipulate the content
*/
require_once 'api/Wrapper.php';
+
+/**
+ * Class CRM_Utils_API_AbstractFieldCoder
+ */
abstract class CRM_Utils_API_AbstractFieldCoder implements API_Wrapper {
/**
/**
* @param string $fldName
- * @return bool TRUE if encoding should be skipped for this field
+ * @return bool
+ * TRUE if encoding should be skipped for this field
*/
public function isSkippedField($fldName) {
$skipFields = $this->getSkipFields();
}
/**
- * This function is going to filter the
+ * going to filter the
* submitted values.
*
* @param array|string $values the field value from the API
*/
public abstract function encodeInput(&$values);
+ /**
+ * @param $values
+ *
+ * @return mixed
+ */
public abstract function decodeOutput(&$values);
/**
- * {@inheritDoc}
+ * @inheritDoc
*/
public function fromApiInput($apiRequest) {
$lowerAction = strtolower($apiRequest['action']);
}
/**
- * {@inheritDoc}
+ * @inheritDoc
*/
public function toApiOutput($apiRequest, $result) {
$lowerAction = strtolower($apiRequest['action']);
protected function isApiControlField($key) {
return (FALSE !== strpos($key, '.'));
}
+
}