Location: PHPKode > scripts > PHP CRUD > PhpCrud/PhpCrud/foo.php
<?php

/** ClassIO
 *
 * Randall Nagy
 * com.soft9000.ClassGenerator Version 2.0
 */

/** <p>This file WILL SOON BE ;) generated by <a href='http:#sourceforge.net/p/classio/'>ClassIO</a>.
 * Feel free to visit <a href='http:#soft9000.com'>Nagy's Web Site</a> for more information.</p>
 *
 * <p>This class was initially created using:</p>
 * <p>java -jar ClassGenerator.jar testing booya Name Email</p>
 */
class booya {

    var $Name = "nagy";
    var $Email = "hide@address.com";

    function createFrom_REQUEST() {
        $this->Name = trim($_REQUEST['Name']);
        $this->Email = trim($_REQUEST['Email']);
    }

    function toArray() {
        $result = array();
        $result[0] = $this->Name;
        $result[1] = $this->Email;
        return $result;
    }

    function fromArray($array) {
        $this->Name = $array[0];
        $this->Email = $array[1];
        return true;
    }

}

class booyaFrom_REQUEST extends booya {

    function __construct() {
        $this->createFrom_REQUEST();
    }

}

include_once 'IndexedArray.php';

class booyaFile {

    var $control;
    var $info;
    var $filetest = 'default.data';

    function __construct() {
        $this->control = new IndexedArray();
        $this->info = new IndexedDataInfo();
        $this->info->data_min = 8024;
    }

    function create($data) {
        $string = $this->control->arrayToString($data);
        $logical = $this->control->append($this->info, $string);
        return $logical;
    }

    function read($logical) {
        $string = $this->control->read($this->info, $logical);
        return $this->control->stringToArray($string);
    }

    function update($logical, $data) {
        $string = $this->control->arrayToString($data);
        $logical = $this->control->update($this->info, $logical, $string);
        return $logical;
    }

    function delete($logical) {
        return $this->control->delete($this->info, $logical);
    }

}

?>
Return current item: PHP CRUD