Changeset 2290 for tags/3.1.1

Show
Ignore:
Timestamp:
09/30/2007 08:10:04 PM (16 months ago)
Author:
xue
Message:

final fixes.

Location:
tags/3.1.1/demos
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • tags/3.1.1/demos/blog/protected/Common/BlogUserManager.php

    r1398 r2290  
    6969                        return false; 
    7070        } 
     71 
     72        /** 
     73         * Saves user auth data into a cookie. 
     74         * @param THttpCookie the cookie to receive the user auth data. 
     75         * @since 3.1.1 
     76         */ 
     77        public function saveUserToCookie($cookie) 
     78        { 
     79                // do nothing since we don't support cookie-based auth in this example 
     80        } 
     81 
     82        /** 
     83         * Returns a user instance according to auth data stored in a cookie. 
     84         * @param THttpCookie the cookie storing user authentication information 
     85         * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data. 
     86         * @since 3.1.1 
     87         */ 
     88        public function getUserFromCookie($cookie) 
     89        { 
     90                // do nothing since we don't support cookie-based auth in this example 
     91                return null; 
     92        } 
    7193} 
    7294 
  • tags/3.1.1/demos/chat/protected/App_Code/ChatUserManager.php

    r1596 r2290  
    1010                return 'Guest'; 
    1111        } 
    12          
     12 
    1313        /** 
    1414         * Returns a user instance given the user name. 
     
    1919        { 
    2020                $user=new TUser($this); 
    21                 $user->setIsGuest(true);                 
     21                $user->setIsGuest(true); 
    2222                if($username !== null) 
    2323                { 
     
    2828                return $user; 
    2929        } 
    30          
     30 
    3131        /** 
    3232         * Add a new user to the database. 
     
    5858                return $this->usernameExists($username); 
    5959        } 
     60 
     61        /** 
     62         * Saves user auth data into a cookie. 
     63         * @param THttpCookie the cookie to receive the user auth data. 
     64         * @since 3.1.1 
     65         */ 
     66        public function saveUserToCookie($cookie) 
     67        { 
     68                // do nothing since we don't support cookie-based auth in this example 
     69        } 
     70 
     71        /** 
     72         * Returns a user instance according to auth data stored in a cookie. 
     73         * @param THttpCookie the cookie storing user authentication information 
     74         * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data. 
     75         * @since 3.1.1 
     76         */ 
     77        public function getUserFromCookie($cookie) 
     78        { 
     79                // do nothing since we don't support cookie-based auth in this example 
     80                return null; 
     81        } 
    6082} 
    6183 
  • tags/3.1.1/demos/quickstart/protected/pages/Configurations/UrlMapping.page

    r2124 r2290  
    119119<p id="230234" class="block-content"> 
    120120A matching pattern is one whose <tt>ServiceID</tt> and <tt>ServiceParameter</tt> properties are the same as those passed to <tt>constructUrl()</tt> and whose named parameters are found in the GET variables. For example, <tt>constructUrl('Posts.ListPost',array('cat'=>2))</tt> will use the third pattern in the above example. 
    121 <p> 
     121<p id="250001" class="block-content"> 
    122122 
    123123<p id="230235" class="block-content"> 
  • tags/3.1.1/demos/quickstart/protected/pages/Controls/TabPanel.page

    r2075 r2290  
    11<com:TContent ID="body" > 
    22 
    3 <h1>TTabPanel</h1> 
     3<h1 id="106002">TTabPanel</h1> 
    44<com:DocLink ClassPath="System.Web.UI.WebControls.TTabPanel" /> 
    55 
    6 <p> 
     6<p id="530002" class="block-content"> 
    77<tt>TTabPanel</tt> 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. 
    88</p> 
    99 
    10 <p> 
     10<p id="530003" class="block-content"> 
    1111A <tt>TTabPanel</tt> control consists of one or several <tt>TTabView</tt> 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: 
    1212</p> 
     
    1818</ul> 
    1919 
    20 <p> 
     20<p id="530004" class="block-content"> 
    2121If both <tt>ActiveViewIndex</tt> and <tt>ActiveViewID</tt> are set, the latter takes precedence. 
    2222</p> 
    2323 
    24 <p> 
     24<p id="530005" class="block-content"> 
    2525<tt>TTabPanel</tt> 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 <tt>TTabPanel</tt>. You may also use your own CSS file by specifying the <tt>CssUrl</tt> property. The following properties specify the CSS classes used for elements in a <tt>TTabPanel</tt>: 
    2626</p> 
     
    3333</ul> 
    3434 
    35 <p> 
     35<p id="530006" class="block-content"> 
    3636To use TTabPanel, write a template like following: 
    3737</p> 
    3838 
    39 <com:TTextHighlighter Language="prado" CssClass="source"> 
     39<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_530114"> 
    4040 &lt;com:TTabPanel> 
    4141   &lt;com:TTabView Caption="View 1"> 
  • tags/3.1.1/demos/quickstart/protected/pages/Database/ActiveRecord.page

    r2274 r2290  
    5151        <li>Lazy loading of relationships.</li> 
    5252    </ul> 
    53 <h2>Design Implications</h2> 
    54 <p> 
     53<h2 id="144003">Design Implications</h2> 
     54<p id="720007" class="block-content"> 
    5555Prado's implementation of Active Record does not maintain referential identity. Each object obtained using 
    5656Active Record is a copy of the data in the database. For example, If you ask for 
     
    5959comparison (i.e., using <tt>===</tt>) will return false, while loose comparison (i.e., using <tt>==</tt>) will 
    6060return true if the object values are equal by loose comparison. 
    61 <p> 
    62 <p> 
     61<p id="720008" class="block-content"> 
     62<p id="720009" class="block-content"> 
    6363This is design implication related to the following question. 
    6464<i>"Do you think of the customer as an object, of which there's only one, 
     
    10601060</p> 
    10611061 
    1062 <h2>Column Mapping</h2> 
    1063 <p> 
     1062<h2 id="144004">Column Mapping</h2> 
     1063<p id="720010" class="block-content"> 
    10641064Since v3.1.1, Active Record starts to support column mapping. Column mapping allows developers 
    10651065to address columns in Active Record using a more consistent naming convention. In particular, 
     
    10671067the name defined in the database schema. 
    10681068</p> 
    1069 <p> 
     1069<p id="720011" class="block-content"> 
    10701070To use column mapping, declare a static array named <tt>COLUMN_MAPPING</tt> in the Active Record class. 
    10711071The keys of the array are column names (called <i>physical column names</i>) as defined in the database 
     
    10941094} 
    10951095</com:TTextHighlighter> 
    1096 <p> 
     1096<p id="720012" class="block-content"> 
    10971097With the above column mapping, we can address <tt>first_name</tt> using <tt>$userRecord->firstName</tt> 
    10981098instead of <tt>$userRecord->first_name</tt>. This helps separation of logic and model. 
  • tags/3.1.1/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page

    r2261 r2290  
    77</p> 
    88 
    9 <h2>Version 3.1.1</h2> 
     9<h2 id="8001">Version 3.1.1</h2> 
    1010<ul> 
    1111<li>Added a new control <a href="?page=Controls.TabPanel">TTabPanel</a> that displays tabbed views.</li> 
  • tags/3.1.1/demos/time-tracker/protected/App_Code/UserManager.php

    r1400 r2290  
    2828                return 'Guest'; 
    2929        } 
    30          
     30 
    3131        /** 
    3232         * Returns a user instance given the user name. 
     
    5151                } 
    5252        } 
    53          
     53 
    5454        /** 
    5555         * Validates if the username and password are correct. 
     
    6464                return $userDao->validateUser($username, $password); 
    6565        } 
     66 
     67        /** 
     68         * Saves user auth data into a cookie. 
     69         * @param THttpCookie the cookie to receive the user auth data. 
     70         * @since 3.1.1 
     71         */ 
     72        public function saveUserToCookie($cookie) 
     73        { 
     74                // do nothing since we don't support cookie-based auth in this example 
     75        } 
     76 
     77        /** 
     78         * Returns a user instance according to auth data stored in a cookie. 
     79         * @param THttpCookie the cookie storing user authentication information 
     80         * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data. 
     81         * @since 3.1.1 
     82         */ 
     83        public function getUserFromCookie($cookie) 
     84        { 
     85                // do nothing since we don't support cookie-based auth in this example 
     86                return null; 
     87        } 
    6688} 
    6789