1 | <?php |
||
14 | class Repository { |
||
15 | |||
16 | const REGEX = '#((git|ssh|http(s)?)|(git@[\w.]+))(:(\/\/)?)([\w.@:\/\-~]+)(\/)?#'; |
||
17 | |||
18 | /** |
||
19 | * @Type("string") |
||
20 | */ |
||
21 | private $type; |
||
22 | |||
23 | /** |
||
24 | * @Type("string") |
||
25 | */ |
||
26 | private $url; |
||
27 | |||
28 | /** |
||
29 | * Initialize with default opinionated values |
||
30 | */ |
||
31 | public function __construct() { |
||
35 | |||
36 | /** |
||
37 | * Get the string representation |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function __toString() { |
||
44 | |||
45 | /** |
||
46 | * Get type |
||
47 | * |
||
48 | * @return string $type |
||
49 | */ |
||
50 | public function getType() { |
||
53 | |||
54 | /** |
||
55 | * Set type |
||
56 | * |
||
57 | * @param string $type |
||
58 | * |
||
59 | * @return static |
||
60 | */ |
||
61 | public function setType($type) { |
||
66 | |||
67 | /** |
||
68 | * Get url |
||
69 | * |
||
70 | * @return string $url |
||
71 | */ |
||
72 | public function getUrl() { |
||
75 | |||
76 | /** |
||
77 | * Set url |
||
78 | * |
||
79 | * @param string $url |
||
80 | * |
||
81 | * @return static |
||
82 | */ |
||
83 | public function setUrl($url) { |
||
88 | |||
89 | /** |
||
90 | * Get repository ID |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getId() { |
||
97 | } |
||
98 |