forked from theshock/libcanvas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuilder.php
More file actions
35 lines (30 loc) · 757 Bytes
/
builder.php
File metadata and controls
35 lines (30 loc) · 757 Bytes
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
<?php
require dirname(__FILE__) . '/Packager/packager.php';
class LibCanvasBuilder
{
const NAME = 'LibCanvas';
const SRC = '/Source';
private $_files = array();
private $_result;
private $_packager;
public function __construct($components = array())
{
$pkgDir = dirname(__FILE__) . self::SRC;
$this->_packager = new Packager($pkgDir);
if (empty($components)) {
$files = $this->_packager->get_all_files();
} else {
$files = $this->_packager->components_to_files($components);
}
$this->_files = $this->_packager->complete_files($files);
$this->_result = $this->_packager->build($this->_files);
}
public function getResult()
{
return $this->_result;
}
public function getProcessedFiles()
{
return $this->_files;
}
}