ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjectPlugin.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Object/classes/class.ilObject2.php");
5
6/*
7* Object class for plugins. This one wraps around ilObject
8*
9* @author Alex Killing <alex.killing@gmx.de>
10* @version $Id$
11* @ingroup ServicesRepository
12*/
13abstract class ilObjectPlugin extends ilObject2
14{
15 private $object;
16
20 function __construct($a_ref_id = 0)
21 {
22 $this->initType();
23 parent::__construct($a_ref_id, true);
24 $this->plugin =
25 ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj",
26 ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
27 if (!is_object($this->plugin))
28 {
29 die("ilObjectPluginGUI: Could not instantiate plugin object for type ".$this->getType().".");
30 }
31 }
32
38 final private function getPlugin()
39 {
40 return $this->plugin;
41 }
42
46 final protected function txt($a_var)
47 {
48 return $this->getPlugin()->txt($a_var);
49 }
50}
const IL_COMP_SERVICE
Class ilObject2 This is an intermediate progress of ilObject class.
getType()
get object type @access public
__construct($a_ref_id=0)
Constructor.
txt($a_var)
Wrapper for txt function.
getPlugin()
Get plugin object.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.