<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
*/
require_once 'api/Wrapper.php';
private static $_singleton = NULL;
/**
+ * Singleton function.
+ *
* @return CRM_Utils_API_MatchOption
*/
public static function singleton() {
public function fromApiInput($apiRequest) {
// Parse options.match or options.match-mandatory
- $keys = NULL; // array of fields to match against
+ $keys = NULL;
if (isset($apiRequest['params'], $apiRequest['params']['options']) && is_array($apiRequest['params']['options'])) {
if (isset($apiRequest['params']['options']['match-mandatory'])) {
$isMandatory = TRUE;
break;
default:
- // be forgiveful of sloppily api calls
+ // be forgiving of sloppy api calls
}
}
* @param array $createParams
* @param array $keys
* @param bool $isMandatory
+ *
* @return array
* revised $createParams, including 'id' if known
* @throws API_Exception