This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/export/classes/Model/Export.php
2013-10-10 13:56:13 +11:00

35 lines
791 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class supports OSB exporting.
*
* @package Export
* @category Model
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Export extends ORM_OSB {
// Relationships
protected $_has_many = array(
'export_module' => array('far_key'=>'id','xforeign_key'=>'x'),
);
protected $_form = array('id'=>'id','value'=>'name');
/**
* Return the object of the export plugin
*/
public function plugin(Model_Export_Module $emo,$type='') {
$c = Kohana::classname('Export_Plugin_'.$this->plugin);
if (! $this->plugin OR ! class_exists($c))
return NULL;
$o = new $c($emo);
return $type ? $o->$type : $o;
}
}
?>