1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is, guess what, part of WebHelper. |
5
|
|
|
* |
6
|
|
|
* (c) James <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace JamesRezo\WebHelper\WebProject; |
13
|
|
|
|
14
|
|
|
use Symfony\Component\Process\Process; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Base class for webproject classes. |
18
|
|
|
* |
19
|
|
|
* name can be either laravel, symfony, drupal, dokuwiki other webproject name |
20
|
|
|
* |
21
|
|
|
* @author james <[email protected]> |
22
|
|
|
*/ |
23
|
|
|
abstract class WebProject implements WebProjectInterface |
24
|
|
|
{ |
25
|
|
|
/** |
26
|
|
|
* the name of a webproject. |
27
|
|
|
* |
28
|
|
|
* @var string the name of a webproject |
29
|
|
|
*/ |
30
|
|
|
private $name; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* the version of a webproject. |
34
|
|
|
* |
35
|
|
|
* @var string the version of a webproject |
36
|
|
|
*/ |
37
|
|
|
private $version; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Constructor. |
41
|
|
|
* |
42
|
|
|
* @param string $name the name of a webproject |
43
|
|
|
* @param string $version the version of a webproject |
44
|
|
|
*/ |
45
|
1 |
|
public function __construct($name, $version = '') |
46
|
|
|
{ |
47
|
1 |
|
$this->name = $name; |
48
|
1 |
|
$this->version = $version; |
49
|
1 |
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Gets the name of a webproject. |
53
|
|
|
* |
54
|
|
|
* @return string the name of the webproject |
55
|
|
|
*/ |
56
|
1 |
|
public function getName() |
57
|
|
|
{ |
58
|
1 |
|
return $this->name; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* Gets the version of a webproject. |
63
|
|
|
* |
64
|
|
|
* @return string the version of the webproject |
65
|
|
|
*/ |
66
|
|
|
public function getVersion() |
67
|
|
|
{ |
68
|
|
|
return $this->version; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
abstract public function getParameters(); |
72
|
|
|
} |
73
|
|
|
|