From f46a92b9e46dd3b349d902277117fc1eb1773713 Mon Sep 17 00:00:00 2001 From: jepso Date: Tue, 19 Jun 2007 19:20:33 +0000 Subject: [PATCH] - Few changes to documentation layout - Added Sensei_Exception --- .../order-by-clause.txt | 6 +- manual/new/docs/en/getting-started.txt | 7 +- manual/new/docs/en/native-sql.txt | 14 ++-- .../new/docs/en/object-relational-mapping.txt | 1 - manual/new/index.php | 2 +- manual/new/styles/basic.css | 46 +++++------- manual/new/styles/iefix.css | 4 + manual/new/styles/print.css | 73 ++++++++++++++++++- manual/new/template.php | 4 +- vendor/Sensei/Sensei/Exception.php | 35 +++++++++ vendor/Text/Wiki/Parse/Default/Code.php | 2 +- vendor/Text/Wiki/Render/Xhtml/Code.php | 2 +- 12 files changed, 149 insertions(+), 47 deletions(-) create mode 100644 vendor/Sensei/Sensei/Exception.php diff --git a/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt b/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt index 2af31f34d..063494640 100644 --- a/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt +++ b/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt @@ -29,7 +29,8 @@ FROM User u LEFT JOIN u.Email e +++ Sorting by an aggregate value -In the following example we fetch all users and sort those users by the number of phonenumbers they have. +In the following example we fetch all users and sort those users by the number of phonenumbers they have. + $q = new Doctrine_Query(); @@ -41,7 +42,8 @@ $users = $q->select('u.*, COUNT(p.id) count') +++ Using random order -In the following example we use random in the ORDER BY clause in order to fetch random post. +In the following example we use random in the ORDER BY clause in order to fetch random post. + $q = new Doctrine_Query(); diff --git a/manual/new/docs/en/getting-started.txt b/manual/new/docs/en/getting-started.txt index f7c687a7c..20fc381af 100644 --- a/manual/new/docs/en/getting-started.txt +++ b/manual/new/docs/en/getting-started.txt @@ -67,13 +67,16 @@ Doctrine::export('models'); This would execute the following queries on mysql. + CREATE TABLE user (id BIGINT AUTO_INCREMENT, name VARCHAR(20), PRIMARY KEY(id), INDEX(id)); CREATE TABLE phonenumber (id INT AUTO_INCREMENT, phonenumber VARCHAR(20), user_id BIGINT, PRIMARY KEY(id), INDEX(user_id)); ALTER TABLE phonenumber ADD CONSTRAINT FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE; + Pay attention to the following things: -1. The autoincrement primary key columns are auto-added since we didn't specify any primary key columns -2. Doctrine auto-adds indexes to the referenced relation columns (this is needed in mysql) + +# The autoincrement primary key columns are auto-added since we didn't specify any primary key columns +# Doctrine auto-adds indexes to the referenced relation columns (this is needed in mysql) +++ Getting export queries diff --git a/manual/new/docs/en/native-sql.txt b/manual/new/docs/en/native-sql.txt index f01b9ae10..75b05cad7 100644 --- a/manual/new/docs/en/native-sql.txt +++ b/manual/new/docs/en/native-sql.txt @@ -33,15 +33,18 @@ $users = $q->execute(); $user[0]; // User object -Pay attention to following things: -1. Fields must be in curly brackets -2. For every selected table there must be one addComponent call +Pay attention to following things: + +# Fields must be in curly brackets +# For every selected table there must be one addComponent call + ++ Fetching from multiple components When fetching from multiple components the addComponent calls become a bit more complicated as not only do we have to tell which tables are bound to which components, we also have to tell the parser which components belongs to which. -Consider the following model: +Consider the following model: + // file User.php class User extends Doctrine_Record @@ -73,7 +76,8 @@ class Phonenumber extends Doctrine_Record } -In the following example we fetch all users and their phonenumbers: +In the following example we fetch all users and their phonenumbers: + $q = new Doctrine_RawSql(); diff --git a/manual/new/docs/en/object-relational-mapping.txt b/manual/new/docs/en/object-relational-mapping.txt index 9b2adc165..b0c5ff050 100644 --- a/manual/new/docs/en/object-relational-mapping.txt +++ b/manual/new/docs/en/object-relational-mapping.txt @@ -5,5 +5,4 @@ ++ Constraints and validators ++ Record identifiers ++ Indexes -++ Relations ++ Hierarchical data diff --git a/manual/new/index.php b/manual/new/index.php index 39c93c1b7..bac1941d3 100644 --- a/manual/new/index.php +++ b/manual/new/index.php @@ -20,7 +20,7 @@ foreach ($supportedLangs as $language) { } $baseUrl = ''; -$title = 'Doctrine Documentation'; +$title = 'Doctrine Manual'; $section = null; if (isset($_GET['chapter'])) { diff --git a/manual/new/styles/basic.css b/manual/new/styles/basic.css index 5b1eed52f..46b6563fb 100644 --- a/manual/new/styles/basic.css +++ b/manual/new/styles/basic.css @@ -1,8 +1,8 @@ body, html { margin: 0; padding: 0; - font-family: "Arial", sans-serif; - font-size: 12pt; + font-family: "Trebuchet MS", sans-serif; + font-size: normal; background: white; color: black; } @@ -40,17 +40,14 @@ h4 { p, ul, ol, dl { line-height: 1.5em; - text-align: justify; + text-align: justify; + font-size: normal; } ul { list-style-type: square; } -ul ul, ol ol { - font-size: 100%; -} - dd { margin-bottom: 0.5em; } @@ -59,7 +56,6 @@ table { border: 1px solid #aaaaaa; border-collapse: collapse; margin: 0.5em 0; - font-size: 11pt; background-color: #f9f9f9; line-height: 1.5em; } @@ -73,33 +69,22 @@ th { background-color: #f2f2f2; } -blockquote { - background-image: url("../images/quotation-mark.png"); - background-position: top left; - background-repeat: no-repeat; - padding-left: 2.5em; - margin-left: 1em; -} - /*** Code blocks and highlighting**********************************************/ pre, tt { font-family: "Bitstream Vera Sans Mono", monospace; -} - -tt { - font-size: 11pt; + font-size: small; } pre { - font-size: 10pt; font-weight: bold; padding: 1em; - margin: 1em; + margin: 1em 0; line-height: 1.2em; background-color: #f6f6f6; border: 1px solid #cccccc; + overflow: auto; } pre .default { @@ -145,20 +130,27 @@ a:visited:active { } #wrap { - width: 100%; margin: 0; + padding: 0; } #sidebar { float: right; - width: 20em; + width: 25%; margin: 0; padding: 1em; } #content { - margin-right: 20em; + margin-right: 25%; padding: 1em; + padding-right: 2em; +} + +/** Tree specific styles ******************************************************/ + +ul.tree { + font-size: 0.9em; } ul.tree, ul.tree ul { @@ -168,9 +160,6 @@ ul.tree, ul.tree ul { margin-left: 0; } - -/** Tree specific styles ******************************************************/ - .tree a { text-decoration: none; margin: 0; @@ -181,7 +170,6 @@ ul.tree, ul.tree ul { color: black; display: block; float: left; - height: auto; margin: 0; margin-left: -1.25em; padding: 0; diff --git a/manual/new/styles/iefix.css b/manual/new/styles/iefix.css index 0e23c25c0..7a9049009 100644 --- a/manual/new/styles/iefix.css +++ b/manual/new/styles/iefix.css @@ -1,3 +1,7 @@ .tree .expander { margin-left: -0.60em; } + +pre { + word-wrap: break-word; +} \ No newline at end of file diff --git a/manual/new/styles/print.css b/manual/new/styles/print.css index 15edb9252..bed7a4e30 100644 --- a/manual/new/styles/print.css +++ b/manual/new/styles/print.css @@ -1,6 +1,55 @@ -body { +@page { + size: a4 portrait; + margin: 20mm; + padding: 5mm 0; + border-top: thin solid black; + border-bottom: thin solid black; + @top-left { + font-size: 10pt; + vertical-align: bottom; + margin: 2mm + } + @top-right { + font-size: 10pt; + vertical-align: bottom; + margin: 2mm + } + @bottom { + font-size: 10pt; + content: counter(page); + vertical-align: top; + text-align: outside; + margin: 2mm + } +} + +@page :left { + @top-left { + content: "Doctrine Manual"; + } + @top-right { + content: ""; + } +} + +@page :right { + @top-right { + content: "Doctrine Manual"; + } + @top-left { + content: ""; + } +} + +* { + text-decoration: none; +} + +html, body { font-family: "Arial", sans-serif; font-size: 11pt; + padding: 0; + margin: 0; } .chapter, #table-of-contents { @@ -9,18 +58,20 @@ body { h1, h2, h3, h4, h5, h6 { font-family: "Lucida Bright", serif; + page-break-after: avoid; } h1 { text-align: center; } -p, ul, ol { +p, ul, ol, dl { text-align: justify; line-height: 1.2em; + hyphens: auto; } -ol { +ul { list-style-type: square; } @@ -59,5 +110,21 @@ a { #table-of-contents ul { list-style-type: none; + font-weight: bold; +} + +#table-of-contents ul, #table-of-contents li { + margin-left: 0; +} + +#table-of-contents ul ul { + margin-left: 1em; + font-weight: normal; +} + +/* add page numbers to TOC */ + +#table-of-contents ul a::after { + content: leader('.') target-counter(attr(href), page); } diff --git a/manual/new/template.php b/manual/new/template.php index 7d295e494..ee02f91b9 100644 --- a/manual/new/template.php +++ b/manual/new/template.php @@ -36,9 +36,9 @@ try { } catch (Exception $e) { ?> -

Doctrine Documentation

+

Doctrine Manual

-

You can view this documentation as +

You can view this manual online as