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.
-class => Classname is specified, then a specialized class constructor will be used (for example
WE_Sample::Root). Additional arguments are passed to this constructor.
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::DBis automatically prepended.
The special class name
:allrepresents the classes
Content. Note that these are not really all available databases in a typical WE system.
- login($user, $password)
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, $password)
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.
- is_allowed($action, $object_id)
Return a true value if the current user is allowed to do
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
Set or get the currently logged in user.
Slaven Rezic - firstname.lastname@example.org