1 | <?php |
||
4 | abstract class AbstractMaker |
||
5 | { |
||
6 | const SEPARETOR = '_'; |
||
7 | |||
8 | /** |
||
9 | * verifica se ja existe e cria as pastas em cascata |
||
10 | * |
||
11 | * @param $dir |
||
12 | */ |
||
13 | public static function makeDir ( $dir ) |
||
23 | |||
24 | /** |
||
25 | * @param string $nameFile nome do arquivo a ser criado |
||
26 | * @param string $tplContent Conteudo do Template |
||
27 | * @param bool $overwrite Sobrescreve o arquivo ja existente |
||
28 | * |
||
29 | * @return boolean |
||
30 | */ |
||
31 | public static function makeSourcer ( $nameFile, $tplContent, $overwrite = false ) |
||
45 | |||
46 | /** |
||
47 | * @param string $str |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public static function getClassName ( $str ) |
||
61 | |||
62 | protected function getParsedTplContents ( $filePath, $vars = array () ) |
||
72 | |||
73 | } |
An exit expression should only be used in rare cases. For example, if you write a short command line script.
In most cases however, using an
exit
expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.