File dsl/context/BaseScriptableObject.class.php

Last commit: Tue Jul 19 00:10:39 2022 +0200	Jan Dankert	Fetched from upstream.
1 <?php 2 3 4 namespace dsl\context; 5 6 use dsl\standard\Helper; 7 8 class BaseScriptableObject implements Scriptable 9 { 10 /** 11 * Standard String representation of a Scriptable Object. 12 * This object becomes "Stringable". 13 * This string may be used in userscripts, if the object is used as a string, maybe by mistake. 14 * 15 * This method may be overwritten by subclasses. 16 * 17 * @return string 18 */ 19 public function __toString() 20 { 21 return "Script object"; 22 } 23 24 25 /** 26 * a useful help function which outputs all properties and methods of this objects. 27 * 28 * @return string a short info about this object 29 */ 30 public function help() 31 { 32 return Helper::getHelp($this); 33 } 34 35 36 public function getClass() { 37 return get_class($this); 38 } 39 40 public function values() { 41 return array_values(get_object_vars($this)); 42 } 43 public function keys() { 44 return array_keys(get_object_vars($this)); 45 } 46 }
Download dsl/context/BaseScriptableObject.class.php
History Tue, 19 Jul 2022 00:10:39 +0200 Jan Dankert Fetched from upstream. Mon, 27 Jun 2022 00:41:50 +0200 Jan Dankert Fetched from upstream.