diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2015-01-20 19:23:42 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2015-01-20 19:23:42 +0100 |
commit | 103578448db0ce03ea231a10e8234b2d8cb27e34 (patch) | |
tree | d903ab3b16949fa3b75ec96718cf7c4547401932 /framework/Exceptions/TTemplateException.php | |
parent | 169950e09cad0e69a7dcbcdabe7ef86086766483 (diff) |
One class per file: framework/Exceptions/
Diffstat (limited to 'framework/Exceptions/TTemplateException.php')
-rw-r--r-- | framework/Exceptions/TTemplateException.php | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/framework/Exceptions/TTemplateException.php b/framework/Exceptions/TTemplateException.php new file mode 100644 index 00000000..7deb6ed0 --- /dev/null +++ b/framework/Exceptions/TTemplateException.php @@ -0,0 +1,74 @@ +<?php +/** + * Exception classes file + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package System.Exceptions + */ + +/** + * TTemplateException class + * + * TTemplateException represents an exception caused by invalid template syntax. + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @package System.Exceptions + * @since 3.1 + */ +class TTemplateException extends TConfigurationException +{ + private $_template=''; + private $_lineNumber=0; + private $_fileName=''; + + /** + * @return string the template source code that causes the exception. This is empty if {@link getTemplateFile TemplateFile} is not empty. + */ + public function getTemplateSource() + { + return $this->_template; + } + + /** + * @param string the template source code that causes the exception + */ + public function setTemplateSource($value) + { + $this->_template=$value; + } + + /** + * @return string the template file that causes the exception. This could be empty if the template is an embedded template. In this case, use {@link getTemplateSource TemplateSource} to obtain the actual template content. + */ + public function getTemplateFile() + { + return $this->_fileName; + } + + /** + * @param string the template file that causes the exception + */ + public function setTemplateFile($value) + { + $this->_fileName=$value; + } + + /** + * @return integer the line number at which the template has error + */ + public function getLineNumber() + { + return $this->_lineNumber; + } + + /** + * @param integer the line number at which the template has error + */ + public function setLineNumber($value) + { + $this->_lineNumber=TPropertyValue::ensureInteger($value); + } +}
\ No newline at end of file |