| 1 | <?php |
||
| 13 | class Indention |
||
| 14 | { |
||
| 15 | const FOUR_SPACES_INDENTION = ' '; |
||
| 16 | const TAB_INDENTION = "\t"; |
||
| 17 | const INITIAL_LEVEL = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | private $level = self::INITIAL_LEVEL; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $string = self::FOUR_SPACES_INDENTION; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getString() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $indention |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | public function setString($indention) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param int $number |
||
| 50 | * @return $this |
||
| 51 | */ |
||
| 52 | public function decreaseLevel($number = 1) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param int $number |
||
| 61 | * @return $this |
||
| 62 | */ |
||
| 63 | public function increaseLevel($number = 1) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return int |
||
| 72 | */ |
||
| 73 | public function isSetToInitialLevel() |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @return string |
||
| 80 | */ |
||
| 81 | public function toString() |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return string |
||
| 88 | */ |
||
| 89 | public function __toString() |
||
| 93 | } |