Commit | Line | Data |
---|---|---|
c145023a TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
4 | | Copyright CiviCRM LLC. All rights reserved. | | |
5 | | | | |
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 | +--------------------------------------------------------------------+ | |
10 | */ | |
11 | ||
12 | /** | |
13 | * | |
14 | * @package CRM | |
15 | * @copyright CiviCRM LLC https://civicrm.org/licensing | |
16 | */ | |
17 | class CRM_OAuth_BAO_OAuthClient extends CRM_OAuth_DAO_OAuthClient { | |
18 | ||
19 | /** | |
20 | * Create a new OAuthClient based on array-data | |
21 | * | |
22 | * @param array $params key-value pairs | |
23 | * @return CRM_OAuth_DAO_OAuthClient|NULL | |
24 | * | |
25 | * public static function create($params) { | |
26 | * $className = 'CRM_OAuth_DAO_OAuthClient'; | |
27 | * $entityName = 'OAuthClient'; | |
28 | * $hook = empty($params['id']) ? 'create' : 'edit'; | |
29 | * | |
30 | * CRM_Utils_Hook::pre($hook, $entityName, CRM_Utils_Array::value('id', $params), $params); | |
31 | * $instance = new $className(); | |
32 | * $instance->copyValues($params); | |
33 | * $instance->save(); | |
34 | * CRM_Utils_Hook::post($hook, $entityName, $instance->id, $instance); | |
35 | * | |
36 | * return $instance; | |
37 | * } */ | |
38 | ||
39 | } |