1
0
mirror of synced 2024-12-14 07:06:04 +03:00
This commit is contained in:
zYne 2006-12-14 21:03:58 +00:00
parent 1d1f0556b2
commit db60ec5568
4 changed files with 170 additions and 3 deletions

View File

@ -106,7 +106,6 @@ $menu = array("Getting started" =>
"Constraints and validators",
"Default values",
"Enum emulation",
),
"Record identifiers" => array(
@ -116,7 +115,13 @@ $menu = array("Getting started" =>
"Composite",
"Sequential")
),
"Connection management" =>
array(
"Opening a new connection",
"Lazy-connecting to database",
"Managing connections",
"Connection-component binding"
),
"Schema reference" =>
array(
"Data types" => array(
@ -136,6 +141,36 @@ $menu = array("Getting started" =>
"Enum",
"Gzip",
),
"Column attributes" => array(
"Introduction",
"Primary",
"Autoincrement",
"Default",
"Zerofill",
"Collation",
"Charset",
"Unsigned",
"Fixed",
"Enum",
"Unique",
"Nospace",
"Notblank",
"Notnull",
"Email",
"Date",
"Range",
"Numeric",
"Regexp",
"Ip",
"Usstate",
),
"Identifiers" => array(
"Introduction",
"Autoincremented",
"Natural",
"Composite",
"Sequential")
),
"Basic Components" =>
@ -440,6 +475,21 @@ $menu = array("Getting started" =>
),
*/
"Connection modules" => array(
"Export" => array("Introduction",
"Creating new table",
"Altering table"
),
"Import" => array("Introduction",
"Getting table info",
"Getting foreign key info",
"Getting view info",
),
"Util" => array("Using explain"),
"DataDict" => array("Getting portable type",
"Getting database declaration",
"Reserved keywords"),
),
"Technology" => array(
"Architecture",
"Design patterns used",

105
manual/export.php Normal file
View File

@ -0,0 +1,105 @@
<?php
class Request {
private $data = array();
public function __construct() {
$this->data['files'] = isset($_GET['files']) ? $_GET['files'] : null;
$this->data['path'] = isset($_GET['path']) ? $_GET['path'] : null;
foreach($this->data as $k => $v) {
$this->data[$k] = stripslashes($v);
}
}
public function __get($name) {
if(isset($this->data[$name]))
return $this->data[$name];
return null;
}
}
function renderError($string) {
print "<table width=500 border=1 class='error' cellpadding=0 cellspacing=0><tr><td>" . $string . "</td></tr></table>";
}
$request = new Request();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Doctrine ORM Framework</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="styles/basic.css">
</HEAD>
<table width="100%" cellspacing=0 cellpadding=0>
<tr>
<td width=50>
<td>
<td>
<img src="images/logotext.jpg">
</td>
</tr>
</table>
<table width="100%" cellspacing=0 cellpadding=0>
<tr>
<td width=50>
<td>
<td align="left" valign="top">
<table width="100%" cellspacing=1 cellpadding=1>
<tr>
<td colspan=2 bgcolor="white">
<b class="title">Doctrine Export</b>
<hr>
<table width="700">
<tr>
<td>
This script is used for exporting existing Doctrine record classes to database schema. Doctrine tries to create database tables
according to definitions given in the records.
<table>
<form action="<?php print $_SERVER['PHP_SELF']; ?>" method='GET'>
<tr>
<td>Path : </td><td><input class='big' type='text' name='path' value="<?php print $request->path; ?>"></td>
</tr>
<tr>
<td>Files : </td><td><textarea name='files' cols=47 rows=10><?php print $request->files; ?></textarea></td>
</tr>
<tr>
<td></td><td><input type='submit' value='export'></td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td>
<?php
if(isset($_GET['files'])) {
$files = explode("\n", $_GET['files']);
if( ! is_dir($request->path))
renderError('Directory \'' . $request->path . '\' does not exist');
foreach($files as $k => $file) {
$file = $request->path . $file;
if( ! file_exists($file)) {
renderError('File \'' . $file . '\' does not exist');
break;
}
$files[$k] = $file;
}
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@ -3,7 +3,9 @@ margin:10px auto 0px auto;
font-family: Verdana, Arial, Helvetica;
text-decoration: none;
}
input.big {
width: 400;
}
hr {
color: A50A3D;
}
@ -38,6 +40,15 @@ border-color: 116699;
border-shadow: none;
border-width: 1 px;
}
table.error {
border-style: dashed;
border-color: red;
border-shadow: none;
border-width: 1 px;
cellpadding: 0;
cellspacing: 0;
border-height: 1 px;
}
b.title {
color: #A50A3D;
}

View File

@ -5,6 +5,7 @@ text-decoration: none;
background: #393939;
color: #dfdfdf;
}
hr {
color: a3cb14;
}