Esempio n. 1
0
include_once 'interface.DatabaseAdapterInterface.php';      // odd name, pull it in immediately

function __autoload($class)
{
    require "class.$class.php";
}


// Explicitly set the environment (overrides URL-based environment naming).

Environment::SetEnvironment('setup');


// Start by creating the base mesh

MeshTools::CreateMesh('middle_earth');


// Now create the node types for this mesh

// Hobbits
$attributes = array(
    'first_name VARCHAR(20)',
    'last_name VARCHAR(20)',
    'age INT',
);

MeshTools::CommitNodeType('hobbits', $attributes);

// Locations
$attributes = array(