diff options
Diffstat (limited to 'demos/quickstart/protected/pages/GettingStarted/CommandLine.page')
-rw-r--r-- | demos/quickstart/protected/pages/GettingStarted/CommandLine.page | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page index 3619d3d9..9e919212 100644 --- a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page +++ b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page @@ -110,22 +110,22 @@ PostRecord#1 </com:TTextHighlighter>
</p>
-<h2>Creating Active Record Classes</h2>
-<p>
+<h2 id="18007">Creating Active Record Classes</h2>
+<p id="90001" class="block-content">
In the blog demo project, we need to create two <a href="?page=Database.ActiveRecord">Active Record</a> classes, <tt>UserRecord</tt> and <tt>PostRecord</tt>, to represent data records in the <tt>users</tt> and <tt>posts</tt> tables, respectively. Active Record classes must extend from the base class <tt>ActiveRecord</tt>, and must define property names that matches with the field names of the corresponding table.
</p>
-<p>
+<p id="90002" class="block-content">
To better organize our directories, we create a new directory <tt>protected/database</tt> to hold the class files. We also modify our application configuration by inserting the following lines. It is equivalent to adding the directory <tt>protected/database</tt> to PHP include_path, which allows us to use the classes without explicitly including them.
</p>
-<com:TTextHighlighter CssClass="source" Language="xml">
+<com:TTextHighlighter CssClass="source block-content" id="code_90016" Language="xml">
<paths>
<using namespace="Application.database.*" />
</paths>
</com:TTextHighlighter>
-<p>
+<p id="90003" class="block-content">
At the prompt, enter the following two commands to create <tt>UserRecord</tt> and <tt>PostRecord</tt> classes:
</p>
@@ -135,7 +135,7 @@ At the prompt, enter the following two commands to create <tt>UserRecord</tt> an >> generate posts Application.database.PostRecord
</com:TTextHighlighter>
-<p>
+<p id="90004" class="block-content">
Here we used the <a href="?page=Fundamentals.Components1">namespace format</a> again to specify the classes to be created. The path <tt>Application.database.UserRecord</tt> indicates that we want the <tt>UserRecord</tt> class file to be <tt>protected/database/UserRecord.php</tt>.
</p>
|