comparison Lib/IMPL/Web/TT/Document.pm @ 121:92c850d0bdb9

Minor changes Fixed bug with templates base in the PageFormat module Added an ability to remove current security context with a specified
author wizard
date Tue, 08 Jun 2010 03:38:10 +0400
parents 0475eb382085
children 0dce0470a3d8
comparison
equal deleted inserted replaced
120:41e9d9ea3db5 121:92c850d0bdb9
145 145
146 die new IMPL::InvalidArgumentException("A view object is required") unless blessed($value) and $value->isa('Template::View'); 146 die new IMPL::InvalidArgumentException("A view object is required") unless blessed($value) and $value->isa('Template::View');
147 } 147 }
148 148
149 sub LoadFile { 149 sub LoadFile {
150 my ($this,$filePath,$encoding) = @_; 150 my ($this,$filePath,$encoding,@includes) = @_;
151 151
152 die new IMPL::InvalidArgumentException("A filePath parameter is required") unless $filePath; 152 die new IMPL::InvalidArgumentException("A filePath parameter is required") unless $filePath;
153 153
154 $encoding ||= 'utf8'; 154 $encoding ||= 'utf8';
155 155
163 $this->provider( 163 $this->provider(
164 ENCODING => $encoding, 164 ENCODING => $encoding,
165 INTERPOLATE => 1, 165 INTERPOLATE => 1,
166 PRE_CHOMP => 1, 166 PRE_CHOMP => 1,
167 POST_CHOMP => 1, 167 POST_CHOMP => 1,
168 INCLUDE_PATH => $inc 168 INCLUDE_PATH => [$inc,@includes]
169 ); 169 );
170 170
171 $this->template($this->context->template($fileName)); 171 $this->template($this->context->template($fileName));
172 } 172 }
173 173