From 53eabd3d79940336148f24e6d48b77492e0c40f6 Mon Sep 17 00:00:00 2001 From: meus Date: Thu, 12 Apr 2007 21:20:12 +0000 Subject: [PATCH] Fixed windows newlines ^M and removed
tags. They should not be used in the docs. --- manual/docs/Getting started - Compiling.php | 21 ++++---------- ... - Installation - Include and autoload.php | 6 ++-- ...Getting started - Starting new project.php | 10 +++---- ... mapping - Columns - Data types - Blob.php | 20 ++++++------- ... mapping - Columns - Data types - Clob.php | 25 +++++++++-------- ...pping - Columns - Data types - Integer.php | 26 ++++++++--------- ...apping - Columns - Data types - String.php | 28 +++++++++---------- ... mapping - Columns - Data types - Time.php | 26 ++++++++--------- 8 files changed, 77 insertions(+), 85 deletions(-) diff --git a/manual/docs/Getting started - Compiling.php b/manual/docs/Getting started - Compiling.php index 96e5d7519..185d506af 100644 --- a/manual/docs/Getting started - Compiling.php +++ b/manual/docs/Getting started - Compiling.php @@ -1,16 +1,7 @@ -

- Compiling is a method for making a single file of most used doctrine runtime components - including the compiled file instead of multiple files (in worst cases dozens of files) - can improve performance by an order of magnitude. -

-

- In cases where this might fail, a Doctrine_Exception is throw detailing the error. -

+Compiling is a method for making a single file of most used doctrine runtime components including the compiled file instead of multiple files (in worst cases dozens of files) can improve performance by an order of magnitude. In cases where this might fail, a Doctrine_Exception is throw detailing the error. - -Doctrine::compile(); - -// on some other script: - -require_once("path_to_doctrine/Doctrine.compiled.php"); - + +Doctrine::compile(); +// on some other script: +require_once('path_to_doctrine/Doctrine.compiled.php'); + diff --git a/manual/docs/Getting started - Installation - Include and autoload.php b/manual/docs/Getting started - Installation - Include and autoload.php index 7950f2c1b..7be719150 100644 --- a/manual/docs/Getting started - Installation - Include and autoload.php +++ b/manual/docs/Getting started - Installation - Include and autoload.php @@ -1,14 +1,14 @@ In order to use Doctrine in your project it must first be included. - -require_once("path-to-doctrine/lib/Doctrine.php"); + +require_once('path-to-doctrine/lib/Doctrine.php'); Doctrine support [http://www.php.net/autoload Autoloading] for including files so that you do not have to include anything more then the base file. There are two different strategies that can be used to do this: If you do use the **__autoload** function for your own logic you can use it. - + function __autoload($class) { Doctrine::autoload($class); } diff --git a/manual/docs/Getting started - Starting new project.php b/manual/docs/Getting started - Starting new project.php index 4a79bb105..3a40b264c 100644 --- a/manual/docs/Getting started - Starting new project.php +++ b/manual/docs/Getting started - Starting new project.php @@ -8,7 +8,7 @@ An short example: We want to create a database table called 'user' with columns id(primary key), name, username, password and created. Provided that you have already installed Doctrine these few lines of code are all you need: - + require_once('lib/Doctrine.php'); spl_autoload_register(array('Doctrine', 'autoload')); @@ -18,10 +18,10 @@ class User extends Doctrine_Record { // set 'user' table columns, note that // id column is always auto-created - $this->hasColumn("name","string",30); - $this->hasColumn("username","string",20); - $this->hasColumn("password","string",16); - $this->hasColumn("created","integer",11); + $this->hasColumn('name','string',30); + $this->hasColumn('username','string',20); + $this->hasColumn('password','string',16); + $this->hasColumn('created','integer',11); } } diff --git a/manual/docs/Object relational mapping - Columns - Data types - Blob.php b/manual/docs/Object relational mapping - Columns - Data types - Blob.php index 8d4ea45f8..62e4788c3 100644 --- a/manual/docs/Object relational mapping - Columns - Data types - Blob.php +++ b/manual/docs/Object relational mapping - Columns - Data types - Blob.php @@ -1,11 +1,11 @@ -Blob (Binary Large OBject) data type is meant to store data of undefined length that may be too large to store in text fields, like data that is usually stored in files. -

-Blob fields are usually not meant to be used as parameters of query search clause (WHERE) unless the underlying DBMS supports a feature usually known as "full text search" +Blob (Binary Large OBject) data type is meant to store data of undefined length that may be too large to store in text fields, like data that is usually stored in files. - -class Test extends Doctrine_Record { - public function setTableDefinition() { - $this->hasColumn('blobtest', 'blob'); - } -} - +Blob fields are usually not meant to be used as parameters of query search clause (WHERE) unless the underlying DBMS supports a feature usually known as "full text search" + + +class Test extends Doctrine_Record { + public function setTableDefinition() { + $this->hasColumn('blobtest', 'blob'); + } +} + diff --git a/manual/docs/Object relational mapping - Columns - Data types - Clob.php b/manual/docs/Object relational mapping - Columns - Data types - Clob.php index 67fc62735..5ec5bd7ba 100644 --- a/manual/docs/Object relational mapping - Columns - Data types - Clob.php +++ b/manual/docs/Object relational mapping - Columns - Data types - Clob.php @@ -1,13 +1,14 @@ -Clob (Character Large OBject) data type is meant to store data of undefined length that may be too large to store in text fields, like data that is usually stored in files. -

-Clob fields are meant to store only data made of printable ASCII characters whereas blob fields are meant to store all types of data. -

-Clob fields are usually not meant to be used as parameters of query search clause (WHERE) unless the underlying DBMS supports a feature usually known as "full text search" +Clob (Character Large OBject) data type is meant to store data of undefined length that may be too large to store in text fields, like data that is usually stored in files. + +Clob fields are meant to store only data made of printable ASCII characters whereas blob fields are meant to store all types of data. + +Clob fields are usually not meant to be used as parameters of query search clause (WHERE) unless the underlying DBMS supports a feature usually known as "full text search" + + +class Test extends Doctrine_Record { + public function setTableDefinition() { + $this->hasColumn('clobtest', 'clob'); + } +} + - -class Test extends Doctrine_Record { - public function setTableDefinition() { - $this->hasColumn('clobtest', 'clob'); - } -} - diff --git a/manual/docs/Object relational mapping - Columns - Data types - Integer.php b/manual/docs/Object relational mapping - Columns - Data types - Integer.php index 1077b3811..b120a9337 100644 --- a/manual/docs/Object relational mapping - Columns - Data types - Integer.php +++ b/manual/docs/Object relational mapping - Columns - Data types - Integer.php @@ -1,14 +1,14 @@ -The integer type is the same as integer type in PHP. It may store integer values as large as each DBMS may handle. -

-Fields of this type may be created optionally as unsigned integers but not all DBMS support it. -Therefore, such option may be ignored. Truly portable applications should not rely on the availability of this option. -

-The integer type maps to different database type depending on the column length. +The integer type is the same as integer type in PHP. It may store integer values as large as each DBMS may handle. - -class Test extends Doctrine_Record { - public function setTableDefinition() { - $this->hasColumn('integertest', 'integer', 4, array('unsigned' => true)); - } -} - +Fields of this type may be created optionally as unsigned integers but not all DBMS support it. +Therefore, such option may be ignored. Truly portable applications should not rely on the availability of this option. + +The integer type maps to different database type depending on the column length. + + +class Test extends Doctrine_Record { + public function setTableDefinition() { + $this->hasColumn('integertest', 'integer', 4, array('unsigned' => true)); + } +} + diff --git a/manual/docs/Object relational mapping - Columns - Data types - String.php b/manual/docs/Object relational mapping - Columns - Data types - String.php index da6179f8a..a1ab08fdb 100644 --- a/manual/docs/Object relational mapping - Columns - Data types - String.php +++ b/manual/docs/Object relational mapping - Columns - Data types - String.php @@ -1,15 +1,15 @@ -The text data type is available with two options for the length: one that is explicitly length limited and another of undefined length that should be as large as the database allows. -

-The length limited option is the most recommended for efficiency reasons. The undefined length option allows very large fields but may prevent the use of indexes, nullability and may not allow sorting on fields of its type. -

-The fields of this type should be able to handle 8 bit characters. Drivers take care of DBMS specific escaping of characters of special meaning with the values of the strings to be converted to this type. -

-By default Doctrine will use variable length character types. If fixed length types should be used can be controlled via the fixed modifier. +The text data type is available with two options for the length: one that is explicitly length limited and another of undefined length that should be as large as the database allows. - -class Test extends Doctrine_Record { - public function setTableDefinition() { - $this->hasColumn('stringtest', 'string', 200, array('fixed' => true)); - } -} - +The length limited option is the most recommended for efficiency reasons. The undefined length option allows very large fields but may prevent the use of indexes, nullability and may not allow sorting on fields of its type. + +The fields of this type should be able to handle 8 bit characters. Drivers take care of DBMS specific escaping of characters of special meaning with the values of the strings to be converted to this type. + +By default Doctrine will use variable length character types. If fixed length types should be used can be controlled via the fixed modifier. + + +class Test extends Doctrine_Record { + public function setTableDefinition() { + $this->hasColumn('stringtest', 'string', 200, array('fixed' => true)); + } +} + diff --git a/manual/docs/Object relational mapping - Columns - Data types - Time.php b/manual/docs/Object relational mapping - Columns - Data types - Time.php index 2a50227c4..3b9b639f2 100644 --- a/manual/docs/Object relational mapping - Columns - Data types - Time.php +++ b/manual/docs/Object relational mapping - Columns - Data types - Time.php @@ -1,14 +1,14 @@ -The time data type may represent the time of a given moment of the day. DBMS independent representation of the time of the day is also accomplished by using text strings formatted according to the ISO-8601 standard. -

-The format defined by the ISO-8601 standard for the time of the day is HH:MI:SS where HH is the number of hour the day from 00 to 23 and MI and SS are respectively the number of the minute and of the second from 00 to 59. Hours, minutes and seconds numbered below 10 should be padded on the left with 0. -

-Some DBMS have native support for time of the day formats, but for others the DBMS driver may have to represent them as integers or text values. In any case, it is always possible to make comparisons between time values as well sort query results by fields of this type. - +The time data type may represent the time of a given moment of the day. DBMS independent representation of the time of the day is also accomplished by using text strings formatted according to the ISO-8601 standard. - -class Test extends Doctrine_Record { - public function setTableDefinition() { - $this->hasColumn('timetest', 'time'); - } -} - +The format defined by the ISO-8601 standard for the time of the day is HH:MI:SS where HH is the number of hour the day from 00 to 23 and MI and SS are respectively the number of the minute and of the second from 00 to 59. Hours, minutes and seconds numbered below 10 should be padded on the left with 0. + +Some DBMS have native support for time of the day formats, but for others the DBMS driver may have to represent them as integers or text values. In any case, it is always possible to make comparisons between time values as well sort query results by fields of this type. + + + +class Test extends Doctrine_Record { + public function setTableDefinition() { + $this->hasColumn('timetest', 'time'); + } +} +