3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_OAuth_BAO_OAuthClient
extends CRM_OAuth_DAO_OAuthClient
{
20 * Create a new OAuthClient based on array-data
22 * @param array $params key-value pairs
23 * @return CRM_OAuth_DAO_OAuthClient|NULL
25 * public static function create($params) {
26 * $className = 'CRM_OAuth_DAO_OAuthClient';
27 * $entityName = 'OAuthClient';
28 * $hook = empty($params['id']) ? 'create' : 'edit';
30 * CRM_Utils_Hook::pre($hook, $entityName, CRM_Utils_Array::value('id', $params), $params);
31 * $instance = new $className();
32 * $instance->copyValues($params);
34 * CRM_Utils_Hook::post($hook, $entityName, $instance->id, $instance);