rewrote the template api and added lots of caching options

This commit is contained in:
JT Smith 2004-06-15 17:36:25 +00:00
parent 6613992f3d
commit 20482def49
24 changed files with 252 additions and 100 deletions

View file

@ -66,6 +66,7 @@ Package to manipulate WebGUI Attachments.
$filename = $attachment->save("formImage");
$filename = $attachment->saveFromFilesystem($pathToFile);
$filename = $attachment->saveFromScalar($content);
$filename = $attachment->saveFromHashref($hashRef);
$hashRef = $attachment->getHashref;
@ -681,6 +682,32 @@ sub saveFromHashref {
return $self->getFilename;
}
#-------------------------------------------------------------------
=head2 saveFromScalar ( scalar )
Stores a scalar as a text attachment.
=over
=item scalar
A scalar variable containing the content to write to the filesystem.
=back
=cut
sub saveFromScalar {
my ($self, $content) = @_;
$self->getNode->create();
open(FILE,">".$self->getPath);
print FILE $content;
close(FILE);
return $self->getFilename;
}
1;