[ruby-it] Help conversione PHP to Ruby
Alessandro Mazzone
mlafronte5 a hotmail.com
Ven 26 Dic 2008 22:59:54 CET
Inizio codice:
<?php
/**
* Progetto: ProjectTreeInterface<br>
* File: webui_project_tree.class.php<br>
*
* Descrizione:
* Gestione dell'interfaccia web per la gestione dell'albero di
progetto
*
* Versione PHP 5.1
*
* @category SCOWizard
* @package ProjectTreeInterface
* @author Diego Brondo ~@:-] <jbrond a linuxmail.org>
* @copyright 2007
* @license http://www.php.net/license/3_01.txt PHP License v3.01
* @version 0.0.1
*/
if (!defined('__INCLUDE_PATH__'))
define('__INCLUDE_PATH__', './');
require_once(__INCLUDE_PATH__.'webui.class.php');
class webui_project_tree extends webui {
function __construct() {
parent::__construct();
}
function __destruct() {
parent::__destruct();
}
private function _generate_project_tree() {
$node_list = array();
if (isset($this->_project))
if (is_array($this->_project))
for ($i=0,$tot=count($this->_project); $i<$tot; $i++)
$this->_project[$i]->get_info($node_list);
// echo '<pre>'; print_r($node_list); echo '</pre>';
return $node_list;
}
function webui_project_tree_str() {
if
(!$this->is_cached('interface'.DIRECTORY_SEPARATOR.'webui_project_tree.tpl',
$status)) {
$this->assign('project_tree', $this->_generate_project_tree());
}
// return
$this->fetch_template('interface'.DIRECTORY_SEPARATOR.'webui_project_tree.tpl',
$status, TFALSE, TRUE, -1);
return
$this->fetch_template('interface'.DIRECTORY_SEPARATOR.'webui_project_tree.tpl',
$status, TRUE, FALSE, 0);
}
}
// ~@:-]
?>
Fine codice
Questa ne è un'altra,ce n'è una lunghissima che non posto se no si
appesantisce troppo il forum,se vi dico solo il commento iniziale:
/**
* Progetto: Session: gestione delle sessioni in PHP<br>
* File: session.class.php<br>
*
* Descrizione:
* Gestione <em>sontuosa</em> delle sessioni in PHP.
*
* Versione PHP 5.1
*
* @category Session
* @package Session
* @author Diego Brondo ~@:-] <jbrond a linuxmail.org>
* @copyright 2006
* @license http://www.php.net/license/3_01.txt PHP License v3.01
* @version 3.0.1
*
* @example session.example.php
*/
Riuscite a capire se ce n'è una corrispondente in ruby??
Grazie
--
Posted via http://www.ruby-forum.com/.
More information about the Ml
mailing list