gyro/core/behaviour/base/actionbase.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Simple implementation of an action 00004 * 00005 * @ingroup Behaviour 00006 */ 00007 class ActionBase implements IAction { 00008 /** 00009 * Instance to work upon 00010 * 00011 * @var mixed 00012 */ 00013 protected $inst = null; 00014 /** 00015 * Title of this action 00016 * 00017 * @var string 00018 */ 00019 protected $title = ''; 00020 /** 00021 * Description for this action 00022 * 00023 * @var string 00024 */ 00025 protected $description = ''; 00026 00027 public function __construct($item, $title, $description = '') { 00028 $this->inst = $item; 00029 $this->title = $title; 00030 $this->description = $description; 00031 } 00032 00033 /** 00034 * Returns title of action. 00035 * 00036 * @return string 00037 */ 00038 public function get_name() { 00039 return $this->title; 00040 } 00041 00042 /** 00043 * Returns a description of this action 00044 * 00045 * @return string 00046 */ 00047 public function get_description() { 00048 return $this->description; 00049 } 00050 00051 /** 00052 * Returns the object this actionworks upon 00053 * 00054 * @return mixed 00055 */ 00056 public function get_instance() { 00057 return $this->inst; 00058 } 00059 }