From 7a9626af3bef5c712901597065745d9572c3f097 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 27 Feb 2007 23:48:49 +0000 Subject: BC: Deprecate TActiveRecord::getRecordFinder() in favour of TActiveRecord::finder(). --- .../protected/controls/Comments/CommentBlock.php | 4 +-- .../protected/pages/Database/ActiveRecord.page | 6 ++-- .../protected/pages/Database/SqlMap.page | 4 +-- .../pages/GettingStarted/Introduction.page | 39 ++++++++++++++++++++++ .../protected/pages/Tutorial/AjaxChat.page | 8 ++--- .../protected/pages/Tutorial/fr/AjaxChat.page | 8 ++--- 6 files changed, 54 insertions(+), 15 deletions(-) (limited to 'demos/quickstart/protected') diff --git a/demos/quickstart/protected/controls/Comments/CommentBlock.php b/demos/quickstart/protected/controls/Comments/CommentBlock.php index f2f6e9a1..b0f23d47 100644 --- a/demos/quickstart/protected/controls/Comments/CommentBlock.php +++ b/demos/quickstart/protected/controls/Comments/CommentBlock.php @@ -19,9 +19,9 @@ class CommentRecord extends TActiveRecord public static $_tablename='qs_comments'; - public static function finder() + public static function finder($className=__CLASS__) { - return self::getRecordFinder('CommentRecord'); + return parent::finder($className); } } diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page index 2562f674..041a1126 100644 --- a/demos/quickstart/protected/pages/Database/ActiveRecord.page +++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page @@ -81,9 +81,9 @@ class UserRecord extends TActiveRecord /** * @return TActiveRecord active record finder instance */ - public static function finder() + public static function finder($className=__CLASS__) { - return self::getRecordFinder('UserRecord'); + return parent::finder($className); } } @@ -129,7 +129,7 @@ will raise an exception.

The static method finder() returns an UserRecord instance that can be used to load records from the database. The loading of records - using the finer methods is discuss a little later. The TActiveRecord::getRecordFinder() + using the finer methods is discuss a little later. The TActiveRecord::finder() static method takes the name of the current Active Record class as parameter.

diff --git a/demos/quickstart/protected/pages/Database/SqlMap.page b/demos/quickstart/protected/pages/Database/SqlMap.page index ce9e979e..c8ced852 100644 --- a/demos/quickstart/protected/pages/Database/SqlMap.page +++ b/demos/quickstart/protected/pages/Database/SqlMap.page @@ -221,9 +221,9 @@ class UserRecord extends TActiveRecord /** * @return TActiveRecord active record finder instance */ - public static function finder() + public static function finder($className=__CLASS__) { - return self::getRecordFinder('UserRecord'); + return parent::finder($className); } } diff --git a/demos/quickstart/protected/pages/GettingStarted/Introduction.page b/demos/quickstart/protected/pages/GettingStarted/Introduction.page index 87a54f0b..0871921a 100644 --- a/demos/quickstart/protected/pages/GettingStarted/Introduction.page +++ b/demos/quickstart/protected/pages/GettingStarted/Introduction.page @@ -4,6 +4,45 @@

This Quickstart tutorial is provided to help you quickly start building your own Web applications based on PRADO version 3.x.

+
+
+

How Prado Works

+

Concepts and fundamentals

+
    +
  1. Building web applications with Prado
  2. +
  3. Web controls and events
  4. +
  5. Validating user input
  6. +
  7. Connecting to your database
  8. +
  9. Displaying data from database
  10. +
+
+
+

Examples and Demos

+ +

More examples in Standard Controls, + Validation Controls and + Data Controls. +

+ +
+

Tutorials and Help

+ +
+
+ +

You may refer to the following resources if you find this tutorial does not fulfill all your needs.

diff --git a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page index 730ebab6..7d978a12 100644 --- a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page +++ b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page @@ -173,9 +173,9 @@ class ChatUserRecord extends TActiveRecord public static $_tablename='chat_users'; - public static function finder() + public static function finder($className=__CLASS__) { - return parent::getRecordFinder('ChatUserRecord'); + return parent::finder($className); } } @@ -522,9 +522,9 @@ class ChatBufferRecord extends TActiveRecord $this->_created_on = $value; } - public static function finder() + public static function finder($className=__CLASS__) { - return parent::getRecordFinder('ChatBufferRecord'); + return parent::finder($className); } } diff --git a/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page index fc1997c8..7bc36d5f 100644 --- a/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page +++ b/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page @@ -173,9 +173,9 @@ class ChatUserRecord extends TActiveRecord public static $_tablename='chat_users'; - public static function finder() + public static function finder($className=__CLASS__) { - return parent::getRecordFinder('ChatUserRecord'); + return parent::finder($className); } } @@ -522,9 +522,9 @@ class ChatBufferRecord extends TActiveRecord $this->_created_on = $value; } - public static function finder() + public static function finder($className=__CLASS__) { - return parent::getRecordFinder('ChatBufferRecord'); + return parent::finder($className); } } -- cgit v1.2.3