WE::DB - root of web editor database collection
$root = new WE::DB
Instantiate a new root for a web.editor database. This class will usually be overwritten by a class doing the dirt work of opening the sub-databases. See WE_Singlesite::Root for an example.
If -class => Classname is specified, then a specialized class constructor will be used (for example WE_Sample::Root). Additional arguments are passed to this constructor.
-class => Classname
WE_Sample::Root
Tell the framework to use the given database classes. These classes will be automatically loaded.
The classes can be specified as abbreviated names (without a ":" in the class name), in this case WE::DB is automatically prepended.
WE::DB
The special class name :all represents the classes Obj, User and Content. Note that these are not really all available databases in a typical WE system.
:all
Obj
User
Content
Identify the user and do a login to the system by putting him to the OnlineUser database. Return true if everything was right.
Logout the user.
Identify $user with $password and return true if the authentification is successful. Also set the CurrentUser member. This does not make any changes to the OnlineUser database.
Return a true value if the current user is allowed to do $action on object $object_id.
$action
$object_id
This method should be overridden, because it provides no access control in this form.
Return true if the given object is releasable. The default implementation always returns true.
Return the root object of the underlying object database
Initialize the underlying databases.
Delete the contents from all underlying databases.
Delete all underlying databases. This will also remove the files, not just the contents as in delete_db_contents.
delete_db_contents
Set or get the currently logged in user.
Slaven Rezic - slaven@rezic.de
WE_Singlesite::Root, WE_Sample::Root.
To install WE::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WE::DB
CPAN shell
perl -MCPAN -e shell install WE::DB
For more information on module installation, please visit the detailed CPAN module installation guide.