Example #1
0
File: ESL.php Project: swk/bluebox
 function api($cmd, $arg = null)
 {
     switch (func_num_args()) {
         case 1:
             $r = ESLconnection_api($this->_cPtr, $cmd);
             break;
         default:
             $r = ESLconnection_api($this->_cPtr, $cmd, $arg);
     }
     return is_resource($r) ? new ESLevent($r) : $r;
 }
Example #2
0
 function api($cmd, $arg = null)
 {
     switch (func_num_args()) {
         case 1:
             $r = ESLconnection_api($this->_cPtr, $cmd);
             break;
         default:
             $r = ESLconnection_api($this->_cPtr, $cmd, $arg);
     }
     if (is_resource($r)) {
         $c = substr(get_resource_type($r), strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3);
         if (class_exists($c)) {
             return new $c($r);
         }
         return new ESLevent($r);
     }
     return $r;
 }