Repository navigation
Expand file tree
/
Copy pathHttpMessagesPlugin.php
More file actions
80 lines (67 loc) · 1.52 KB
/
Copy pathHttpMessagesPlugin.php
File metadata and controls
80 lines (67 loc) · 1.52 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
namespace Craft;
class HttpMessagesPlugin extends BasePlugin
{
/**
* Get Name
*
* @return string Name
*/
public function getName()
{
return Craft::t('Http Messages');
}
/**
* Get Version
*
* @return string Version
*/
public function getVersion()
{
return '0.0.0';
}
/**
* Get Developer
*
* @return string Developer
*/
public function getDeveloper()
{
return 'Airtype';
}
/**
* Get Developer Url
*
* @return string Developer Url
*/
public function getDeveloperUrl()
{
return 'http://airtype.com';
}
/**
* Register Site Routes
*
* @return array Site Routes
*/
public function registerSiteRoutes()
{
$routes = craft()->httpMessages_routes->getCraftRoutes();
return $routes;
}
/**
* Init
*
* @return void
*/
public function init()
{
Craft::import('plugins.httpmessages.middleware.*', true);
Craft::import('plugins.httpmessages.etc.*.*', true);
$autoload = dirname(__FILE__) . '/../../../vendor/autoload.php';
if (!is_file($autoload)) {
throw new HttpMessages_Exception("`/vendor/autoload.php` could not be loaded by `craft/plugins/httpmessages/HttpMessagesPlugin.php`. Try running `composer install` in the root of the project.");
}
require_once($autoload);
craft()->httpMessages_config->loadConfigFiles();
}
}