-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.php
73 lines (62 loc) · 1.46 KB
/
controller.php
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
65
66
67
68
69
70
71
72
73
<?php
namespace Concrete\Package\HttpClientCompat;
use Concrete\Core\Database\EntityManager\Provider\ProviderInterface;
use Concrete\Core\Package\Package;
use CHttpClient\ServiceProvider;
defined('C5_EXECUTE') or die('Access denied.');
class Controller extends Package implements ProviderInterface
{
/**
* The package handle.
*
* @var string
*/
protected $pkgHandle = 'http_client_compat';
/**
* The package version.
*
* @var string
*/
protected $pkgVersion = '1.0.0';
/**
* The minimum concrete5 version.
*
* @var string
*/
protected $appVersionRequired = '8.5.0';
/**
* Map folders to PHP namespaces, for automatic class autoloading.
*
* @var array
*/
protected $pkgAutoloaderRegistries = [
'src' => 'CHttpClient',
];
/**
* {@inheritdoc}
*/
public function getPackageName()
{
return t('HTTP Client Compat');
}
/**
* {@inheritdoc}
*/
public function getPackageDescription()
{
return t('A package that makes it easy to perform HTTP requests both for concrete5 v8 and ConcreteCMS v9+.');
}
/**
* {@inheritdoc}
*
* @see \Concrete\Core\Database\EntityManager\Provider\ProviderInterface::getDrivers()
*/
public function getDrivers()
{
return [];
}
public function on_start()
{
$this->app->make(ServiceProvider::class)->register();
}
}