From 58544be11ffc793eb39d613ce7878a7feba1ee02 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Tue, 24 May 2011 22:34:43 +0000 Subject: fixed quickstart pdf buildscript --- build.xml | 1044 ++++++++++---------- buildscripts/texbuilder/Page2Tex.php | 5 +- .../quickstart/protected/pages/Advanced/I18N.page | 6 +- .../protected/pages/Configurations/UrlMapping.page | 6 +- .../protected/pages/Controls/TabPanel.page | 14 +- .../protected/pages/Database/ActiveRecord.page | 20 +- .../pages/GettingStarted/NewFeatures.page | 6 +- 7 files changed, 552 insertions(+), 549 deletions(-) diff --git a/build.xml b/build.xml index e159f68b..7f412865 100644 --- a/build.xml +++ b/build.xml @@ -1,110 +1,110 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - Welcome to use PRADO build script! - ---------------------------------- - You may use the following command format to build a target: - - phing <target name> - - where <target name> can be one of the following: - - For all PRADO developers: - - test : run unit tests (results are under /build/test-reports); - - For PRADO release manager: - - dist : create release files; - - build : prepare a directory for distribution; - - clean : clean up the build directory; - - rebuild : clean first and then build; - - docs : generate documentation; - - pear : generate PEAR packages; - - snapshot: generate nightly snapshot; - + + + + + + + + + + + + Welcome to use PRADO build script! + ---------------------------------- + You may use the following command format to build a target: + + phing <target name> + + where <target name> can be one of the following: + + For all PRADO developers: + - test : run unit tests (results are under /build/test-reports); + + For PRADO release manager: + - dist : create release files; + - build : prepare a directory for distribution; + - clean : clean up the build directory; + - rebuild : clean first and then build; + - docs : generate documentation; + - pear : generate PEAR packages; + - snapshot: generate nightly snapshot; + - - + + @@ -163,9 +163,9 @@ PRADO Framework for PHP 5, version ${prado.version}. See docs/ directory for documentation. - - + + @@ -175,7 +175,7 @@ - + @@ -225,8 +225,8 @@ - - + + @@ -240,388 +240,388 @@ - + - - - - - - - - - - setDbConnection($conn); - -//start playing - -foreach(Employee::finder()->findAll() as $employee) - var_dump($employee->LastName); - -//fetch all regions and its territories. -foreach(Region::finder()->withTerritories()->findAll() as $region) -{ - var_dump($region->RegionDescription); - foreach($region->Territories as $territory) - var_dump($territory->TerritoryDescription); -} - -//sqlmap example -$manager = new TSqlMapManager($conn); -$manager->configureXml('./database/sqlmap.xml'); -$sqlmap = $manager->getSqlMapGateway(); - -var_dump($sqlmap->queryForList('products-with-price', 50)); - -//similar query, but not identical -//Product::finder()->withCategory()->findAll('UnitPrice < ?', 50) - -?>]]> + + + + + + + + + + setDbConnection($conn); + +//start playing + +foreach(Employee::finder()->findAll() as $employee) + var_dump($employee->LastName); + +//fetch all regions and its territories. +foreach(Region::finder()->withTerritories()->findAll() as $region) +{ + var_dump($region->RegionDescription); + foreach($region->Territories as $territory) + var_dump($territory->TerritoryDescription); +} + +//sqlmap example +$manager = new TSqlMapManager($conn); +$manager->configureXml('./database/sqlmap.xml'); +$sqlmap = $manager->getSqlMapGateway(); + +var_dump($sqlmap->queryForList('products-with-price', 50)); + +//similar query, but not identical +//Product::finder()->withCategory()->findAll('UnitPrice < ?', 50) + +?>]]> - - - Building pradolite.php... - - - - Copying files to build directory... - - - - + + + Building pradolite.php... + + + + Copying files to build directory... + + + + - - - - - - - - Changing file permissions... - - - - - Building quickstart demo search indices... - - - - - Cleaning up the mess - - - - - - - Build PDF + CHM + HTML Docs, it may take about 30 mins - - Building quickstart.pdf... - - - - - - - - - - - - Building API manuals... - - - - - Indexing API manuals... - - - - - - - Generating CHM Content (Quickstart + ClassDocs) - - - - - - - - - - - - Moving doc files to build... - - - - - - - - - - - - - - - Generating compressed distribution files... - - - - - - - - - - - Generating files for pradosoft.com... - Compiling class docs... - - - - Moving HTML docs to Web folder... - - - - - - - - - - - Distribution Not Completed Yet!!! - -The following steps need to be manually performed in order to complete -the PRADO distribution: - -1. Package DreamWeaver extension by running DW extension manager with - buildscripts/classtree/PRADO.mxi and saving the generated file as - "${build.src.dir}/editors/Dreamweaver/PRADO.mxp" - -2. Use winzip (on Windows) and gzip (on Linux) to generate the compressed - release files of the direcotry - "${build.src.dir}". - - - - - - - - - - - - - - - - - - - - Generating compressed distribution files... - - - - - - - - - - - - - - + + + + + + + + Changing file permissions... + + + + + Building quickstart demo search indices... + + + + + Cleaning up the mess + + + + + + + Build PDF + CHM + HTML Docs, it may take about 30 mins + + Building quickstart.pdf... + + + + + + + + + + + + Building API manuals... + + + + + Indexing API manuals... + + + + + + + Generating CHM Content (Quickstart + ClassDocs) + + + + + + + + + + + + Moving doc files to build... + + + + + + + + + + + + + + + Generating compressed distribution files... + + + + + + + + + + + Generating files for pradosoft.com... + Compiling class docs... + + + + Moving HTML docs to Web folder... + + + + + + + + + + + Distribution Not Completed Yet!!! + +The following steps need to be manually performed in order to complete +the PRADO distribution: + +1. Package DreamWeaver extension by running DW extension manager with + buildscripts/classtree/PRADO.mxi and saving the generated file as + "${build.src.dir}/editors/Dreamweaver/PRADO.mxp" + +2. Use winzip (on Windows) and gzip (on Linux) to generate the compressed + release files of the direcotry + "${build.src.dir}". + + + + + + + + + + + + + + + + + + + + Generating compressed distribution files... + + + + + + + + + + + + + + diff --git a/buildscripts/texbuilder/Page2Tex.php b/buildscripts/texbuilder/Page2Tex.php index 04a60f93..008b30fa 100644 --- a/buildscripts/texbuilder/Page2Tex.php +++ b/buildscripts/texbuilder/Page2Tex.php @@ -210,9 +210,12 @@ class Page2Tex $html = preg_replace_callback('/\s*]*>((.|\n)*?)<\/table>/', array($this, 'tabular'), $html); - $html = preg_replace('//', '', $html); + $html = preg_replace('//', '', $html); $html = preg_replace('/
((.|\n)*?)<\/div>/', '', $html); + //useless divs + $html = preg_replace('/
]*">((.|\n)*?)<\/div>/', '$1', $html); + //since $html = preg_replace('/]+>/', '', $html); diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page index 5d3e05b5..1840e69b 100644 --- a/demos/quickstart/protected/pages/Advanced/I18N.page +++ b/demos/quickstart/protected/pages/Advanced/I18N.page @@ -78,10 +78,10 @@ The marker value is used to surround any untranslated text. Each translation message is wrapped within a trans-unit tag, where source is the original message, and target is the translated message. Editors such as Heartsome XLIFF Translation Editor can help in editing these XML files. -

Using a Database for translation

+

Using a Database for translation

-

Since version 3.1.3 the messages can also be stored in a database using the connection id from an existing TDataSourceConfig. You have to create two tables in your database: catalogue and trans_unit. The catalogue table needs an entry for each catalogue you want to use. Example schemas for different databases can be found in the framework's I18N/schema directory. To configure translation with a database use: +

Since version 3.1.3 the messages can also be stored in a database using the connection id from an existing TDataSourceConfig. You have to create two tables in your database: catalogue and trans_unit. The catalogue table needs an entry for each catalogue you want to use. Example schemas for different databases can be found in the framework's I18N/schema directory. To configure translation with a database use: @@ -97,7 +97,7 @@ Each translation message is wrapped within a trans-unit tag, where -

The translation messages will be stored in the trans_unit table. Add your translation in the target field of that table. You should make sure that you are working on the right catalogue by comparing the message's cat_id with that from the catalogue table.

+

The translation messages will be stored in the trans_unit table. Add your translation in the target field of that table. You should make sure that you are working on the right catalogue by comparing the message's cat_id with that from the catalogue table.

Setting and Changing Culture

Once globalization is enabled, you can access the globalization settings, such as, Culture, Charset, etc, using

diff --git a/demos/quickstart/protected/pages/Configurations/UrlMapping.page b/demos/quickstart/protected/pages/Configurations/UrlMapping.page index bdd0b81d..6bbedc28 100644 --- a/demos/quickstart/protected/pages/Configurations/UrlMapping.page +++ b/demos/quickstart/protected/pages/Configurations/UrlMapping.page @@ -133,9 +133,9 @@ parameters with these patterns if a lot of pages share common parameters.

-

As above, put more specific rules before more common rules as the first matching rule will be used.

+

As above, put more specific rules before more common rules as the first matching rule will be used.

-

To make configuration of friendly URLs for multiple pages even easier, you can also use UrlFormat="Path" +

To make configuration of friendly URLs for multiple pages even easier, you can also use UrlFormat="Path" in combination with wildcard patterns. In fact, this feature only is available in combination with wildcard rules:

@@ -160,7 +160,7 @@ Since version 3.1.1, TUrlMapping starts to support constructing customi

A matching pattern is one whose ServiceID and ServiceParameter properties are the same as those passed to constructUrl() and whose named parameters are found in the GET variables. For example, constructUrl('Posts.ListPost',array('cat'=>2)) will use the third pattern in the above example. -

+

By default, TUrlMapping will construct URLs prefixed with the currently requesting PHP script path, such as /path/to/index.php/article/3. Users may change this behavior by explicitly specifying the URL prefix through its UrlPrefix property. For example, if the Web server configuration treats index.php as the default script, we can set UrlPrefix as /path/to and the constructed URL will look like /path/to/article/3. diff --git a/demos/quickstart/protected/pages/Controls/TabPanel.page b/demos/quickstart/protected/pages/Controls/TabPanel.page index d85de681..f4c9962d 100644 --- a/demos/quickstart/protected/pages/Controls/TabPanel.page +++ b/demos/quickstart/protected/pages/Controls/TabPanel.page @@ -1,13 +1,13 @@ -

TTabPanel

+

TTabPanel

-

+

TTabPanel displays a tabbed panel. Users can click on the tab bar to switching among different tab views. Each tab view is an independent panel that can contain arbitrary content.

-

+

A TTabPanel control consists of one or several TTabView controls representing the possible tab views. At any time, only one tab view is visible (active), which is specified by any of the following properties:

@@ -17,11 +17,11 @@ A TTabPanel control consists of one or several TTabView contro
  • ActiveView - the visible view instance.
  • -

    +

    If both ActiveViewIndex and ActiveViewID are set, the latter takes precedence.

    -

    +

    TTabPanel uses CSS to specify the appearance of the tab bar and panel. By default, an embedded CSS file will be published which contains the default CSS for TTabPanel. You may also use your own CSS file by specifying the CssUrl property. The following properties specify the CSS classes used for elements in a TTabPanel:

    @@ -32,11 +32,11 @@ If both ActiveViewIndex and ActiveViewID are set, the latter t
  • ViewCssClass - the CSS class for the div element enclosing view content (defaults to 'tab-view');
  • -

    +

    To use TTabPanel, write a template like following:

    - + <com:TTabPanel> <com:TTabView Caption="View 1"> content for view 1 diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page index bc0df529..78947faf 100644 --- a/demos/quickstart/protected/pages/Database/ActiveRecord.page +++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page @@ -50,16 +50,16 @@
  • Fetch relationships (related foreign objects) such as "has many", "has one", "belongs to" and "many to many" via association table.
  • Lazy loading of relationships.
  • -

    Design Implications

    -

    +

    Design Implications

    +

    Prado's implementation of Active Record does not maintain referential identity. Each object obtained using Active Record is a copy of the data in the database. For example, If you ask for a particular customer and get back a Customer object, the next time you ask for that customer you get back another instance of a Customer object. This implies that a strict comparison (i.e., using ===) will return false, while loose comparison (i.e., using ==) will return true if the object values are equal by loose comparison. -

    -

    +

    +

    This is design implication related to the following question. "Do you think of the customer as an object, of which there's only one, or do you think of the objects you operate on as copies of the database?" @@ -876,8 +876,8 @@ class Category extends TActiveRecord } -

    Query Criteria for Related Objects

    -

    +

    Query Criteria for Related Objects

    +

    In the above, we show that an Active Record object can reference to its related objects by declaring a static class member $RELATIONS which specifies a list of relations. Each relation is specified as an array consisting of three elements: relation type, related AR class name, @@ -1147,14 +1147,14 @@ arrays. E.g. $player->skills[] = new SkillRecord(). If array w will be thrown.

    -

    Column Mapping

    -

    +

    Column Mapping

    +

    Since v3.1.1, Active Record starts to support column mapping. Column mapping allows developers to address columns in Active Record using a more consistent naming convention. In particular, using column mapping, one can access a column using whatever name he likes, rather than limited by the name defined in the database schema.

    -

    +

    To use column mapping, declare a static array named COLUMN_MAPPING in the Active Record class. The keys of the array are column names (called physical column names) as defined in the database schema, while the values are corresponding property names (called logical column names) defined @@ -1181,7 +1181,7 @@ class UserRecord extends TActiveRecord //.... } -

    +

    With the above column mapping, we can address first_name using $userRecord->firstName instead of $userRecord->first_name. This helps separation of logic and model.

    diff --git a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page index 51dbb981..8d509bdb 100644 --- a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page +++ b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page @@ -6,19 +6,19 @@ This page summarizes the main new features that are introduced in each PRADO release.

    -

    Version 3.1.3

    +

    Version 3.1.3

    -

    Version 3.1.2

    +

    Version 3.1.2

    • Added a new active control TActivePager that allows to paginate a databound control with an ajax callback.
    • Added TFirebugLogRoute to send logs to the Firebug console
    -

    Version 3.1.1

    +

    Version 3.1.1

    • Added a new control TTabPanel that displays tabbed views.
    • Added a new control TKeyboard that displays a virtual keyboard for text input.
    • -- cgit v1.2.3