class CDS_cmd_cls {
var $name;
var $tout;
-
+
function CDS_cmd_cls($name, $tout)
{
$this->name = $name;
function cmd_register($cmd_cls)
{
- if (get_class($cmd_cls) != 'CDS_cmd_cls' || is_subclass_of($cmd_cls, 'CDS_cmd_cls') == FALSE)
+ if (get_class($cmd_cls) != 'CDS_cmd_cls' && is_subclass_of($cmd_cls, 'CDS_cmd_cls') == FALSE)
return FALSE;
if (isset($this->cmd_cls[$cmd_cls->name]))
return FALSE;
- $this->cmd[$cmd_cls->name] = $cmd_cls;
+ $this->cmd_cls[$cmd_cls->name] = $cmd_cls;
return TRUE;
}
+#!/usr/bin/php
+<?php
require_once('Obj/curl-de-sac.phh');
class short_cmd_cls extends CDS_cmd_cls {
- function short_cmd_cls()
+ function short_cmd_cls()
{
parent::__construct("short", 10);
}
}
class long_cmd_cls extends CDS_cmd_cls {
- function long_cmd_cls()
+ function long_cmd_cls()
{
parent::__construct("long", 15);
}
exit(3);
}
+ print_r($cds);
+ printf("SUCCESS\n");
+
// start loop
// print status
// if input data execute some command