-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoboFile.php
More file actions
50 lines (43 loc) · 1.12 KB
/
RoboFile.php
File metadata and controls
50 lines (43 loc) · 1.12 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
<?php
use DoctrineOrmConvertMapping\Helper;
class RoboFile extends \Robo\Tasks
{
/**
* Clear cache
*/
public function appClearCache()
{
$dirs = [
Helper\Command::DEFAULT_DEST_PATH,
Helper\Log::LOG_PATH
];
$this->cleanDirectories($dirs);
}
/**
* Clear cache Alias
*/
public function appCC()
{
$this->appClearCache();
}
public function appSampleSchema()
{
$this->taskExec('php run.php app:schema doctrine-orm-convert-mapping --dest-path=sample/schema --table-prefix=prefix_')->run();
}
public function appSampleConvertMapping()
{
$this->taskExec('php run.php app:convert-mapping doctrine-orm-convert-mapping --to-type=annotation')->run();
}
protected function cleanDirectories(array $dirs)
{
foreach ($dirs as $dir) {
if (file_exists($dir)) {
try {
$this->_cleanDir($dir);
} catch (\Exception $exc) {
$this->say($exc->getMessage());
}
}
}
}
}