]> jfr.im git - z_archive/KronOS.git/blob - kosapps/common.php
Added ability for apps to define javascript -- static method scripts -- not core...
[z_archive/KronOS.git] / kosapps / common.php
1 <?php
2
3 abstract class KOS_App {
4 function __construct($iid, $aid) {
5 $this->iid = $iid;
6 $this->aid = $aid;
7 }
8 public function iid() { return $this->iid; }
9 public function aid() { return $this->aid; }
10
11 abstract public function appName();
12 abstract public function windowTitle();
13 abstract public function windowContents();
14
15 public function opening() { return; } // default
16 public function closing() { return; } // default
17
18 public static function scripts($aid) { return 'wos.appscripts['.$aid.'] = {load: function(t){this.target = t}};'; } // default
19 public function act($action) { return $action; } // default, but will only work for static ("content") apps.
20 }
21
22 ?>