CreateInstance: Bitrix method

      
<?php 
//  CreateInstance()
//  /dist/bitrix/modules/bizproc/classes/general/activity.php:1131

    
public static function CreateInstance($code$data)
    {
        if (
preg_match("#[^a-zA-Z0-9_]#"$code))
            throw new 
Exception("Activity '".$code."' is not valid");

        
$classname 'CBP'.$code;
        if (
class_exists($classname))
            return new 
$classname($data);
        else
            return 
null;
    }