00001 <?php
00011 class Plugin_Base
00012 {
00013 var $web;
00014 var $depends;
00015
00019 function Plugin_Base()
00020 {
00021
00022
00023 $this->web =& Registry::get('pronto:web');
00024 $this->depends = new stdClass;
00025 }
00026
00035 function depend($plugin)
00036 {
00037 switch(substr(get_class($this), 0, 2)) {
00038 case 'tp': $type = 'template'; break;
00039 case 'pp': $type = 'page'; break;
00040 }
00041 foreach(func_get_args() as $arg) {
00042 $this->depends->$arg =& Factory::plugin($arg, $type);
00043 }
00044 }
00045 }
00046
00047 ?>