-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall.php
30 lines (27 loc) · 842 Bytes
/
install.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
<?php
/**
* Installer of CodeIgniter service layer project
*
* @author Nguyen Luu Thanh Binh <[email protected]>
* @license MIT License
* @copyright 2017 Nguyen Luu Thanh Binh
* @link https://github.com/nltbinh/
*/
$installer = new Installer();
$installer->install();
class Installer
{
public static function install()
{
self::copy('vendor/nltbinh/codeigniter-service-layer/application/core/MY_Loader.php', 'application/core/MY_Loader.php');
self::copy('vendor/nltbinh/codeigniter-service-layer/application/core/Service.php', 'application/core/Service.php');
mkdir('application/services');
}
private static function copy($src, $dst)
{
$success = copy($src, $dst);
if ($success) {
print 'copied: ' . $dst . PHP_EOL;
}
}
}