]> jfr.im git - z_archive/KronOS.git/blame - kosapps/common.php
Added ability for apps to define javascript -- static method scripts -- not core...
[z_archive/KronOS.git] / kosapps / common.php
CommitLineData
3cf8917d
JR
1<?php
2
3abstract class KOS_App {
906f0f92 4 function __construct($iid, $aid) {
536db703 5 $this->iid = $iid;
906f0f92 6 $this->aid = $aid;
536db703 7 }
906f0f92
JR
8 public function iid() { return $this->iid; }
9 public function aid() { return $this->aid; }
536db703 10
3cf8917d
JR
11 abstract public function appName();
12 abstract public function windowTitle();
13 abstract public function windowContents();
14
906f0f92
JR
15 public function opening() { return; } // default
16 public function closing() { return; } // default
3cf8917d 17
906f0f92
JR
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.
3cf8917d
JR
20}
21
22?>