-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModule.php
More file actions
64 lines (55 loc) · 2.07 KB
/
Module.php
File metadata and controls
64 lines (55 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace ApiSkeletons\OAuth2\Doctrine\Console;
use Laminas\ModuleManager\Feature\ConfigProviderInterface;
use Laminas\ModuleManager\Feature\ConsoleUsageProviderInterface;
use Laminas\Console\Adapter\AdapterInterface as Console;
/**
* ZF2 module
*/
class Module implements
ConfigProviderInterface,
ConsoleUsageProviderInterface
{
public function getConsoleUsage(Console $console)
{
return array(
'oauth2:client:create [--config=]' => 'Create client',
'oauth2:client:list [--config=]' => 'List clients',
'oauth2:client:update --id=# [--config=]' => 'Update client',
'oauth2:client:delete --id=# [--config=]' => 'Delete client',
'oauth2:scope:create [--config=]' => 'Create scope',
'oauth2:scope:list [--config=]' => 'List scopes',
'oauth2:scope:update --id=# [--config=]' => 'Update scope',
'oauth2:scope:delete --id=# [--config=]' => 'Delete scope',
'oauth2:public-key:create --id=# [--config=]' => 'Create public key. id is a client record.',
'oauth2:public-key:delete --id=# [--config=]' => 'Delete public key. id is a client record.',
'oauth2:jwt:create --id=# [--config=]' => 'Create a JWT entry. id is a client record.',
'oauth2:jwt:list [--config=]' => 'List JWT entries',
'oauth2:jwt:delete --id=# [--config=]' => 'Delete a JWT entry. id is a jwt record.',
);
}
/**
* Retrieve autoloader configuration
*
* @return array
*/
public function getAutoloaderConfig()
{
return array('Laminas\Loader\StandardAutoloader' => array('namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/',
)));
}
/**
* Provide default configuration.
*
* @param return array
*/
public function getConfig()
{
$provider = new ConfigProvider();
return [
'controllers' => $provider->getControllerDependencyConfig(),
'console' => ['router' => $provider->getConsoleRouterConfig()],
];
}
}