Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 3e15a13

Browse files
committed
ENH: refs #256. Use new self documenting mechanism for core api methods
1 parent c6ca048 commit 3e15a13

File tree

4 files changed

+1016
-1198
lines changed

4 files changed

+1016
-1198
lines changed

modules/api/AppController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3+
/** Api Application Controller */
34
class Api_AppController extends MIDAS_GlobalModule
45
{
5-
public $moduleName = 'api';
6-
7-
/**completion eclipse*/
6+
public $moduleName = 'api';
7+
88
/**
99
* Api_Userapi Model
1010
* @var Api_UserapiModelBase

modules/api/Notification.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
<?php
2+
3+
require_once BASE_PATH . '/modules/api/library/APIEnabledNotification.php';
4+
25
/** notification manager*/
3-
class Api_Notification extends MIDAS_Notification
6+
class Api_Notification extends ApiEnabled_Notification
47
{
5-
public $_models=array('User');
8+
public $moduleName = 'api';
9+
public $_moduleComponents = array('Api');
10+
public $_models = array('User');
611

712
/** init notification process*/
813
public function init()
914
{
1015
$this->addCallBack('CALLBACK_CORE_GET_CONFIG_TABS', 'getConfigTabs');
1116
$this->addCallBack('CALLBACK_CORE_PASSWORD_CHANGED', 'setDefaultWebApiKey');
1217
$this->addCallBack('CALLBACK_CORE_NEW_USER_ADDED', 'setDefaultWebApiKey');
18+
19+
$this->enableWebAPI('api');
1320
}//end init
1421

1522
/** get Config Tabs */

0 commit comments

Comments
 (0)