Changeset 2290
- Timestamp:
- 09/30/2007 08:10:04 PM (13 months ago)
- Location:
- tags/3.1.1/demos
- Files:
-
- 7 modified
-
blog/protected/Common/BlogUserManager.php (modified) (1 diff)
-
chat/protected/App_Code/ChatUserManager.php (modified) (4 diffs)
-
quickstart/protected/pages/Configurations/UrlMapping.page (modified) (1 diff)
-
quickstart/protected/pages/Controls/TabPanel.page (modified) (3 diffs)
-
quickstart/protected/pages/Database/ActiveRecord.page (modified) (5 diffs)
-
quickstart/protected/pages/GettingStarted/NewFeatures.page (modified) (1 diff)
-
time-tracker/protected/App_Code/UserManager.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/3.1.1/demos/blog/protected/Common/BlogUserManager.php
r1398 r2290 69 69 return false; 70 70 } 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 } 71 93 } 72 94 -
tags/3.1.1/demos/chat/protected/App_Code/ChatUserManager.php
r1596 r2290 10 10 return 'Guest'; 11 11 } 12 12 13 13 /** 14 14 * Returns a user instance given the user name. … … 19 19 { 20 20 $user=new TUser($this); 21 $user->setIsGuest(true); 21 $user->setIsGuest(true); 22 22 if($username !== null) 23 23 { … … 28 28 return $user; 29 29 } 30 30 31 31 /** 32 32 * Add a new user to the database. … … 58 58 return $this->usernameExists($username); 59 59 } 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 } 60 82 } 61 83 -
tags/3.1.1/demos/quickstart/protected/pages/Configurations/UrlMapping.page
r2124 r2290 119 119 <p id="230234" class="block-content"> 120 120 A 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"> 122 122 123 123 <p id="230235" class="block-content"> -
tags/3.1.1/demos/quickstart/protected/pages/Controls/TabPanel.page
r2075 r2290 1 1 <com:TContent ID="body" > 2 2 3 <h1 >TTabPanel</h1>3 <h1 id="106002">TTabPanel</h1> 4 4 <com:DocLink ClassPath="System.Web.UI.WebControls.TTabPanel" /> 5 5 6 <p >6 <p id="530002" class="block-content"> 7 7 <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. 8 8 </p> 9 9 10 <p >10 <p id="530003" class="block-content"> 11 11 A <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: 12 12 </p> … … 18 18 </ul> 19 19 20 <p >20 <p id="530004" class="block-content"> 21 21 If both <tt>ActiveViewIndex</tt> and <tt>ActiveViewID</tt> are set, the latter takes precedence. 22 22 </p> 23 23 24 <p >24 <p id="530005" class="block-content"> 25 25 <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>: 26 26 </p> … … 33 33 </ul> 34 34 35 <p >35 <p id="530006" class="block-content"> 36 36 To use TTabPanel, write a template like following: 37 37 </p> 38 38 39 <com:TTextHighlighter Language="prado" CssClass="source ">39 <com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_530114"> 40 40 <com:TTabPanel> 41 41 <com:TTabView Caption="View 1"> -
tags/3.1.1/demos/quickstart/protected/pages/Database/ActiveRecord.page
r2274 r2290 51 51 <li>Lazy loading of relationships.</li> 52 52 </ul> 53 <h2 >Design Implications</h2>54 <p >53 <h2 id="144003">Design Implications</h2> 54 <p id="720007" class="block-content"> 55 55 Prado's implementation of Active Record does not maintain referential identity. Each object obtained using 56 56 Active Record is a copy of the data in the database. For example, If you ask for … … 59 59 comparison (i.e., using <tt>===</tt>) will return false, while loose comparison (i.e., using <tt>==</tt>) will 60 60 return 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"> 63 63 This is design implication related to the following question. 64 64 <i>"Do you think of the customer as an object, of which there's only one, … … 1060 1060 </p> 1061 1061 1062 <h2 >Column Mapping</h2>1063 <p >1062 <h2 id="144004">Column Mapping</h2> 1063 <p id="720010" class="block-content"> 1064 1064 Since v3.1.1, Active Record starts to support column mapping. Column mapping allows developers 1065 1065 to address columns in Active Record using a more consistent naming convention. In particular, … … 1067 1067 the name defined in the database schema. 1068 1068 </p> 1069 <p >1069 <p id="720011" class="block-content"> 1070 1070 To use column mapping, declare a static array named <tt>COLUMN_MAPPING</tt> in the Active Record class. 1071 1071 The keys of the array are column names (called <i>physical column names</i>) as defined in the database … … 1094 1094 } 1095 1095 </com:TTextHighlighter> 1096 <p >1096 <p id="720012" class="block-content"> 1097 1097 With the above column mapping, we can address <tt>first_name</tt> using <tt>$userRecord->firstName</tt> 1098 1098 instead 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 7 7 </p> 8 8 9 <h2 >Version 3.1.1</h2>9 <h2 id="8001">Version 3.1.1</h2> 10 10 <ul> 11 11 <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 28 28 return 'Guest'; 29 29 } 30 30 31 31 /** 32 32 * Returns a user instance given the user name. … … 51 51 } 52 52 } 53 53 54 54 /** 55 55 * Validates if the username and password are correct. … … 64 64 return $userDao->validateUser($username, $password); 65 65 } 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 } 66 88 } 67 89
