1 | <?php |
||
9 | class CFileContent |
||
10 | { |
||
11 | use \Anax\TConfigure, |
||
12 | \Anax\DI\TInjectionAware; |
||
13 | |||
14 | |||
15 | |||
16 | /** |
||
17 | * Base path to content. |
||
18 | * |
||
19 | */ |
||
20 | private $path; |
||
21 | |||
22 | |||
23 | |||
24 | /** |
||
25 | * Get file as content. |
||
26 | * |
||
27 | * @param string $file with content |
||
28 | * |
||
29 | * @return string as content of the file |
||
30 | * |
||
31 | * @throws Exception when file does not exist |
||
32 | */ |
||
33 | public function get($file) |
||
49 | |||
50 | |||
51 | |||
52 | /** |
||
53 | * Set base path where to find content. |
||
54 | * |
||
55 | * @param string $path where content reside |
||
56 | * |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function setBasePath($path) |
||
68 | |||
69 | |||
70 | |||
71 | /** |
||
72 | * Set standard suffix. |
||
73 | * |
||
74 | * @param string $suffix to use as standard suffix of filename |
||
75 | * |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setSuffix($suffix) |
||
84 | } |
||
85 |