".$t."

\n"; $c = ""; if(file_exists("docs/$e.php")) { rename("docs/$e.php","docs/$title - $t.php"); } if(file_exists("docs/$t.php")) { rename("docs/$t.php","docs/$title - $t.php"); } if(file_exists("docs/$title - $t.php")) { $c = file_get_contents("docs/$title - $t.php"); if(substr($c,0,5) == "
"; } $c = ""; if(file_exists("codes/$e.php")) { rename("codes/$e.php","codes/$title - $t.php"); } if(file_exists("codes/$t.php")) { rename("codes/$t.php","codes/$title - $t.php"); } if(file_exists("codes/$title - $t.php")) { print ""; print ""; print "
"; $c = file_get_contents("codes/$title - $t.php"); $c = trim($c); $h->loadString($c); print $h->toHtml(); print "
"; } print "
"; } function render_block($name) { $h = new PHP_Highlight; if(file_exists("docs/$name.php")) { $c = file_get_contents("docs/$name.php"); if(substr($c,0,5) == "
"; } } if(file_exists("codes/$name.php")) { $c = file_get_contents("codes/$name.php"); $c = trim($c); if( ! empty($c)) { $h->loadString($c); print ""; print ""; print "
"; print $h->toHtml(); print "
"; } } } function array2path($array, $path = '') { $arrayValues = array(); $index = 1; foreach ($array as $k => $value) { $p = ($path !== '')?$path.".".$index:$index; if (is_scalar($value) || is_resource($value)) { $arrayValues[$p] = $value; } elseif (is_array($value)) { $arrayValues[$p] = $k; $arrayValues = $arrayValues + array2path($value, $p); } $index++; } return $arrayValues; } $menu = array("Getting started" => array( "Requirements", "Installation", "Compiling", "Starting new project", "Setting table definition" => array( "Introduction", "Data types and lengths", "Constraints and validators", "Enum emulation" ), "Record identifiers" => array( "Introduction", "Autoincremented", "Natural", "Composite", "Sequential") ), "Basic Components" => array( "Manager" => array("Introduction", "Opening a new session", "Managing sessions"), "Record" => array("Introduction", "Creating new records", "Retrieving existing records", "Accessing properties", "Updating records", "Deleting records", "Getting record state", "Getting object copy", "Serializing", "Callbacks"), "Session" => array("Introduction", "Availible drivers", "Getting a table object", "Flushing the session", "Querying the database", "Getting session state"), "Collection" => array("Introduction", "Accessing elements", "Adding new elements", "Getting collection count", "Saving the collection", "Deleting collection", //"Fetching strategies", "Loading related records", "Collection expanding", ), "Table" => array("Introduction", "Getting table information", "Finder methods", "Custom table classes", "Custom finders", "Getting relation objects"), "Query" => array("Introduction", "FROM - selecting tables", "LIMIT and OFFSET - limiting the query results", "WHERE - setting query conditions", "ORDER BY - sorting query results", //"Fetching strategies", //"Lazy property fetching", "Method overloading", "Relation operators", "Bound parameters", "Aggregate functions", "DQL - SQL conversion"), "RawSql" => array( "Introduction", "Using SQL", "Adding components", "Method overloading"), /** "Statement - UNDER CONSTRUCTION" => array("Introduction", "Setting parameters", "Getting parameters", "Getting row count", "Executing the statement"), */ "Exceptions" => array( "Overview", "List of exceptions" ) ), "Mapping object relations" => array( "Introduction", "Composites and aggregates", "Relation aliases", "Foreign key associations" => array( "One-to-One", "One-to-Many, Many-to-One", "Tree structure"), "Join table associations" => array( "One-to-One", "One-to-Many, Many-to-One", "Many-to-Many", "Self-referencing"), "Dealing with relations" => array( "Creating related records", "Retrieving related records", "Updating related records", "Deleting related records", "Working with associations"), "Inheritance" => array("One table many classes", "One table one class", "Column aggregation" ), ), "Configuration" => array( "Introduction", "Levels of configuration", "Setting attributes" => array( "Table creation", "Fetching strategy", "Batch size", "Session lockmode", "Event listener", "Validation", "Offset collection limit" ) ), "Advanced components" => array( "Eventlisteners" => array( "Introduction", "Creating new listener", "List of events", "Listening events", "Chaining", ), "Validators" => array( "Intruduction", "Validating transactions", "Analyzing the ErrorStack", "List of predefined validators" ), "View" => array( "Intoduction", "Managing views", "Using views" ), /** "Hook" => array( "Introduction", "Parameter hooking", "Paging", "Setting conditions", "Sorting" ), */ "Cache" => array( "Introduction", "Query cache"), "Locking Manager" => array( "Introduction", "Examples", "Planned", "Technical Details", "Maintainer"), /** "Debugger" => array( "Introduction", "Debugging actions"), "Library" => array( "Introduction", "Using library functions"), "Iterator" => array( "Introduction", "BatchIterator", "ExpandableIterator", "OffsetIterator") */ ), "Transactions" => array( "Introduction", "Unit of work", "Locking strategies" => array("Pessimistic locking", "Optimistic locking"), "Nesting" ), /** "Developer components" => array( "DataDict" => array( "Introduction", "Usage" ), "IndexGenerator" => array( "Introduction", "Usage"), "Relation" => array( "Introduction", "Types of relations", ), "Null" => array( "Introduction", "Extremely fast null value checking" ), "Access" => array( "Introduction", "Usage" ), "Configurable" => array( "Introduction", "Usage" ), ), */ "Technology" => array( "Architecture", "Design patterns used", "Speed", "Internal optimizations" => array("DELETE", "INSERT", "UPDATE"), ), "Real world examples" => array("User management system","Forum application","Album lister") ); ?>
Doctrine - PHP Data Persistence and ORM Tool
$titles) { print $i.". ".$title."
\n"; $i2 = 1; foreach($titles as $k => $t) { $e = "$i.".$i2.""; if(is_array($t)) { print "
".$e." ".$k."
\n"; $i3 = 1; foreach($t as $k2 => $v2) { $str = ""; if( ! file_exists("docs/$title - $k - $v2.php")) { $missing[0]++; $str .= " [ doc ] "; //touch("docs/$title - $k - $v2.php"); } if( ! file_exists("codes/$title - $k - $v2.php")) { $missing[1]++; $str .= " [ code ] "; //touch("codes/$title - $k - $v2.php"); } $e = implode(".",array($i,$i2,$i3)); print "
".$e." ".$v2."$str
\n"; $i3++; } } else { $str = ""; if( ! file_exists("docs/$title - $t.php")) { $missing[0]++; $str .= " [ doc ] "; //touch("docs/$title - $t.php"); } if( ! file_exists("codes/$title - $t.php")) { $missing[1]++; $str .= " [ code ] "; //touch("codes/$title - $t.php"); } print "
".$e." ".$t."$str
\n"; } $i2++; } $i++; } } else { $i = 1; $ex = explode(".",$_REQUEST["index"]); $paths = array2path($menu); if( ! isset($paths[$ex[0]])) exit; $break = false; $tmp = $paths; foreach($tmp as $path => $title) { $e = explode(".", $path); if(count($e) > 2) { unset($tmp[$path]); } } $prev = 1; foreach($tmp as $path => $title) { if($break) break; if($path == $_REQUEST["index"]) { $break = true; } else { $prev = $path; } } $index = $_REQUEST['index']; print ""; print ""; print ""; print ""; print ""; print ""; print "
".$paths[$ex[0]]."
PrevNext
 
"; $tmp = $ex; if(count($tmp) > 2) { //array_pop($tmp); } foreach($tmp as $k => $v) { $numbers[] = $v; $curr = implode(".",$numbers); $stack[] = $paths[$curr]; } if(isset($ex[1])) { $name = implode(" - ", $stack); print "".$paths[$curr]."
"; $n = $numbers; $o = $paths[$n[0]]; $s = implode(".", array($n[0], $n[1])); $o2 = $paths[$s]; $value = $menu[$o]; if( ! is_array($value)) exit; if(in_array($o2, $value)) { render_block($name); } else { $value = $menu[$o][$o2]; if(is_array($value)) { foreach($value as $k => $title) { print "
".$title."
"; $s = $name." - ".$title; render_block($s); } } } } else { //if( ! isset($menu[$ex[0]])) // exit; $tmp = $paths[$ex[0]]; $i = 1; foreach($menu[$tmp] as $title => $value) { $n = $ex[0].".".$i; if(is_scalar($value)) { print "
".$n.". ".$value."
\n"; } else { print "
".$n.". ".$title."
\n"; } $i++; } } } ?>
-- index
\n"; foreach($menu as $title => $titles) { print "
".$i.". ".$title."
\n"; $i++; } ?>
$titles) { if($i == $ex[0]) { print $i.". ".$title."

\n"; $i2 = 1; foreach($titles as $k => $t) { $e = "$i.".$i2; if(is_array($t)) { $tmp = "$title - $k"; if( ! isset($ex[1]) || $i2 != $ex[1]) { $i2++; continue; } print $e." ".$k."


\n"; foreach($t as $k2 => $t2) { if( ! isset($ex[1]) || $i2 != $ex[1]) break; $e = "$i.".$i2.".".($k2+1); render($tmp,$t2,$e); } } else { if( ! isset($ex[1])) { render($title,$t,$e); } } $i2++; } } $i++; } */ ?>