NAME
WE_Content::Base - base class for all web.editor content implementations
SYNOPSIS
use WE_Content::Base;
DESCRIPTION
CONSTRUCTOR
new WE_Content::... -string => ..., -file => ..., -object => ...
Construct with either a string, content from file or a perl object.
METHODS
- clone([$as])
-
Clone the
$self
object. If$as
is supplied, then the cloned object is blessed to this class. - get_string([-file => ... | -string => ...])
-
Get a string either from file or from string.
- guess_class($buf)
-
Guess the
WE_Content::...
implementation of the data in$buf
. CurrentlyWE_Content::YAML
orWE_Content::PerlDD
may be returned. - by_path($path)
-
Return the referenced content element. The path is either a string with "/" as path separator or an array reference. Leading "/" are optional.
- by_dotted($path)
-
Same as by_path, but use the dot (".") as separator.
- set_by_path($path, $new_value)
-
Set the referenced (scalar) path to
$new_value
. - set_by_dotted($path, $new_value)
-
Same as set_by_path, but use the dot (".") as separator.
- set_by_dotted($path, $value)
- is_prototype
-
Return true, if the current object is from "prototype" or "template" type.
AUTHOR
Slaven Rezic - slaven@rezic.de