File indexing completed on 2025-01-19 05:20:59
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_CodeGenerator 0017 * @subpackage PHP 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * @see Zend_CodeGenerator_Abstract 0025 */ 0026 // require_once 'Zend/CodeGenerator/Abstract.php'; 0027 0028 /** 0029 * @category Zend 0030 * @package Zend_CodeGenerator 0031 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0032 * @license http://framework.zend.com/license/new-bsd New BSD License 0033 */ 0034 abstract class Zend_CodeGenerator_Php_Abstract extends Zend_CodeGenerator_Abstract 0035 { 0036 0037 /** 0038 * Line feed to use in place of EOL 0039 * 0040 */ 0041 const LINE_FEED = "\n"; 0042 0043 /** 0044 * @var bool 0045 */ 0046 protected $_isSourceDirty = true; 0047 0048 /** 0049 * @var int|string 0050 */ 0051 protected $_indentation = ' '; 0052 0053 /** 0054 * setSourceDirty() 0055 * 0056 * @param bool $isSourceDirty 0057 * @return Zend_CodeGenerator_Php_Abstract 0058 */ 0059 public function setSourceDirty($isSourceDirty = true) 0060 { 0061 $this->_isSourceDirty = ($isSourceDirty) ? true : false; 0062 return $this; 0063 } 0064 0065 /** 0066 * isSourceDirty() 0067 * 0068 * @return bool 0069 */ 0070 public function isSourceDirty() 0071 { 0072 return $this->_isSourceDirty; 0073 } 0074 0075 /** 0076 * setIndentation() 0077 * 0078 * @param string|int $indentation 0079 * @return Zend_CodeGenerator_Php_Abstract 0080 */ 0081 public function setIndentation($indentation) 0082 { 0083 $this->_indentation = $indentation; 0084 return $this; 0085 } 0086 0087 /** 0088 * getIndentation() 0089 * 0090 * @return string|int 0091 */ 0092 public function getIndentation() 0093 { 0094 return $this->_indentation; 0095 } 0096 0097 }