Skip to content

Commit 830a9af

Browse files
committed
add TemplateProvider
1 parent 05907ac commit 830a9af

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/**
4+
* @author Mohammed Moussaoui
5+
* @copyright Copyright (c) Mohammed Moussaoui. All rights reserved.
6+
* @license MIT License. For full license information see LICENSE file in the project root.
7+
* @link https://github.com/DevNet-Framework
8+
*/
9+
10+
namespace DevNet\Cli\Templating;
11+
12+
class TemplateProvider implements ITemplateProvider
13+
{
14+
protected string $name;
15+
protected string $description;
16+
protected string $sourcePath;
17+
18+
public function __construct(string $name, string $description, string $sourcePath)
19+
{
20+
$this->name = $name;
21+
$this->description = $description;
22+
$this->sourcePath = $sourcePath;
23+
}
24+
25+
/**
26+
* Get the template name
27+
*/
28+
public function getName(): string
29+
{
30+
return $this->name;
31+
}
32+
33+
/**
34+
* Get the template description
35+
*/
36+
public function getDescription(): string
37+
{
38+
return $this->description;
39+
}
40+
41+
/**
42+
* Get the template source path
43+
*/
44+
public function getSourcePath(): string
45+
{
46+
return $this->sourcePath;
47+
}
48+
}

0 commit comments

Comments
 (0)