From 21a909f819cc340564770ea63e383ee6013fc167 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 15 Jan 2014 19:03:29 +0100 Subject: Removed ?> from buildscripts and demos --- buildscripts/classtree/DWExtension.php | 1 - buildscripts/index/build.php | 2 - buildscripts/index/quickstart_index.php | 1 - buildscripts/index/search.php | 4 +- buildscripts/phing/tasks/PradoPearTask.php | 2 - buildscripts/phpbuilder/build.php | 2 - buildscripts/texbuilder/Page2Tex.php | 2 - buildscripts/texbuilder/quickstart/build.php | 3 - buildscripts/texbuilder/quickstart/pages.php | 2 - buildscripts/texbuilder/sqlmap/build.php | 3 - buildscripts/texbuilder/sqlmap/pages.php | 2 - buildscripts/texbuilder/time-tracker/pages.php | 2 - .../protected/pages/Day1/CreateContact.page | 31 +++++---- .../blog-tutorial/protected/pages/Day1/Setup.page | 5 +- .../protected/pages/Day1/ShareLayout.page | 2 - .../protected/pages/Day1/fr/CreateContact.page | 33 +++++----- .../protected/pages/Day1/fr/Setup.page | 7 +-- .../protected/pages/Day1/fr/ShareLayout.page | 4 +- .../protected/pages/Day1/id/CreateContact.page | 31 +++++---- .../protected/pages/Day1/id/Setup.page | 5 +- .../protected/pages/Day1/id/ShareLayout.page | 2 - .../Controls/Samples/TTextHighlighter/Home.page | 1 - .../protected/pages/Controls/TextHighlighter.page | 1 - .../pages/Controls/id/TextHighlighter.page | 1 - .../protected/pages/Tutorial/AjaxChat.page | 1 - .../pages/Tutorial/CurrencyConverter.page | 63 +++++++++---------- .../protected/pages/Tutorial/fr/AjaxChat.page | 1 - .../pages/Tutorial/fr/CurrencyConverter.page | 63 +++++++++---------- .../protected/pages/Tutorial/id/AjaxChat.page | 1 - .../pages/Tutorial/id/CurrencyConverter.page | 73 +++++++++++----------- .../protected/pages/Manual/Tutorial/TestFirst.page | 7 +-- .../pages/Manual/Tutorial/TestSecond.page | 2 - framework/Web/UI/TClientScriptManager.php | 1 - framework/pradolite.php | 29 +++++---- requirements/index.php | 2 - 35 files changed, 169 insertions(+), 223 deletions(-) diff --git a/buildscripts/classtree/DWExtension.php b/buildscripts/classtree/DWExtension.php index 8849efea..a7a1ca30 100644 --- a/buildscripts/classtree/DWExtension.php +++ b/buildscripts/classtree/DWExtension.php @@ -252,4 +252,3 @@ class PradoTagChooser return $this->_document->saveXML(); } } -?> \ No newline at end of file diff --git a/buildscripts/index/build.php b/buildscripts/index/build.php index bbe151e6..a2e57286 100644 --- a/buildscripts/index/build.php +++ b/buildscripts/index/build.php @@ -61,5 +61,3 @@ else { echo "Usage: 'php build.php quickstart' or 'php build.php api'\n"; } - -?> diff --git a/buildscripts/index/quickstart_index.php b/buildscripts/index/quickstart_index.php index 61e21514..5df0f549 100644 --- a/buildscripts/index/quickstart_index.php +++ b/buildscripts/index/quickstart_index.php @@ -104,4 +104,3 @@ class quickstart_index echo "\nSaving search index ({$count}) to {$this->_dir}\n\n"; } } -?> \ No newline at end of file diff --git a/buildscripts/index/search.php b/buildscripts/index/search.php index 23948ca5..ff83e629 100644 --- a/buildscripts/index/search.php +++ b/buildscripts/index/search.php @@ -11,7 +11,7 @@ require_once('Zend/Search/Lucene.php'); if($keyword!=='') { - $search=new Zend_Search_Lucene(realpath(dirname(__FILE__))); + $search=new Zend_Search_Lucene(realpath(dirname(__FILE__))); $results=$search->find(strtolower($keyword)); $content=''; foreach($results as $entry) @@ -32,5 +32,3 @@ $page=preg_replace('/.*/ms',$content,$ if($keyword!=='') $page=preg_replace('/ \ No newline at end of file diff --git a/buildscripts/phing/tasks/PradoPearTask.php b/buildscripts/phing/tasks/PradoPearTask.php index 5d615084..541c972e 100644 --- a/buildscripts/phing/tasks/PradoPearTask.php +++ b/buildscripts/phing/tasks/PradoPearTask.php @@ -129,5 +129,3 @@ class PradoPearTask extends Task echo $e->getMessage(); } } - -?> \ No newline at end of file diff --git a/buildscripts/phpbuilder/build.php b/buildscripts/phpbuilder/build.php index 17e02806..47b7bec4 100644 --- a/buildscripts/phpbuilder/build.php +++ b/buildscripts/phpbuilder/build.php @@ -144,5 +144,3 @@ function unfold_file($fileName) } return $content; } - -?> \ No newline at end of file diff --git a/buildscripts/texbuilder/Page2Tex.php b/buildscripts/texbuilder/Page2Tex.php index b0d37149..ce2ece7f 100644 --- a/buildscripts/texbuilder/Page2Tex.php +++ b/buildscripts/texbuilder/Page2Tex.php @@ -343,5 +343,3 @@ class Page2Tex return "

"; } } - -?> diff --git a/buildscripts/texbuilder/quickstart/build.php b/buildscripts/texbuilder/quickstart/build.php index a42d6be3..6a824125 100644 --- a/buildscripts/texbuilder/quickstart/build.php +++ b/buildscripts/texbuilder/quickstart/build.php @@ -76,6 +76,3 @@ if($argv[1] == 'pdf') echo " Unable to find pdfLatex executable $pdflatexExec"; } } - - -?> diff --git a/buildscripts/texbuilder/quickstart/pages.php b/buildscripts/texbuilder/quickstart/pages.php index cd11c4b1..1fb94431 100644 --- a/buildscripts/texbuilder/quickstart/pages.php +++ b/buildscripts/texbuilder/quickstart/pages.php @@ -177,5 +177,3 @@ $pages['Client-side Scripting'] = array( return $pages; //-------------- END CONFIG ---------------- - -?> \ No newline at end of file diff --git a/buildscripts/texbuilder/sqlmap/build.php b/buildscripts/texbuilder/sqlmap/build.php index 4ea4d75e..066af486 100644 --- a/buildscripts/texbuilder/sqlmap/build.php +++ b/buildscripts/texbuilder/sqlmap/build.php @@ -76,6 +76,3 @@ if($argv[1] == 'pdf') echo " Unable to find pdfLatex executable $pdflatexExec"; } } - - -?> diff --git a/buildscripts/texbuilder/sqlmap/pages.php b/buildscripts/texbuilder/sqlmap/pages.php index 57fff767..b0b7bca0 100644 --- a/buildscripts/texbuilder/sqlmap/pages.php +++ b/buildscripts/texbuilder/sqlmap/pages.php @@ -58,5 +58,3 @@ $pages['Advanced Topics'] = array( ); return $pages; - -?> \ No newline at end of file diff --git a/buildscripts/texbuilder/time-tracker/pages.php b/buildscripts/texbuilder/time-tracker/pages.php index 732f675d..a9c32347 100644 --- a/buildscripts/texbuilder/time-tracker/pages.php +++ b/buildscripts/texbuilder/time-tracker/pages.php @@ -14,5 +14,3 @@ $pages['Testing Business Code'] = array( 'Docs/UserClassAndExceptions.page' ); return $pages; - -?> \ No newline at end of file diff --git a/demos/blog-tutorial/protected/pages/Day1/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/CreateContact.page index 28ad4b21..0d9fc026 100755 --- a/demos/blog-tutorial/protected/pages/Day1/CreateContact.page +++ b/demos/blog-tutorial/protected/pages/Day1/CreateContact.page @@ -45,11 +45,11 @@ We use template to organize the presentational layout of the feedback form. In t

Contact

Please fill out the following form to let me know your feedback on my blog. Thanks!

-<com:TForm> +<com:TForm> Your Name: <com:TRequiredFieldValidator ControlToValidate="Name" - ErrorMessage="Please provide your name." + ErrorMessage="Please provide your name." Display="Dynamic" />
<com:TTextBox ID="Name" /> @@ -57,10 +57,10 @@ We use template to organize the presentational layout of the feedback form. In t
Your Email: <com:TRequiredFieldValidator ControlToValidate="Email" - ErrorMessage="Please provide your email address." + ErrorMessage="Please provide your email address." Display="Dynamic" /> <com:TEmailAddressValidator ControlToValidate="Email" - ErrorMessage="You entered an invalid email address." + ErrorMessage="You entered an invalid email address." Display="Dynamic" />
<com:TTextBox ID="Email" /> @@ -68,11 +68,11 @@ We use template to organize the presentational layout of the feedback form. In t
Feedback: <com:TRequiredFieldValidator ControlToValidate="Feedback" - ErrorMessage="Please provide your feedback." + ErrorMessage="Please provide your feedback." Display="Dynamic" />
-<com:TTextBox ID="Feedback" - TextMode="MultiLine" +<com:TTextBox ID="Feedback" + TextMode="MultiLine" Rows="10" Columns="40" /> @@ -99,13 +99,13 @@ Besides TTextBox controls, the template also uses many validator contro Your Email: -<com:TRequiredFieldValidator +<com:TRequiredFieldValidator ControlToValidate="Email" - ErrorMessage="Please provide your email address." + ErrorMessage="Please provide your email address." Display="Dynamic" /> -<com:TEmailAddressValidator +<com:TEmailAddressValidator ControlToValidate="Email" - ErrorMessage="You entered an invalid email address." + ErrorMessage="You entered an invalid email address." Display="Dynamic" />
<com:TTextBox ID="Email" /> @@ -152,28 +152,27 @@ class Contact extends TPage /** * Event handler for the OnClick event of the submit button. * @param TButton the button triggering the event - * @param TEventParameter event parameter (null here) + * @param TEventParameter event parameter (null here) */ public function submitButtonClicked($sender, $param) { if ($this->IsValid) // check if input validation is successful { // obtain the user name, email, feedback from the textboxes - $name = $this->Name->Text; + $name = $this->Name->Text; $email = $this->Email->Text; $feedback = $this->Feedback->Text; - + // send an email to administrator with the above information $this->mailFeedback($name, $email, $feedback); } } - + protected function mailFeedback($name, $email, $feedback) { // implementation of sending the feedback email } } -?>

diff --git a/demos/blog-tutorial/protected/pages/Day1/Setup.page b/demos/blog-tutorial/protected/pages/Day1/Setup.page index e8316253..582d0399 100755 --- a/demos/blog-tutorial/protected/pages/Day1/Setup.page +++ b/demos/blog-tutorial/protected/pages/Day1/Setup.page @@ -52,7 +52,6 @@ require_once('path/to/prado.php'); $application = new TApplication; // run the application and handle user requests $application->run(); -?> @@ -148,8 +147,8 @@ To change the location of the root page directory and change the name of homepag - diff --git a/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page index 9cd0410b..6115ef22 100755 --- a/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page +++ b/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page @@ -66,7 +66,6 @@ The class file MainLayout.php is very simple: class MainLayout extends TTemplateControl { } -?> @@ -145,7 +144,6 @@ class Contact extends TPage // ... } -?>

diff --git a/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page index e85d8bfe..0105f656 100755 --- a/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page +++ b/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page @@ -45,11 +45,11 @@ Nous utilisons un fichier gabarit pour organiser la présentation de notre formu

Contact

Veuillez remplir le formulaire suivant pour me laisser vos impressions au sujet de mon blog. Merci !

-<com:TForm> +<com:TForm> Votre nom: <com:TRequiredFieldValidator ControlToValidate="Name" - ErrorMessage="Veuillez indiquer votre nom." + ErrorMessage="Veuillez indiquer votre nom." Display="Dynamic" />
<com:TTextBox ID="Name" /> @@ -57,10 +57,10 @@ Nous utilisons un fichier gabarit pour organiser la présentation de notre formu
Votre email: <com:TRequiredFieldValidator ControlToValidate="Email" - ErrorMessage="Veuillez indiquer votre email." + ErrorMessage="Veuillez indiquer votre email." Display="Dynamic" /> <com:TEmailAddressValidator ControlToValidate="Email" - ErrorMessage="Vous avez saisi un email invalide." + ErrorMessage="Vous avez saisi un email invalide." Display="Dynamic" />
<com:TTextBox ID="Email" /> @@ -68,11 +68,11 @@ Nous utilisons un fichier gabarit pour organiser la présentation de notre formu
Commentaires: <com:TRequiredFieldValidator ControlToValidate="Feedback" - ErrorMessage="Veuillez saisir un commentaire." + ErrorMessage="Veuillez saisir un commentaire." Display="Dynamic" />
-<com:TTextBox ID="Feedback" - TextMode="MultiLine" +<com:TTextBox ID="Feedback" + TextMode="MultiLine" Rows="10" Columns="40" /> @@ -99,13 +99,13 @@ Avant le contrôle TTextBox, le gabarit utilise aussi plusieurs validat Your Email: -<com:TRequiredFieldValidator +<com:TRequiredFieldValidator ControlToValidate="Email" - ErrorMessage="Veuillez indiquer votre email." + ErrorMessage="Veuillez indiquer votre email." Display="Dynamic" /> -<com:TEmailAddressValidator +<com:TEmailAddressValidator ControlToValidate="Email" - ErrorMessage="Vous avez saisi un email invalide." + ErrorMessage="Vous avez saisi un email invalide." Display="Dynamic" />
<com:TTextBox ID="Email" /> @@ -152,28 +152,27 @@ class Contact extends TPage /** * Gestionnaire d'évènement pour OnClick (bouton submit). * @param TButton le bouton qui a générer l'évènement - * @param TEventParameter les paramètres de l'évènement (null dans ce cas) + * @param TEventParameter les paramètres de l'évènement (null dans ce cas) */ public function submitButtonClicked($sender, $param) { if ($this->IsValid) // vérifie que les validations sont Ok { // récupère le nom de l'utilisateur, son email et son commentaire - $name = $this->Name->Text; + $name = $this->Name->Text; $email = $this->Email->Text; $feedback = $this->Feedback->Text; - - // envoie un email à l'administrateur avec les informations + + // envoie un email à l'administrateur avec les informations $this->mailFeedback($name, $email, $feedback); } } - + protected function mailFeedback($name, $email, $feedback) { // implémentation de l'envoi de l'email } } -?>

diff --git a/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page b/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page index 22a7891c..0be1c1f0 100755 --- a/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page +++ b/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page @@ -49,11 +49,10 @@ require_once('path/to/prado.php'); $application = new TApplication; // run the application and handle user requests $application->run(); -?> -Le nom du script ne doit pas être obligatoirement index.php. Il peut porter n'importe quel nom à partir du moment ou le serveur peut l'interpréter comme étant un script PHP5. Par exemple, sur certains hébergements mutualisés, le script devra porter le nom index.php5, ce qui permettra au serveur Web de le traiter correctement. +Le nom du script ne doit pas être obligatoirement index.php. Il peut porter n'importe quel nom à partir du moment ou le serveur peut l'interpréter comme étant un script PHP5. Par exemple, sur certains hébergements mutualisés, le script devra porter le nom index.php5, ce qui permettra au serveur Web de le traiter correctement.

Le fichier de configuration de l'application

@@ -145,8 +144,8 @@ Pour changer l'emplacement du dossier racine des pages et le nom de la page d'ac - diff --git a/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page index cefff770..539b8376 100755 --- a/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page +++ b/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page @@ -68,7 +68,6 @@ Le fichier de classe MainLayout.php est très simple : class MainLayout extends TTemplateControl { } -?> @@ -147,13 +146,12 @@ class Contact extends TPage // ... } -?>

Ci-dessus, nous indiquons d'utiliser le gabarit principal MasterClass dans la méthode onPreInit() qui est héritée de TPage. Cette méthode est appelé par PRADO juste après que l'instance de la page soit créée. Nous pouvons ainsi déclarer au moment où la page est requise quel gabarit principal utiliser. Par exemple, quand la page est requise par un utilisateur enregistré, nous pouvons utiliser le gabarit A, et le gabarit B si l'utilisateur qui demande la page est un invité.

- +

Nous pouvons aussi spécifier quel gabarit principal utiliser dans le fichier de configuration de l'application ou encore dans le fichier de configuration de la page. Ci-dessous, le fichier de configuration de l'application modifié pour notre blog.

diff --git a/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page index 65be6417..caee30d0 100755 --- a/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page +++ b/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page @@ -45,11 +45,11 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir

Contact

Please fill out the following form to let me know your feedback on my blog. Thanks!

-<com:TForm> +<com:TForm> Your Name: <com:TRequiredFieldValidator ControlToValidate="Name" - ErrorMessage="Please provide your name." + ErrorMessage="Please provide your name." Display="Dynamic" />
<com:TTextBox ID="Name" /> @@ -57,10 +57,10 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
Your Email: <com:TRequiredFieldValidator ControlToValidate="Email" - ErrorMessage="Please provide your email address." + ErrorMessage="Please provide your email address." Display="Dynamic" /> <com:TEmailAddressValidator ControlToValidate="Email" - ErrorMessage="You entered an invalid email address." + ErrorMessage="You entered an invalid email address." Display="Dynamic" />
<com:TTextBox ID="Email" /> @@ -68,11 +68,11 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
Feedback: <com:TRequiredFieldValidator ControlToValidate="Feedback" - ErrorMessage="Please provide your feedback." + ErrorMessage="Please provide your feedback." Display="Dynamic" />
-<com:TTextBox ID="Feedback" - TextMode="MultiLine" +<com:TTextBox ID="Feedback" + TextMode="MultiLine" Rows="10" Columns="40" /> @@ -99,13 +99,13 @@ Selain kontrol TTextBox, template juga menggunakan banyak kontrol valid Your Email: -<com:TRequiredFieldValidator +<com:TRequiredFieldValidator ControlToValidate="Email" - ErrorMessage="Please provide your email address." + ErrorMessage="Please provide your email address." Display="Dynamic" /> -<com:TEmailAddressValidator +<com:TEmailAddressValidator ControlToValidate="Email" - ErrorMessage="You entered an invalid email address." + ErrorMessage="You entered an invalid email address." Display="Dynamic" />
<com:TTextBox ID="Email" /> @@ -152,28 +152,27 @@ class Contact extends TPage /** * Pengendali event untuk event OnClick pada tombol submit. * @param TButton tombol yang memicu event - * @param TEventParameter parameter event (null di sini) + * @param TEventParameter parameter event (null di sini) */ public function submitButtonClicked($sender, $param) { if ($this->IsValid) // memeriksa apakan validasi input berhasil { // mendapatkan nama pengguna, email, umpan balik dari kotak teks - $name = $this->Name->Text; + $name = $this->Name->Text; $email = $this->Email->Text; $feedback = $this->Feedback->Text; - + // mengirimkan email ke administrator dengan informasi di atas $this->mailFeedback($name, $email, $feedback); } } - + protected function mailFeedback($name, $email, $feedback) { // implementasi pengiriman email umpan balik } } -?>

diff --git a/demos/blog-tutorial/protected/pages/Day1/id/Setup.page b/demos/blog-tutorial/protected/pages/Day1/id/Setup.page index edc469d5..45ae8cf5 100755 --- a/demos/blog-tutorial/protected/pages/Day1/id/Setup.page +++ b/demos/blog-tutorial/protected/pages/Day1/id/Setup.page @@ -52,7 +52,6 @@ require_once('path/to/prado.php'); $application = new TApplication; // jalankan aplikasi dan tangani permintaan pengguna $application->run(); -?> @@ -148,8 +147,8 @@ Untuk membuat lokasi akar direktori halaman dan mengubah nama homepage, seseoran - diff --git a/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page index d505beed..0c40181b 100755 --- a/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page +++ b/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page @@ -66,7 +66,6 @@ File kelas MainLayout.php sangat sederhana: class MainLayout extends TTemplateControl { } -?> @@ -145,7 +144,6 @@ class Contact extends TPage // ... } -?>

diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page index 9bd86078..c7506c67 100755 --- a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page @@ -12,7 +12,6 @@ Highlighting PHP statements: $str = 'one|two|three|four'; // will output an array print_r(explode('|', $str, 2)); -?> diff --git a/demos/quickstart/protected/pages/Controls/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/TextHighlighter.page index 1babbb33..5d3428f9 100755 --- a/demos/quickstart/protected/pages/Controls/TextHighlighter.page +++ b/demos/quickstart/protected/pages/Controls/TextHighlighter.page @@ -17,7 +17,6 @@ To use TTextHighlighter, simply enclose the contents to be syntax highl </com:TTextHighlighter> diff --git a/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page index b2b500b0..b1bb4ce7 100755 --- a/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page +++ b/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page @@ -17,7 +17,6 @@ Untuk menggunakan TTextHighlighter, cukup kurung konten yang sintaksnya </com:TTextHighlighter> diff --git a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page index 4a8f23ab..92118720 100755 --- a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page +++ b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page @@ -59,7 +59,6 @@ php prado/framework/prado-cli.php -c chat class Login extends TPage { } -?> currency-converter in your current working directory. You may need to change to the appropriate directory first. - See the Command Line Tool - for more details. -

+ See the Command Line Tool + for more details. +

php prado/framework/prado-cli.php -c currency-converter @@ -52,7 +52,7 @@ php prado/framework/prado-cli.php -c currency-converter

We start by editing the Home.page file found in the currency-converter/protected/pages/ directory. Files ending with ".page" are page templates that contains HTML and Prado controls. - We simply add two textboxes, three labels and one button as follows. + We simply add two textboxes, three labels and one button as follows.

<com:TForm> @@ -75,7 +75,7 @@ php prado/framework/prado-cli.php -c currency-converter </com:TForm> - +

If you refresh the page, you should see something similar to the following figure. It may not look very pretty or orderly, but we shall change that later using CSS. @@ -125,7 +125,7 @@ php prado/framework/prado-cli.php -c currency-converter to add a "Home.php" to where "Home.page" is. The Home class should extends the , the default base - class for all Prado pages. + class for all Prado pages.

<?php @@ -133,8 +133,7 @@ class Home extends TPage { } -?> - +

Prado uses PHP's __autoload method to load classes. The convention is to use the class name with ".php" extension as filename. @@ -151,15 +150,15 @@ class Home extends TPage the converted total. To handle the user clicking of the "Convert" button we simply add an OnClick property to the "Convert" button in the "Home.page" template and add a corresponding event handler method - in the "Home.php". + in the "Home.php".

<com:TButton Text="Convert" OnClick="convert_clicked" /> -

+

The value of the OnClick, "convert_clicked", will be the method name in the "Home.php" that will called when the user clicks on the - "Convert" button. + "Convert" button.

class Home extends TPage @@ -171,8 +170,8 @@ class Home extends TPage $this->total->Text = $rate * $dollars; } } - -
+ +

If you run the application in your web browser, enter some values and click the "Convert" button then you should see that calculated value displayed next @@ -186,24 +185,24 @@ class Home extends TPage

We shall now examine, the three lines that implements the simply currency - conversion in the "convert_clicked" method. -

+ conversion in the "convert_clicked" method. +

$rate = floatval($this->currencyRate->Text); - +

The statement $this->currencyRate corresponds to the TTextBox component with ID value "currencyRate" in the "Home.page" template. The Text property of the TTextBox contains the value that the user entered. So, we obtain this value by $this->currencyRate->Text which we convert the - value to a float value. + value to a float value.

$dollars = floatval($this->dollars->Text); - -
+ +

The next line does a similar things, it takes the user value from the TTextBox with ID value "dollars and converts it to @@ -212,9 +211,9 @@ $dollars = floatval($this->dollars->Text);

The third line calculates the new amount and set this value in the Text property of the TLabel with ID="total". - Thus, we display the new amount to the user in the label. + Thus, we display the new amount to the user in the label.

-
+
$this->total->Text = $rate * $dollars; @@ -233,14 +232,14 @@ $this->total->Text = $rate * $dollars;
  • the user enters a value,
  • the currency rate is a valid number,
  • the currency rate is positive.
  • - +

    To ensure 1 we add one . To ensure 2 and 3, we add one . We may add these validators any where within the "Home.page" template. Further details regarding these validator and other validators can be found in the - Validation Controls page. + Validation Controls page.

    <com:TRequiredFieldValidator @@ -258,12 +257,12 @@ $this->total->Text = $rate * $dollars;
    1. the user enters a value,
    2. the value is a valid number (not including any currency or dollar signs).
    3. -
    +

    To ensure 1 we just add another TRequiredFieldValidator, for 2 we could use a . For simplicity we only allow the user to enter - a number for the amount they wish to convert. + a number for the amount they wish to convert.

    <com:TRequiredFieldValidator @@ -283,7 +282,7 @@ $this->total->Text = $rate * $dollars; using both javascript and server side. The server side validation is always performed. For the server side, we should skip the calculation if the validators are not satisfied. This can - done as follows. + done as follows.

    public function convert_clicked($sender, $param) @@ -313,7 +312,7 @@ public function convert_clicked($sender, $param) In addition, we can change the "totals" TLabel with the Active Control counter part, , such that the server side can update the browser without - reloading the page. + reloading the page.

    @@ -323,11 +322,11 @@ public function convert_clicked($sender, $param)
    <com:TActiveButton Text="Convert" OnClick="convert_clicked" />
    - +

    The server side logic remains the same, we just need to import the Active Controls name space as they are not included by default. We - add the following line to the begin of "Home.php". + add the following line to the begin of "Home.php".

    Prado::using('System.Web.UI.ActiveControls.*'); @@ -345,7 +344,7 @@ Prado::using('System.Web.UI.ActiveControls.*');

    To indicate that the calculation is in progress, we can change the text of the "total" label as follows. We add a ClientSide.OnLoading property to the "Convert" button (since this button is responsible for requesting - the calculation). + the calculation).

    <com:TActiveButton Text="Convert" OnClick="convert_clicked" > @@ -383,7 +382,7 @@ Prado::using('System.Web.UI.ActiveControls.*');

    We simply create a CSS file named "common.css" and save it in the themes/Basic directory. Then we add the following code - to the beginning of "Home.page" (we add a little more HTML as well). + to the beginning of "Home.page" (we add a little more HTML as well).

    <%@ Theme="Basic" %> @@ -392,7 +391,7 @@ Prado::using('System.Web.UI.ActiveControls.*'); <com:THead Title="Currency Converter" /> - +

    The first line <%@ Theme="Basic" %> defines the theme to be used for this page. The diff --git a/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page index 39d7f9e5..568e920f 100755 --- a/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page +++ b/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page @@ -58,7 +58,6 @@ php prado/framework/prado-cli.php -c chat class Login extends TPage { } -?> currency-converter in your current working directory. You may need to change to the appropriate directory first. - See the Command Line Tool - for more details. -

    + See the Command Line Tool + for more details. +

    php prado/framework/prado-cli.php -c currency-converter @@ -52,7 +52,7 @@ php prado/framework/prado-cli.php -c currency-converter

    We start by editing the Home.page file found in the currency-converter/protected/pages/ directory. Files ending with ".page" are page templates that contains HTML and Prado controls. - We simply add two textboxes, three labels and one button as follows. + We simply add two textboxes, three labels and one button as follows.

    <com:TForm> @@ -75,7 +75,7 @@ php prado/framework/prado-cli.php -c currency-converter
    </com:TForm> -
    +

    If you refresh the page, you should see something similar to the following figure. It may not look very pretty or orderly, but we shall change that later using CSS. @@ -125,7 +125,7 @@ php prado/framework/prado-cli.php -c currency-converter to add a "Home.php" to where "Home.page" is. The Home class should extends the , the default base - class for all Prado pages. + class for all Prado pages.

    <?php @@ -133,8 +133,7 @@ class Home extends TPage { } -?> - +

    Prado uses PHP's __autoload method to load classes. The convention is to use the class name with ".php" extension as filename. @@ -151,15 +150,15 @@ class Home extends TPage the converted total. To handle the user clicking of the "Convert" button we simply add an OnClick property to the "Convert" button in the "Home.page" template and add a corresponding event handler method - in the "Home.php". + in the "Home.php".

    <com:TButton Text="Convert" OnClick="convert_clicked" /> -

    +

    The value of the OnClick, "convert_clicked", will be the method name in the "Home.php" that will called when the user clicks on the - "Convert" button. + "Convert" button.

    class Home extends TPage @@ -171,8 +170,8 @@ class Home extends TPage $this->total->Text = $rate * $dollars; } } - -
    + +

    If you run the application in your web browser, enter some values and click the "Convert" button then you should see that calculated value displayed next @@ -186,24 +185,24 @@ class Home extends TPage

    We shall now examine, the three lines that implements the simply currency - conversion in the "convert_clicked" method. -

    + conversion in the "convert_clicked" method. +

    $rate = floatval($this->currencyRate->Text); - +

    The statement $this->currencyRate corresponds to the TTextBox component with ID value "currencyRate" in the "Home.page" template. The Text property of the TTextBox contains the value that the user entered. So, we obtain this value by $this->currencyRate->Text which we convert the - value to a float value. + value to a float value.

    $dollars = floatval($this->dollars->Text); - -
    + +

    The next line does a similar things, it takes the user value from the TTextBox with ID value "dollars and converts it to @@ -212,9 +211,9 @@ $dollars = floatval($this->dollars->Text);

    The third line calculates the new amount and set this value in the Text property of the TLabel with ID="total". - Thus, we display the new amount to the user in the label. + Thus, we display the new amount to the user in the label.

    -
    +
    $this->total->Text = $rate * $dollars; @@ -233,14 +232,14 @@ $this->total->Text = $rate * $dollars;
  • the user enters a value,
  • the currency rate is a valid number,
  • the currency rate is positive.
  • - +

    To ensure 1 we add one . To ensure 2 and 3, we add one . We may add these validators any where within the "Home.page" template. Further details regarding these validator and other validators can be found in the - Validation Controls page. + Validation Controls page.

    <com:TRequiredFieldValidator @@ -258,12 +257,12 @@ $this->total->Text = $rate * $dollars;
    1. the user enters a value,
    2. the value is a valid number (not including any currency or dollar signs).
    3. -
    +

    To ensure 1 we just add another TRequiredFieldValidator, for 2 we could use a . For simplicity we only allow the user to enter - a number for the amount they wish to convert. + a number for the amount they wish to convert.

    <com:TRequiredFieldValidator @@ -283,7 +282,7 @@ $this->total->Text = $rate * $dollars; using both javascript and server side. The server side validation is always performed. For the server side, we should skip the calculation if the validators are not satisfied. This can - done as follows. + done as follows.

    public function convert_clicked($sender, $param) @@ -310,7 +309,7 @@ public function convert_clicked($sender, $param) In addition, we can change the "totals" TLabel with the Active Control counter part, , such that the server side can update the browser without - reloading the page. + reloading the page.

    @@ -320,11 +319,11 @@ public function convert_clicked($sender, $param)
    <com:TActiveButton Text="Convert" OnClick="convert_clicked" />
    - +

    The server side logic remains the same, we just need to import the Active Controls name space as they are not included by default. We - add the following line to the begin of "Home.php". + add the following line to the begin of "Home.php".

    Prado::using('System.Web.UI.ActiveControls.*'); @@ -342,7 +341,7 @@ Prado::using('System.Web.UI.ActiveControls.*');

    To indicate that the calculation is in progress, we can change the text of the "total" label as follows. We add a ClientSide.OnLoading property to the "Convert" button (since this button is responsible for requesting - the calculation). + the calculation).

    <com:TActiveButton Text="Convert" OnClick="convert_clicked" > @@ -380,7 +379,7 @@ Prado::using('System.Web.UI.ActiveControls.*');

    We simply create a CSS file named "common.css" and save it in the themes/Basic directory. Then we add the following code - to the beginning of "Home.page" (we add a little more HTML as well). + to the beginning of "Home.page" (we add a little more HTML as well).

    <%@ Theme="Basic" %> @@ -389,7 +388,7 @@ Prado::using('System.Web.UI.ActiveControls.*'); <com:THead Title="Currency Converter" /> - +

    The first line <%@ Theme="Basic" %> defines the theme to be used for this page. The diff --git a/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page index 00222bca..50759868 100755 --- a/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page +++ b/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page @@ -55,7 +55,6 @@ php prado/framework/prado-cli.php -c chat class Login extends TPage { } -?>

    Membangun Pengubah Kurs Sederhana

    Tutorial ini memperkenalkan kerangka kerja aplikasi web Prado dan mengajarkan Anda bagaimana untuk - membangun aplikasi web sederhana dalam beberapa langkah sederhana. Tutorial - ini menganggap bahwa Anda terbiasa dengan PHP dan Anda telah mengakses + membangun aplikasi web sederhana dalam beberapa langkah sederhana. Tutorial + ini menganggap bahwa Anda terbiasa dengan PHP dan Anda telah mengakses server web yang dapat melayani naskah PHP5.

    @@ -25,9 +25,9 @@

    Cara tercepat dan termudah untuk membuat aplikasi web Prado baru adalah menggunakan piranti perintah prado-cli.php yang ditemukan dalam direktori framework pada distribusi Prado. Kita membuat aplikasi baru dengan menjalankan perintah berikut dalam prompt perintah atau konsol Anda. Perintah membuat direktori baru bernama currency-converter dalam direktori kerja Anda saat ini. Anda perlu mengubahnya ke direktori yang benar terlebih dahulu. - Lihat Piranti Baris Perintah - untuk lebih jelasnya. -

    + Lihat Piranti Baris Perintah + untuk lebih jelasnya. +

    php prado/framework/prado-cli.php -c currency-converter @@ -39,7 +39,7 @@ php prado/framework/prado-cli.php -c currency-converter

    Membuat Antarmuka Pengguna Pengubah Kurs

    Kita mulai dengan mengedit file Home.page yang ditemukan dalam direktori currency-converter/protected/pages/. File yang berakhiran dengan ".page" adalah template halaman yang berisi HTML dan kontrol Prado. - Kita cukup menambah dua kotak teks, tiga label dan satu tombol seperti berikut. + Kita cukup menambah dua kotak teks, tiga label dan satu tombol seperti berikut.

    <com:TForm> @@ -62,7 +62,7 @@ php prado/framework/prado-cli.php -c currency-converter
    </com:TForm> -
    +

    Jika Anda menyegarkan halaman, Anda akan melihat sesuatu mirip dengan gambar berikut. Ia mungkin terlihat tidak cukup bagus atau berurut, tapi kita akan mengubahnya nanti dengan menggunakan CSS. @@ -82,7 +82,7 @@ php prado/framework/prado-cli.php -c currency-converter yang pada dasarnya mendefinisikan sebuah label dan kotak teks bagi pengguna aplikasi untuk memasukan nilai pertukaran kurs. - Nilai properti ForControl property menentukan komponen mana label + Nilai properti ForControl property menentukan komponen mana label diperuntukan. Ini membolehkan pengguna aplikasi mengklik pada label untuk memfokuskan pada field (hal yang baik). Anda mungkin telah menggunakan elemen biasa HTML <label> untuk melakukan hal yang sama, tapi @@ -109,7 +109,7 @@ php prado/framework/prado-cli.php -c currency-converter

    Jika Anda mencoba mengklik pada tombol "Convert" kemudian halaman akan menyegarkan dan tidak melakukan apapun. Agar tombol melakukan beberapa pekerjaan, kita perlu menambahkan "Home.php" ke di mana "Home.page" berada. Kelas Home harus - memperluas , basis kelas standar untuk semua halaman Prado. + memperluas , basis kelas standar untuk semua halaman Prado.

    <?php @@ -117,8 +117,7 @@ class Home extends TPage { } -?> - +

    Prado menggunakan metode PHP __autoload untuk mengambil kelas. Konvensi adalah untuk menggunakan nama kelas dengan ekstensi ".php" sebagai nama file. @@ -134,14 +133,14 @@ class Home extends TPage nilai dalam kotak teks, melakukan beberapa perhitungan dan menyajikan kepada pengguna dengan total nilai yang dikonversi. Untuk menangani pengguna mengklik pada tombo "Convert", kita cukup menambahkan sebuah properti OnClick ke tombol "Convert" dalam - template "Home.page" dan menambahkan metode pengendali event terkait dalam "Home.php". + template "Home.page" dan menambahkan metode pengendali event terkait dalam "Home.php".

    <com:TButton Text="Convert" OnClick="convert_clicked" /> -

    +

    Nilai dari OnClick, "convert_clicked", akan menjadi nama metode - dalam "Home.php" yang akan dipanggil saat pengguna mengklik tombol "Convert". + dalam "Home.php" yang akan dipanggil saat pengguna mengklik tombol "Convert".

    class Home extends TPage @@ -153,8 +152,8 @@ class Home extends TPage $this->total->Text = $rate * $dollars; } } - -
    + +

    Jika Anda menjalankan aplikasi dalam web browser Anda, masukkan beberapa nilai dan klik tombol "Convert" kemudian Anda akan melihat nilai yang dihitung ditampilkan @@ -168,24 +167,24 @@ class Home extends TPage

    Sekarang kita akan memeriksa, tiga baris yang mengimplementasikan konversi - kurs sederhana dalam metode "convert_clicked". -

    + kurs sederhana dalam metode "convert_clicked". +

    $rate = floatval($this->currencyRate->Text); - +

    Pernyataan $this->currencyRate berhubungan dengan komponen TTextBox dengan nilai ID "currencyRate" dalam template "Home.page". Properti Text dari TTextBox berisi nilai yang dimasukan oleh pengguna. Maka kita memperoleh nilai ini dengan $this->currencyRate->Text yang kita konversi nilainya ke nilai - pecahan. + pecahan.

    $dollars = floatval($this->dollars->Text); - -
    + +

    Baris berikutnya melakukan hal yang mirip, ia mengambil nilai pengguna dari TTextBox dengan nilai ID "dollars dang mengubahnya @@ -194,9 +193,9 @@ $dollars = floatval($this->dollars->Text);

    Baris ketiga menghitung jumlah baru dan menyetel nilai ini dalam properti Text dari TLabel dengan ID="total". - Selanjutnya, kita tampilkan jumlah baru ke pengguna dalam label. + Selanjutnya, kita tampilkan jumlah baru ke pengguna dalam label.

    -
    +
    $this->total->Text = $rate * $dollars; @@ -210,11 +209,11 @@ $this->total->Text = $rate * $dollars;
  • pengguna memasukan sebuah nilai,
  • kurs mata uang adalah angka yang benar,
  • kurs mata uang adalah positif.
  • - +

    Untuk memastikan poin 1 kita menambahkan satu . Untuk memastikan poin 2 dan 3, kita menambahkan satu . Kita dapat menambahkan validator ini di mana saja di dalam template "Home.page". Perincian selanjutnya mengenai validator ini dan validator lainnya dapat ditemukan dalam halaman - Validation Controls. + Validation Controls.

    <com:TRequiredFieldValidator @@ -232,11 +231,11 @@ $this->total->Text = $rate * $dollars;
    1. pengguna memasukan sebuah nilai,
    2. nilai adalah angka yang benar (tidak menyertakan tanda kurs atau dolar).
    3. -
    +

    Untuk memastikan 1 kita cukup menambahkan TRequiredFieldValidator lainnya, untuk 2 kita dapat menggunakan - . Untuk memudahkan kita hanya membolehkan pengguna untuk memasukan sebuah angka untuk jumlah yang ingin mereka ubah. + . Untuk memudahkan kita hanya membolehkan pengguna untuk memasukan sebuah angka untuk jumlah yang ingin mereka ubah.

    <com:TRequiredFieldValidator @@ -249,8 +248,8 @@ $this->total->Text = $rate * $dollars;

    -

    Sekarang jika Anda mencoba memasukan beberapa data tidak benar dalam aplikasi atau membiarkan field kosong - validators akan diaktifkan dan menyajikan pesan kesalahan kepada pengguna. Catatan bahwa pesan kesalahan disajikan tanpa mengambil ulang halaman. Validator Prado standarnya memvalidasi javascript dan di dalam server. Validasi di dalam server selalu dilakukan. Untuk sisi server, kita harus melewati perhitungan jika validator tidak memuaskan. Ini dapat dilakukan seperti berikut. +

    Sekarang jika Anda mencoba memasukan beberapa data tidak benar dalam aplikasi atau membiarkan field kosong + validators akan diaktifkan dan menyajikan pesan kesalahan kepada pengguna. Catatan bahwa pesan kesalahan disajikan tanpa mengambil ulang halaman. Validator Prado standarnya memvalidasi javascript dan di dalam server. Validasi di dalam server selalu dilakukan. Untuk sisi server, kita harus melewati perhitungan jika validator tidak memuaskan. Ini dapat dilakukan seperti berikut.

    public function convert_clicked($sender, $param) @@ -276,7 +275,7 @@ memperbaiki pengalaman pengguna dengan meningkatkan tanggapan aplikasi. Satu car , yang dapat memicu event klik di dalam server tanpa mengambil ulang halaman. Sebagai tambahan, kita dapat mengubah "total" TLabel dengan pasangan Kontrol Aktif, - , dengan demikian di dalam server dapat memutakhirkan browser tanpa mengambil ulang halaman. + , dengan demikian di dalam server dapat memutakhirkan browser tanpa mengambil ulang halaman.

    @@ -286,10 +285,10 @@ memperbaiki pengalaman pengguna dengan meningkatkan tanggapan aplikasi. Satu car
    <com:TActiveButton Text="Convert" OnClick="convert_clicked" />
    - +

    Logika di dalam server tetap sama, kita hanya perlu mengimpor - ruang nama Kontrol Aktif karena secara standar tidak disertakan. Kita menambahkan baris berikut ke awal "Home.php". + ruang nama Kontrol Aktif karena secara standar tidak disertakan. Kita menambahkan baris berikut ke awal "Home.php".

    Prado::using('System.Web.UI.ActiveControls.*'); @@ -300,7 +299,7 @@ Prado::using('System.Web.UI.ActiveControls.*'); Selanjutnya kita bisa memperbaiki pengalaman pengguna dengan mengunah label teks "total" menjadi "calculating..." saat pengguna mengklik tombol "Convert". Label teks "total" masih dimutakhirkan dengan jumlah perhitungan baru seperti sebelumnya.

    -

    Untuk mengindikasikan bahwa perhitungan sedang berlangsung, kita dapat mengubah label teks "total" sebagai berikut. Kita menambahkan properti ClientSide.OnLoading ke tombol "Convert" (karena tombol ini bertanggung jawab terhadap permintaan perhitungan). +

    Untuk mengindikasikan bahwa perhitungan sedang berlangsung, kita dapat mengubah label teks "total" sebagai berikut. Kita menambahkan properti ClientSide.OnLoading ke tombol "Convert" (karena tombol ini bertanggung jawab terhadap permintaan perhitungan).

    <com:TActiveButton Text="Convert" OnClick="convert_clicked" > @@ -325,7 +324,7 @@ Prado::using('System.Web.UI.ActiveControls.*');

    Kita cukup dengan membuat file CSS bernama "common.css" dan menyimpannya dalam direktori - themes/Basic. Kemudian kita menambahkan kode berikut ke awal "Home.page" (kita menambahkan sedikit kode HTML juga). + themes/Basic. Kemudian kita menambahkan kode berikut ke awal "Home.page" (kita menambahkan sedikit kode HTML juga).

    <%@ Theme="Basic" %> @@ -334,10 +333,10 @@ Prado::using('System.Web.UI.ActiveControls.*'); <com:THead Title="Currency Converter" /> - +

    Baris pertama <%@ Theme="Basic" %> mendefinisikan tema - yang dipakai untuk halaman ini. + yang dipakai untuk halaman ini. merujuk ke elemen HTML <head>. Sebagai tambahan terhadap tampilan properti Title pada THead, semua file CSS diff --git a/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page b/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page index 80a155cb..55d55c31 100755 --- a/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page +++ b/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page @@ -46,7 +46,6 @@ class PersonTest extends UnitTestCase $this->assertNotNull($person, "Person not returned"); } } -?>

    Well, the example sure looks easy enough! We ask a method to "select all", and @@ -54,7 +53,7 @@ it returns a list of person objects. But, what code do we need to write to pass this test?

    Note: - Save the PersonTest.php into a tests directory. + Save the PersonTest.php into a tests directory. The unit tests are written for the SimpleTest Unit Testing framework.
    @@ -74,7 +73,6 @@ error_reporting(E_ALL); $test = new GroupTest('All tests'); $test->addTestFile('Tests/PersonTest.php'); $test->run(new HtmlReporter()); -?>

    To run the tests, point your browser to the "run_test.php" script file @@ -108,7 +106,6 @@ class Person $this->_birthDate = $value; } } -?>

    OK, that was fun! The $this->assertXXX(...) methods are built into @@ -125,7 +122,7 @@ method executes our SQL statement (or stored procedure) and returns the result as a list. Each row in the result becomes an entry in the list. Along with queryForList(), there are also delete(), insert(), queryForObject(), queryForPagedList() and a few other methods in the -SQLMap API. +SQLMap API.

    Looking at unit test example, we see that the queryForList() method takes the name of the statement we want to run. OK. Easy enough. But where diff --git a/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page b/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page index 706b5220..b128c413 100755 --- a/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page +++ b/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page @@ -58,7 +58,6 @@ error_reporting(E_ALL); require_once('/path/to/prado/framework/prado.php'); $application=new TApplication; $application->run(); -?>

    Now we are ready to setup a page to display our list of people. @@ -106,7 +105,6 @@ class Home extends TPage $this->loadData(); } } -?>

    If we run this now, we'll get a list like the one shown the figure below.

    diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 2a8ae6ae..cc59292a 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -367,7 +367,6 @@ class TClientScriptManager extends TApplicationComponent * $this->Page->ClientScript->registerStyleSheetFile($url, $url); * } * } - * ?> * * * @param string a unique key identifying the file diff --git a/framework/pradolite.php b/framework/pradolite.php index d9627d13..dfe5e1d2 100644 --- a/framework/pradolite.php +++ b/framework/pradolite.php @@ -1248,7 +1248,7 @@ class TTextWriter extends TComponent implements ITextWriter $this->write($str."\n"); } } -class TPriorityList extends TList +class TPriorityList extends TList { private $_d=array(); private $_o=false; @@ -1483,7 +1483,7 @@ class TPriorityList extends TList foreach($this->_d as $priority=>$items) { if(($index=array_search($item,$items,true))!==false) { $absindex+=$index; - return $withindex?array($priority,$index,$absindex, + return $withindex?array($priority,$index,$absindex, 'priority'=>$priority,'index'=>$index,'absindex'=>$absindex):$priority; } else $absindex+=count($items); @@ -1500,7 +1500,7 @@ class TPriorityList extends TList if($index>=($c=count($items))) $index-=$c; else - return $withindex?array($priority,$index,$absindex, + return $withindex?array($priority,$index,$absindex, 'priority'=>$priority,'index'=>$index,'absindex'=>$absindex):$priority; } return false; @@ -3129,7 +3129,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar if($this->getEnableCache()) { $cache = $this->getApplication()->getCache(); - if($cache !== null) + if($cache !== null) { $dependencies = null; if($this->getApplication()->getMode() !== TApplicationMode::Performance) @@ -4524,7 +4524,7 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable const IS_DISABLE_THEMING=0x10; const IS_CHILD_CREATED=0x20; const IS_CREATING_CHILD=0x40; - const RF_CONTROLS=0; const RF_CHILD_STATE=1; const RF_NAMED_CONTROLS=2; const RF_NAMED_CONTROLS_ID=3; const RF_SKIN_ID=4; const RF_DATA_BINDINGS=5; const RF_EVENTS=6; const RF_CONTROLSTATE=7; const RF_NAMED_OBJECTS=8; const RF_ADAPTER=9; const RF_AUTO_BINDINGS=10; + const RF_CONTROLS=0; const RF_CHILD_STATE=1; const RF_NAMED_CONTROLS=2; const RF_NAMED_CONTROLS_ID=3; const RF_SKIN_ID=4; const RF_DATA_BINDINGS=5; const RF_EVENTS=6; const RF_CONTROLSTATE=7; const RF_NAMED_OBJECTS=8; const RF_ADAPTER=9; const RF_AUTO_BINDINGS=10; private $_id=''; private $_uid; private $_parent; @@ -6385,7 +6385,7 @@ class TWebControlDecorator extends TComponent { $this->_posttagtemplate = $value; } public function instantiate($outercontrol = null) { - if($this->getPreTagTemplate() || $this->getPreContentsTemplate() || + if($this->getPreTagTemplate() || $this->getPreContentsTemplate() || $this->getPostContentsTemplate() || $this->getPostTagTemplate()) { $this->_outercontrol = $outercontrol; if($this->getUseState()) @@ -6684,7 +6684,7 @@ class TWebControl extends TControl implements IStyleable $decorator->renderPostContentsText($writer); $writer->renderEndTag(); $decorator->renderPostTagText($writer); - } else + } else $writer->renderEndTag($writer); } } @@ -7306,7 +7306,7 @@ class TClientScriptManager extends TApplicationComponent if($str!=='') $writer->write("
    \n".$str."
    \n"); } - public function getHiddenFields() + public function getHiddenFields() { return $this->_hiddenFields; } @@ -9672,7 +9672,7 @@ class TPageConfiguration extends TComponent $this->loadFromPhp($fcontent,dirname($fname),$configPagePath); } else - { + { $dom=new TXmlDocument; if($dom->loadFromFile($fname)) $this->loadFromXml($dom,dirname($fname),$configPagePath); @@ -9759,7 +9759,7 @@ class TPageConfiguration extends TComponent if(isset($page['properties'])) { $properties=$page['properties']; - unset($page['properties']); + unset($page['properties']); } $matching=false; $id=($configPagePath==='')?$id:$configPagePath.'.'.$id; @@ -10173,7 +10173,7 @@ class TApplication extends TComponent const STATE_PERFORMANCE='Performance'; const PAGE_SERVICE_ID='page'; const CONFIG_FILE_XML='application.xml'; - const CONFIG_FILE_EXT_XML='.xml'; + const CONFIG_FILE_EXT_XML='.xml'; const CONFIG_TYPE_XML = 'xml'; const CONFIG_FILE_PHP='application.php'; const CONFIG_FILE_EXT_PHP='.php'; @@ -10822,7 +10822,7 @@ class TApplicationConfiguration extends TComponent $this->_properties[$name]=$value; } $this->_empty = false; - } + } if(isset($config['paths']) && is_array($config['paths'])) $this->loadPathsPhp($config['paths'],$configPath); if(isset($config['modules']) && is_array($config['modules'])) @@ -10946,7 +10946,7 @@ class TApplicationConfiguration extends TComponent $properties['id'] = $id; $this->_modules[$id]=array($type,$properties,$module); $this->_empty=false; - } + } } protected function loadModulesXml($modulesNode,$configPath) { @@ -10982,7 +10982,7 @@ class TApplicationConfiguration extends TComponent $properties['id'] = $id; $this->_services[$id] = array($type,$properties,$service); $this->_empty = false; - } + } } protected function loadServicesXml($servicesNode,$configPath) { @@ -11152,4 +11152,3 @@ class TShellApplication extends TApplication $this->initApplication(); } } -?> \ No newline at end of file diff --git a/requirements/index.php b/requirements/index.php index 58fb1ea3..2fd392ba 100644 --- a/requirements/index.php +++ b/requirements/index.php @@ -290,5 +290,3 @@ function getPradoVersion() } return ''; } - -?> \ No newline at end of file -- cgit v1.2.3