source: sandbox/workflow/trunk/inc/local/functions/function.wf_create_object.php @ 3060

Revision 3060, 625 bytes checked in by viani, 14 years ago (diff)

Ticket #950 - Merged 2838:3056 /trunk/workflow em /sandbox/workflow/trunk

  • Property svn:executable set to *
Line 
1<?php
2/**
3 * Creates an instance from a class requested by user
4 * @param string $class_name Class' name to be instantiated
5 * @return mixed
6 * @license http://www.gnu.org/copyleft/gpl.html GPL
7 * @deprecated 2.2.00.000
8 * @package Workflow
9 * @subpackage local
10 * @access public
11 */
12function wf_create_object($class_name)
13{
14        wf_warn_deprecated_method('Factory', 'getInstance');
15        $obj = null;
16        $file_name = PHPGW_SERVER_ROOT.SEP.'workflow'.SEP.'inc'.SEP.'local'.SEP.'classes'.SEP.'class.'.$class_name.'.php';
17        if(@file_exists($file_name))
18        {
19                include_once($file_name);
20                $obj = new $class_name;         
21        }
22        return $obj;
23}
24?>
Note: See TracBrowser for help on using the repository browser.