- new OSInet/Class_Grapher directory - moved misc.php and other miscellaneous PHP files to misc/ - split the PSR0 autoloader from misc.php to psr0.php - moved BackgroundApplication to FSM directory - moved FSM samples and docs to FSM help directory - new "apps" directory for the demo source - new Class_Grapher demo app - moved the files of the FSM FTP demo app to "apps". Likely broken.
29 lines
752 B
PHP
29 lines
752 B
PHP
<?php
|
|
error_reporting(-1);
|
|
|
|
require 'misc.php';
|
|
|
|
spl_autoload_register('psr0_autoload', TRUE);
|
|
|
|
use \OSInet\Finite_State_Machine\FtpClient;
|
|
use \OSInet\Finite_State_Machine\Grapher;
|
|
|
|
$ftp = new FtpClient(array(
|
|
'source' => 'ftp.xml',
|
|
)) or die('Could not load the FtpClient class.');
|
|
// echo "FSM loaded, ". count($ftp->fTransitions) ." transitions. State: {$ftp->getState()}\n";
|
|
|
|
FALSE && $ftp->setParameters(array(
|
|
'RemoteHost' => 'ftp.example.com',
|
|
'RemoteUser' => 'anonymous',
|
|
'RemotePass' => 'anonymous',
|
|
'RemoteWd' => '/dev',
|
|
'RemoteFile' => 'null',
|
|
'LocalWd' => '/dev',
|
|
'LocalFile' => 'null',
|
|
'FtpCallback' => '',
|
|
));
|
|
|
|
// print_r($ftp->fTransitions);
|
|
$grapher = new Grapher($ftp, array('debug' => 1));
|
|
echo $grapher->render();
|