MidCOM DBA baseclass for MgdSchema object decorators.

.

package midcom

 Methods

__construct ($id)

Constructor.

Creates an abstraction layer for an MgdSchema object.

Parameters

$id

__exec_create ()

__exec_delete ()

__exec_get_by_guid ($guid)

Parameters

$guid

__exec_get_by_id ($id)

Parameters

$id

__exec_get_by_path ($path)

Parameters

$path

__exec_update ()

__get (string $property)

Magic getter for object property mapping

Parameters

$property

stringName of the property

__isset (string $property)

Magic isset test for object property mapping

Parameters

$property

stringName of the property

__set (string $property, mixed $value)

Magic setter for object property mapping

Parameters

$property

stringName of the property

$value

mixedProperty value

_on_created ()

_on_creating ()

_on_deleted ()

_on_deleting ()

_on_imported ()

_on_importing ()

_on_loaded ()

_on_prepare_exec_collector ($mc)

Static

Parameters

$mc

_on_prepare_exec_query_builder ($qb)

Static

Parameters

$qb

_on_prepare_new_collector ($mc)

Static

Parameters

$mc

_on_prepare_new_query_builder ($qb)

Static

Parameters

$qb

_on_process_collector_result ($result)

Static

Parameters

$result

_on_process_query_result ($result)

Static

Parameters

$result

_on_updated ()

_on_updating ()

approve ()

can_do ($privilege, $user)

Parameters

$privilege

$user

can_user_do ($privilege, $user)

Parameters

$privilege

$user

connect ($signal, $callback, $user_data)

Parameters

$signal

$callback

$user_data

create ()

API for creating a new object

Returns

booleanIndicating success

create_attachment (string $name, string $title, string $mimetype)

API for creating an attachment for the object

Parameters

$name

stringMachine-readable name of the attachment

$title

stringHuman-readable title of the attachment

$mimetype

stringMIME-type of the attachment

Returns

booleanIndicating success

create_new_privilege_object (string $privilege, mixed $assignee, int $value, string $classname)

Create new privilege for the object.

Parameters

$privilege

stringPrivilege name

$assignee

mixedID or GUID of the assignee

$value

intPrivilege level

$classname

stringAn optional class name to which a SELF privilege gets restricted to. Only valid for SELF privileges.

Returns

booleanIndicating success

delete ()

Delete the current object

Returns

booleanIndicating success

delete_attachment (string $name)

Delete an attachment of the this object

Parameters

$name

stringName of the attachment

Returns

booleanIndicating success

delete_attachments ($constraints)

Parameters

$constraints

delete_parameter (string $domain, string $name)

Delete a parameter

Parameters

$domain

stringParameter domain

$name

stringParameter name

Returns

booleanIndicating success

delete_parameters ($constraints)

Parameters

$constraints

delete_tree ()

Delete the current object tree, starting from this object

Returns

booleanIndicating success

disable_rcs ()

emit ($signal)

Parameters

$signal

enable_rcs ()

find_attachments ($constraints)

Parameters

$constraints

find_parameters ($constraints)

Parameters

$constraints

get_attachment (string $name)

Get the requested attachment object

Parameters

$name

stringAttachment URL name

Returns

booleanIndicating success

get_attachment_qb ()

get_by_guid ($guid)

Parameters

$guid

get_by_id ($id)

Parameters

$id

get_by_path ($path)

Parameters

$path

get_cached (mixed $src)

Shortcut for accessing MidCOM object cache.
Static

Parameters

$src

mixedGUID of object (ids work but are discouraged)

Returns

mixedReference to the object or false

get_class_magic_default_privileges ()

get_parameter ($domain, $name)

Parameters

$domain

$name

get_parent ()

get_privilege ($privilege, $assignee, $classname)

Parameters

$privilege

$assignee

$classname

get_privileges ()

get_properties ()

get_rcs_message ()

has_attachments ()

has_dependents ()

has_parameters ()

is_approved ()

is_in_parent_tree ($root, $id)

Parameters

$root

$id

is_in_tree ($root, $id)

Parameters

$root

$id

is_locked ()

is_object_visible_onsite ()

list_attachments ()

list_children ($class_name)

Parameters

$class_name

list_parameters ($domain)

Parameters

$domain

lock ()

new_collector (string $domain, mixed $value)

Shortcut for accessing MidCOM Collector
Static
see \midcom_core_collector

Parameters

$domain

stringThe domain property of the collector instance

$value

mixedValue match for the collector instance

Returns

\midcom_core_collectorThe initialized instance of the collector.

new_query_builder ()

Shortcut for accessing MidCOM Query Builder
Static
see \midcom_core_querybuilder

Returns

\midcom_core_querybuilderThe initialized instance of the query builder.

new_reflection_property ()

Static

parameter ($domain, $name)

Parameters

$domain

$name

parent ()

purge ()

Purge the current object from database

Returns

booleanIndicating success

purge_attachments ($constraints)

Parameters

$constraints

purge_parameters ($constraints)

Parameters

$constraints

refresh ()

require_do ($privilege, $message)

Parameters

$privilege

$message

require_user_do ($privilege, $message)

Parameters

$privilege

$message

serve_attachment ($guid)

Static

Parameters

$guid

set_guid ($guid)

Parameters

$guid

set_parameter ($domain, $name, $value)

Parameters

$domain

$name

$value

set_privilege ($privilege, $assignee, $value, $classname)

Parameters

$privilege

$assignee

$value

$classname

set_rcs_message ($msg)

Parameters

$msg

unapprove ()

undelete ($guid)

Undelete object defined by a GUID
Static

Parameters

$guid

Returns

booleanIndicating success

unlock ()

unset_all_privileges ()

unset_privilege ($privilege, $assignee, $classname)

Parameters

$privilege

$assignee

$classname

update ()

_delete_dependents ()

 Properties

   

mixed $__object

MgdSchema object
 

string $_activitystream_verb

Verb to use for Activity Log.

Should be an URL conforming to activitystrea.ms specification. If left blank then this will come from the DBA action performed (update, create)

access private
 

string $_rcs_message

Change message used for RCS and the Activity Log summary
access private
 

boolean $_use_activitystream

Should the Activity Log be enabled for object actions
access private
 

boolean $_use_rcs

Should the revision control system be enabled for object updates
access private
 

boolean $allow_name_catenate

Should it be allowed to automatically generate unique name in case of clash
 

array $autodelete_dependents

May contain a list of dbaclass => field entries.

When deleting an object, these dependent objects are automatically deleted beforehand