Abstract.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_CodeGenerator
  17. * @subpackage PHP
  18. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_CodeGenerator_Abstract
  24. */
  25. require_once 'Zend/CodeGenerator/Abstract.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_CodeGenerator
  29. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  30. * @license http://framework.zend.com/license/new-bsd New BSD License
  31. */
  32. abstract class Zend_CodeGenerator_Php_Abstract extends Zend_CodeGenerator_Abstract
  33. {
  34. /**
  35. * @var bool
  36. */
  37. protected $_isSourceDirty = true;
  38. /**
  39. * @var int|string
  40. */
  41. protected $_indentation = ' ';
  42. /**
  43. * setSourceDirty()
  44. *
  45. * @param bool $isSourceDirty
  46. * @return Zend_CodeGenerator_Php_Abstract
  47. */
  48. public function setSourceDirty($isSourceDirty = true)
  49. {
  50. $this->_isSourceDirty = ($isSourceDirty) ? true : false;
  51. return $this;
  52. }
  53. /**
  54. * isSourceDirty()
  55. *
  56. * @return bool
  57. */
  58. public function isSourceDirty()
  59. {
  60. return $this->_isSourceDirty;
  61. }
  62. /**
  63. * setIndentation()
  64. *
  65. * @param string|int $indentation
  66. * @return Zend_CodeGenerator_Php_Abstract
  67. */
  68. public function setIndentation($indentation)
  69. {
  70. $this->_indentation = $indentation;
  71. return $this;
  72. }
  73. /**
  74. * getIndentation()
  75. *
  76. * @return string|int
  77. */
  78. public function getIndentation()
  79. {
  80. return $this->_indentation;
  81. }
  82. }