[pLog-svn] r1475 - in plog/trunk/class/dao: . customfields status
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon Mar 14 23:49:19 GMT 2005
Author: oscar
Date: 2005-03-14 23:49:19 +0000 (Mon, 14 Mar 2005)
New Revision: 1475
Modified:
plog/trunk/class/dao/archivelink.class.php
plog/trunk/class/dao/article.class.php
plog/trunk/class/dao/articlecategories.class.php
plog/trunk/class/dao/articlecategory.class.php
plog/trunk/class/dao/articlecomments.class.php
plog/trunk/class/dao/articlecommentstatus.class.php
plog/trunk/class/dao/articlenotification.class.php
plog/trunk/class/dao/articlenotifications.class.php
plog/trunk/class/dao/articles.class.php
plog/trunk/class/dao/articlestatus.class.php
plog/trunk/class/dao/bayesianfilterinfo.class.php
plog/trunk/class/dao/bayesianfilterinfos.class.php
plog/trunk/class/dao/bayesiantoken.class.php
plog/trunk/class/dao/bayesiantokens.class.php
plog/trunk/class/dao/bloginfo.class.php
plog/trunk/class/dao/blogs.class.php
plog/trunk/class/dao/blogsettings.class.php
plog/trunk/class/dao/blogstatus.class.php
plog/trunk/class/dao/customfields/customfield.class.php
plog/trunk/class/dao/customfields/customfieldcheckboxvalue.class.php
plog/trunk/class/dao/customfields/customfielddatevalue.class.php
plog/trunk/class/dao/customfields/customfields.class.php
plog/trunk/class/dao/customfields/customfieldsvalues.class.php
plog/trunk/class/dao/customfields/customfieldvalue.class.php
plog/trunk/class/dao/customfields/customfieldvaluefactory.class.php
plog/trunk/class/dao/model.class.php
plog/trunk/class/dao/mylink.class.php
plog/trunk/class/dao/mylinks.class.php
plog/trunk/class/dao/mylinkscategories.class.php
plog/trunk/class/dao/mylinkscategory.class.php
plog/trunk/class/dao/referer.class.php
plog/trunk/class/dao/referers.class.php
plog/trunk/class/dao/searchengine.class.php
plog/trunk/class/dao/searchresult.class.php
plog/trunk/class/dao/sitestatistics.class.php
plog/trunk/class/dao/status/genericstatuslist.class.php
plog/trunk/class/dao/trackback.class.php
plog/trunk/class/dao/trackbackclient.class.php
plog/trunk/class/dao/trackbacks.class.php
plog/trunk/class/dao/usercomment.class.php
plog/trunk/class/dao/userinfo.class.php
plog/trunk/class/dao/userpermission.class.php
plog/trunk/class/dao/userpermissions.class.php
plog/trunk/class/dao/users.class.php
plog/trunk/class/dao/userstatus.class.php
Log:
some more documentation process going on...
Modified: plog/trunk/class/dao/archivelink.class.php
===================================================================
--- plog/trunk/class/dao/archivelink.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/archivelink.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,15 +1,13 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/mylink.class.php" );
/**
* used for the archive links, it extends it adding an additional method to fetch
* the number of posts in that month
+ *
+ * @private
+ * \ingroup DAO
*/
class ArchiveLink extends MyLink
{
Modified: plog/trunk/class/dao/article.class.php
===================================================================
--- plog/trunk/class/dao/article.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/article.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH.'class/dao/articles.class.php' );
include_once( PLOG_CLASS_PATH.'class/object/object.class.php' );
include_once( PLOG_CLASS_PATH.'class/data/timestamp.class.php' );
@@ -20,6 +15,7 @@
define( 'POST_EXTENDED_TEXT_MODIFIER', '[@more@]' );
/**
+ * \ingroup DAO
* This class represents an article from the database, and provides methods to access all its objects.
*/
class Article extends Object
Modified: plog/trunk/class/dao/articlecategories.class.php
===================================================================
--- plog/trunk/class/dao/articlecategories.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlecategories.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,15 +1,10 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/articlecategory.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
- /**
+ /*
* different modes in which the listing of categories can be obtained
*/
define( "BLOG_CATEGORIES_DEFAULT_ORDER", 0 );
@@ -21,7 +16,10 @@
define( "BLOG_CATEGORIES_MOST_ARTICLES_FIRST", 6 );
/**
- * Model for the article categories
+ * \ingroup
+ *
+ * Implementation of the database logic for dealing with article categories. This class offers all the most
+ * common methods: getCategory, addCategory, deleteCategory, etc.
*/
class ArticleCategories extends Model
{
@@ -104,6 +102,8 @@
/**
* Returns all the categories in the database
*
+ * @param onlyInMainPage Whether we should return only the categories that are meant to appear in the
+ * main page. Disabled by default.
* @return An array containing <b>all</b> the categories from the database.
*/
function getAllCategories( $onlyInMainPage = false )
@@ -264,6 +264,7 @@
*
* @param query_result Resulting resource of executing a query
* @return Returns an ArticleCategory object
+ * @private
*/
function _fillCategoryInformation( $query_result )
{
@@ -285,6 +286,7 @@
* @param category A Category object with all the information needed to add it
* to the database
* @return False if error or the article category identifier if successful.
+ * @see Category
*/
function addArticleCategory( $articleCategory )
{
@@ -312,6 +314,8 @@
* Returns how many articles have been classified under this category
*
* @param categoryId The identifier of that category.
+ * @param status The status that posts of that category should have. If none specified,
+ * POST_STATUS_PUBLISHED will be used.
* @return The number of articles, or 0 if none.
*/
function getNumArticlesCategory( $categoryId, $status = POST_STATUS_PUBLISHED )
Modified: plog/trunk/class/dao/articlecategory.class.php
===================================================================
--- plog/trunk/class/dao/articlecategory.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlecategory.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,15 +1,10 @@
<?php
- /**
- * @package dao
- */
-
- // Category.php
- // Encapsulates a category from the db
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
/**
+ * \ingroup DAO
+ *
* Represents a category. Every post belongs to exactly one category, but categories
* are also passed to the template as an array, so that they can be displayed
* in a column... or something :)
Modified: plog/trunk/class/dao/articlecomments.class.php
===================================================================
--- plog/trunk/class/dao/articlecomments.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlecomments.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
@@ -13,6 +8,8 @@
define( "COMMENT_ORDER_NEWEST_FIRST", 2 );
/**
+ * \ingroup DAO
+ *
* Model for the comments each article can have
*/
class ArticleComments extends Model
Modified: plog/trunk/class/dao/articlecommentstatus.class.php
===================================================================
--- plog/trunk/class/dao/articlecommentstatus.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlecommentstatus.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,21 +1,17 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
- /**
- * different statuses that a comments can have. Works in exactly the same way as the
- * ArticleStatus class.
- *
- */
define( "COMMENT_STATUS_ALL", -1, true );
define( "COMMENT_STATUS_NONSPAM", 0, true );
define( "COMMENT_STATUS_SPAM", 1, true );
-
+
+ /**
+ * This class keeps track of all the possible status that a blog can have. If plugins dynamically
+ * register new blog statuses, this class will still be able to handle them
+ *
+ * \ingroup DAO
+ */
class ArticleCommentStatus extends GenericStatusList
{
Modified: plog/trunk/class/dao/articlenotification.class.php
===================================================================
--- plog/trunk/class/dao/articlenotification.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlenotification.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,13 +1,9 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
/**
+ * \ingroup DAO
* There is a feature where the owner of a post (or all the users who belong
* to that blog) can receive an email whenever a new comment is added. This class
* represents a notification.
Modified: plog/trunk/class/dao/articlenotifications.class.php
===================================================================
--- plog/trunk/class/dao/articlenotifications.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlenotifications.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/articlenotification.class.php" );
include_once( PLOG_CLASS_PATH."class/mail/emailmessage.class.php" );
@@ -16,9 +11,11 @@
define( "EMAILNOTIFIER_TEMPLATE", "email_notifier" );
/**
+ * \ingroup DAO
* Accesses the database to create and fetch article notifications.
*/
- class ArticleNotifications extends Model {
+ class ArticleNotifications extends Model
+ {
var $_config;
Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articles.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH.'class/dao/model.class.php' );
include_once( PLOG_CLASS_PATH.'class/dao/article.class.php' );
include_once( PLOG_CLASS_PATH.'class/dao/articlecategories.class.php' );
@@ -23,6 +18,8 @@
include_once( PLOG_CLASS_PATH.'class/logger/LogUtil.php' );
/**
+ * \ingroup DAO
+ *
* Model for the Articles
*/
class Articles extends Model
Modified: plog/trunk/class/dao/articlestatus.class.php
===================================================================
--- plog/trunk/class/dao/articlestatus.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/articlestatus.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,21 +1,24 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
- /**
- * different statuses that a post can have. These are the default status.
- *
- */
define( "POST_STATUS_ALL", -1, true );
define( "POST_STATUS_PUBLISHED", 1, true );
define( "POST_STATUS_DRAFT", 2, true );
define( "POST_STATUS_DELETED", 3, true );
+ /**
+ * This class keeps track of all the possible status that an article can have. If plugins dynamically
+ * register new article statuses, this class will still be able to handle them.
+ *
+ * These are the out of the box statues for posts:
+ *
+ * - POST_STATUS_PUBLISHED
+ * - POST_STATUS_DRAFT
+ * - POST_STATUS_DELETED
+ *
+ * \ingroup DAO
+ */
class ArticleStatus extends GenericStatusList
{
Modified: plog/trunk/class/dao/bayesianfilterinfo.class.php
===================================================================
--- plog/trunk/class/dao/bayesianfilterinfo.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/bayesianfilterinfo.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,13 +1,9 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
/**
+ * \ingroup DAO
* Represents a record form the plog_filtered_content table
*
* The key of this class is the regexp that will be used to match
Modified: plog/trunk/class/dao/bayesianfilterinfos.class.php
===================================================================
--- plog/trunk/class/dao/bayesianfilterinfos.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/bayesianfilterinfos.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,17 +1,15 @@
<?php
-
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/bayesianfilterinfo.class.php" );
/**
+ * \ingroup DAO
+ *
* Takes care of dealing with fetching filtered contents from the database
*/
- class BayesianFilterInfos extends Model {
+ class BayesianFilterInfos extends Model
+ {
/**
* -- Add function info here --
Modified: plog/trunk/class/dao/bayesiantoken.class.php
===================================================================
--- plog/trunk/class/dao/bayesiantoken.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/bayesiantoken.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
define("TOKEN_DEFAULT_PROBABILITY", 0.4);
@@ -17,6 +12,8 @@
define("TOKEN_USER_URL_MARK", "UserUrl" . TOKEN_SEPARATOR_MARK);
/**
+ * \ingroup DAO
+ *
* Represents a record form the plog_filtered_content table
*
* The key of this class is the regexp that will be used to match
Modified: plog/trunk/class/dao/bayesiantokens.class.php
===================================================================
--- plog/trunk/class/dao/bayesiantokens.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/bayesiantokens.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,17 +1,14 @@
<?php
-
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/bayesiantoken.class.php" );
/**
* Takes care of dealing with fetching filtered contents from the database
+ * \ingroup DAO
*/
- class BayesianTokens extends Model {
+ class BayesianTokens extends Model
+ {
function BayesianTokens()
{
Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/bloginfo.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,18 +1,17 @@
<?php
- /**
- * @package dao
- */
-
- include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/blogsettings.class.php" );
- include_once( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
- include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
- include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
-
- /**
+ include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/blogsettings.class.php" );
+ include_once( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
+
+ /**
+ * \ingroup DAO
+ *
+ * This is the representation of a blog. It contains all the information we need to know,
* This is the representation of a blog. It contains all the information we need to know,
* such as the name of the blog, the owner, description, etc.
*/
Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/blogs.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
@@ -20,6 +15,7 @@
include_once( PLOG_CLASS_PATH."class/dao/blogstatus.class.php" );
/**
+ * \ingroup DAO
* Model for the Blogs
*/
class Blogs extends Model
Modified: plog/trunk/class/dao/blogsettings.class.php
===================================================================
--- plog/trunk/class/dao/blogsettings.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/blogsettings.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,9 +1,5 @@
<?php
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/config/properties.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
@@ -13,6 +9,8 @@
define( "DEFAULT_TIME_OFFSET", 0 );
/**
+ * \ingroup DAO
+ *
* Encapsulation of the settings for each blog
*
* Default settings available from this object:
Modified: plog/trunk/class/dao/blogstatus.class.php
===================================================================
--- plog/trunk/class/dao/blogstatus.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/blogstatus.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,21 +1,18 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
- /**
- * different statuses that a blog can have. These are the default status.
- *
- */
define( "BLOG_STATUS_ALL", -1, true );
define( "BLOG_STATUS_ACTIVE", 1, true );
define( "BLOG_STATUS_DISABLED", 2, true );
define( "BLOG_STATUS_UNCONFIRMED", 3, true );
-
+
+ /**
+ * This class keeps track of all the possible status that a blog can have. If plugins dynamically
+ * register new blog statuses, this class will still be able to handle them
+ *
+ * \ingroup DAO
+ */
class BlogStatus extends GenericStatusList
{
Modified: plog/trunk/class/dao/customfields/customfield.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfield.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfield.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,15 +1,12 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
/**
* Defines a custom field
+ *
+ * \ingroup DAO
*/
class CustomField extends DbObject
{
Modified: plog/trunk/class/dao/customfields/customfieldcheckboxvalue.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfieldcheckboxvalue.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfieldcheckboxvalue.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -5,6 +5,8 @@
/**
* offers methods for dealing with checkboxes
+ *
+ * \ingroup DAO
*/
class CustomFieldCheckboxValue extends CustomFieldValue
{
Modified: plog/trunk/class/dao/customfields/customfielddatevalue.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfielddatevalue.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfielddatevalue.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -5,6 +5,8 @@
/**
* offers methods for dealing with custom fields that represent dates
+ *
+ * \ingroup DAO
*/
class CustomFieldDateValue extends CustomFieldValue
{
Modified: plog/trunk/class/dao/customfields/customfields.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfields.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfields.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,16 +1,13 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/customfields/customfield.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/customfields/customfieldsvalues.class.php" );
/**
* different custom field types available
+ *
+ * \ingroup DAO
*/
define( "CUSTOM_FIELD_TEXTBOX", 1 );
define( "CUSTOM_FIELD_TEXTAREA", 2 );
Modified: plog/trunk/class/dao/customfields/customfieldsvalues.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfieldsvalues.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfieldsvalues.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,17 +1,14 @@
<?php
- /**
- * @package dao
- */
-
-
- include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/customfields/customfields.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/customfields/customfieldvaluefactory.class.php" );
/**
* Model for the values given to certain custom fields
+ *
+ * \ingroup DAO
*/
class CustomFieldsValues extends Model
{
Modified: plog/trunk/class/dao/customfields/customfieldvalue.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfieldvalue.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfieldvalue.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,13 +1,11 @@
<?php
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/dao/customfields/customfield.class.php" );
/**
* Defines a value assigned to a custom field
+ *
+ * \ingroup DAO
*/
class CustomFieldValue extends CustomField
{
Modified: plog/trunk/class/dao/customfields/customfieldvaluefactory.class.php
===================================================================
--- plog/trunk/class/dao/customfields/customfieldvaluefactory.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/customfields/customfieldvaluefactory.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -7,6 +7,8 @@
/**
* Generates the right CustomFieldValue (or subclass of it)
+ *
+ * \ingroup DAO
*/
class CustomFieldValueFactory extends Object
{
Modified: plog/trunk/class/dao/model.class.php
===================================================================
--- plog/trunk/class/dao/model.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/model.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,34 @@
<?php
/**
- * @package dao
- */
+ * \defgroup DAO
+ *
+ * DAO stands for "Data Access Object" and represents a data model according to the MVC architecture.
+ *
+ * DAO classes isolate developers of all the intricacies of the database structure, so that for example
+ * loading a post from the dabase is as easy as:
+ *
+ * <pre>
+ * $articles = new Articles();
+ * $userPost = $arcticles->getBlogArticle( 15 );
+ * </pre>
+ *
+ * Otherwise, developers would need to write an SQL query every time we need to load an article from the database. In
+ * general, DAO classes provide access to reading, updating and removing data from the database. In pLog, we usually
+ * have two classes per entity: a smaller one that contains no database access logic and that only contains the
+ * information necessary (usually, it represents a row from the database), and the second will be a bigger
+ * class that includes SQL code and database logic and that provides all the methods outlined above (read, update
+ * and remove from the database) Examples of this are Articles and Article, or Users and UserInfo.
+ *
+ * Other relevant DAO classes are ArticleComments and UserComment, MyLink and MyLinks, etc.
+ *
+ * All classes that extend the base Model class, automatically inherit an open connection to the database
+ * (via the private attribute Model::_db) and several other database-related methods.
+ *
+ * If you need to implement some kind of data access, please extend from Model.
+ *
+ */
-
include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
@@ -29,12 +53,11 @@
*/
define( "DEFAULT_PAGING_ENABLED", -1 );
- /**
- * Represents a data model according to the MVC architecture.
- *
- * This class provides all the classes extending it with a database
- * connection so that classes don't have to worry about that. Later on, the Model
- * classes will be used by the corresponding action object.
+ /**
+ * \ingroup DAO
+ *
+ * This class provides all the classes extending it with a database connection so that classes don't have to
+ * worry about that. Later on, the Model classes will be used by the corresponding action object.
*/
class Model extends Object
{
Modified: plog/trunk/class/dao/mylink.class.php
===================================================================
--- plog/trunk/class/dao/mylink.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/mylink.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,13 +1,11 @@
<?php
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/mylinkscategory.class.php" );
/**
+ * \ingroup DAO
+ *
* Represents one of the links that can be created for each blog. The basic information this
* object holds is the description, the name, the url and the link category to which they belong.
*/
Modified: plog/trunk/class/dao/mylinks.class.php
===================================================================
--- plog/trunk/class/dao/mylinks.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/mylinks.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,15 +1,12 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/mylink.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
/**
+ * \ingroup DAO
+ *
* Model for the myLinks feature
*/
class MyLinks extends Model
Modified: plog/trunk/class/dao/mylinkscategories.class.php
===================================================================
--- plog/trunk/class/dao/mylinkscategories.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/mylinkscategories.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/mylinkscategory.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/mylinks.class.php" );
@@ -18,6 +13,8 @@
define( "MYLINKS_CATEGORIES_LAST_UPDATED_LAST", 6 );
/**
+ * \ingroup DAO
+ *
* Model for retrieving MyLinksCategory objects from the database
*/
class MyLinksCategories extends Model
Modified: plog/trunk/class/dao/mylinkscategory.class.php
===================================================================
--- plog/trunk/class/dao/mylinkscategory.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/mylinkscategory.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,14 +1,11 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
/**
+ * \ingroup DAO
+ *
* The links one can add to a blog can also be filed under different categories. This object
* are the abstraction of those categories and offer methods to check the value of some of
* its attributes.
Modified: plog/trunk/class/dao/referer.class.php
===================================================================
--- plog/trunk/class/dao/referer.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/referer.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,14 +1,10 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
/**
+ * \ingroup DAO
* Represents a record from the 'referers' table, used to keep track
* of the referers to articles.
*/
Modified: plog/trunk/class/dao/referers.class.php
===================================================================
--- plog/trunk/class/dao/referers.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/referers.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/referer.class.php" );
@@ -14,6 +9,8 @@
/**
* Data access class (or model) to handle all the referers.
+ *
+ * \ingroup DAO
*/
class Referers extends Model
{
Modified: plog/trunk/class/dao/searchengine.class.php
===================================================================
--- plog/trunk/class/dao/searchengine.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/searchengine.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,19 +1,20 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/searchresult.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
/**
- * MARKWU: I modify the search engine to "select * from blabla where foo like %query%" way
- * The idea is come from wordpress.
- * Advantage : This way is work for all character set
- * Disadvantage: This way is a little bit time consuming when DB getting bigger and bigger
+ * \ingroup DAO
+ *
+ * Provides search facilities. At the moment it does not use MySQL's FULLTEXT index features because we are
+ * targetting as many people as possible and believe it or not, many people are still running MySQL 3.x.
+ *
+ * This class provides methods for searching through articles, comments and custom fields.
+ *
+ * @see Articles
+ * @see ArticleComments
+ * @see CustomFields
*/
class SearchEngine extends Model
{
Modified: plog/trunk/class/dao/searchresult.class.php
===================================================================
--- plog/trunk/class/dao/searchresult.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/searchresult.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
define( "SEARCH_RESULT_ARTICLE", 1 );
@@ -16,6 +11,8 @@
*
* Includes things like the relevance and a reference to the article object
* that matched the query
+ *
+ * \ingroup DAO
*/
class SearchResult extends Object
{
@@ -24,6 +21,14 @@
var $_article;
var $_resultType;
+ /**
+ * Constructor
+ *
+ * @param relevance The relevance factor
+ * @param article The Article object that matched the search terms
+ * @param type Whether the search result is coming from an article, comment or custom field
+ * @see getType()
+ */
function SearchResult( $relevance, $article, $type )
{
$this->Object();
@@ -33,16 +38,35 @@
$this->_type = $type;
}
+ /**
+ * returns the Article object, if any
+ *
+ * @return an Article object
+ */
function getArticle()
{
return $this->_article;
}
+ /**
+ * returns the relevance of the result
+ *
+ * @return an integer specfying the relevance of the result
+ */
function getRelevance()
{
return $this->_relevance;
}
+ /**
+ * returns the type of the result.
+ *
+ * @return The returned result is one of the following values:
+ * Possible values are:
+ * - SEARCH_RESULT_ARTICLE
+ * - SEARCH_RESULT_CUSTOM_FIELD
+ * - SEARCH_RESULT_COMMENT
+ */
function getType()
{
return $this->_type;
Modified: plog/trunk/class/dao/sitestatistics.class.php
===================================================================
--- plog/trunk/class/dao/sitestatistics.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/sitestatistics.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,15 +1,12 @@
<?php
- /**
- * @package dao
- */
-
-
/**
* This class provides some statistics about the site.
- * Not much, though :)
+ *
+ * \ingroup DAO
*/
- class SiteStatistics extends Model {
+ class SiteStatistics extends Model
+ {
function SiteStatistics()
{
Modified: plog/trunk/class/dao/status/genericstatuslist.class.php
===================================================================
--- plog/trunk/class/dao/status/genericstatuslist.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/status/genericstatuslist.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,12 +1,17 @@
<?php
- /**
- * @package dao
- */
+ include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
-
- include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
-
+ /**
+ * Generic class for handling custom statuses that are defined via global constants
+ * (as opposed as needing to be registered via some static method in this class) What this class
+ * does is can the list of globally defined constants and grab those that start with a certain prefix,
+ * such as "BLOG_STATUS_", since that will be an indicator that the given constant is a valid status.
+ * While this method is far from clean, it allows to create new statuses on the fly with very
+ * little effort.
+ *
+ * \ingroup DAO
+ */
class GenericStatusList extends Object
{
Modified: plog/trunk/class/dao/trackback.class.php
===================================================================
--- plog/trunk/class/dao/trackback.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/trackback.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,14 +1,12 @@
<?php
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
/**
* Represents a trackback item.
+ *
+ * \ingroup DAO
*/
class TrackBack extends DbObject
{
Modified: plog/trunk/class/dao/trackbackclient.class.php
===================================================================
--- plog/trunk/class/dao/trackbackclient.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/trackbackclient.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/net/http/httpclient.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/article.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
@@ -19,6 +14,8 @@
* the trackback urls in a page, given the right url.
* It also offers mechanisms to send trackback pings to pages and a function that will
* send trackback pings to the list of urls specified in an array as a parameter.
+ *
+ * \ingroup DAO
*/
class TrackbackClient extends Object
{
Modified: plog/trunk/class/dao/trackbacks.class.php
===================================================================
--- plog/trunk/class/dao/trackbacks.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/trackbacks.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/trackback.class.php" );
@@ -12,6 +7,8 @@
* Implementation of a trackback feature.
* The technical specifications of the trackback protocol can be found
* here: http://www.movabletype.org/docs/mttrackback.html.
+ *
+ * \ingroup DAO
*/
class Trackbacks extends Model
{
Modified: plog/trunk/class/dao/usercomment.class.php
===================================================================
--- plog/trunk/class/dao/usercomment.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/usercomment.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
@@ -14,6 +9,8 @@
* This class represents a comment made by a casual user to an article. Please use the getter methods
* exposed here to get all the information regarding this comment, such as the name of the user who
* posted it, the email address and even the ip of the machine from which the comment was posted.
+ *
+ * \ingroup DAO
*/
class UserComment extends DbObject
{
Modified: plog/trunk/class/dao/userinfo.class.php
===================================================================
--- plog/trunk/class/dao/userinfo.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/userinfo.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,9 +1,5 @@
<?php
- /**
- * @package dao
- */
-
include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresource.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
@@ -11,6 +7,8 @@
/**
* Represents a user in our application. Includes information such as the username,
* password, email, etc.
+ *
+ * \ingroup DAO
*/
class UserInfo extends DbObject
{
Modified: plog/trunk/class/dao/userpermission.class.php
===================================================================
--- plog/trunk/class/dao/userpermission.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/userpermission.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,12 +1,13 @@
<?php
- /**
- * @package dao
- */
+ /**
+ * represents a permission from the database
+ *
+ * \ingroup DAO
+ */
+ class UserPermission extends DbObject
+ {
-
- class UserPermission extends DbObject {
-
var $_userId;
var $_blogId;
var $_permId;
Modified: plog/trunk/class/dao/userpermissions.class.php
===================================================================
--- plog/trunk/class/dao/userpermissions.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/userpermissions.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/userpermission.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
@@ -18,8 +13,11 @@
/**
* Handles user permissions.
+ *
+ * \ingroup DAO
*/
- class UserPermissions extends Model {
+ class UserPermissions extends Model
+ {
function UserPermissions()
{
Modified: plog/trunk/class/dao/users.class.php
===================================================================
--- plog/trunk/class/dao/users.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/users.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,10 +1,5 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
@@ -14,6 +9,8 @@
/**
* Model representing the users in our application. Provides the methods such as
* authentication and querying for users.
+ *
+ * \ingroup DAO
*/
class Users extends Model
{
Modified: plog/trunk/class/dao/userstatus.class.php
===================================================================
--- plog/trunk/class/dao/userstatus.class.php 2005-03-14 23:14:24 UTC (rev 1474)
+++ plog/trunk/class/dao/userstatus.class.php 2005-03-14 23:49:19 UTC (rev 1475)
@@ -1,21 +1,18 @@
<?php
- /**
- * @package dao
- */
-
-
include_once( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
- /**
- * different statuses that a user can have. These are the default status.
- *
- */
define( "USER_STATUS_ALL", -1, true );
define( "USER_STATUS_ACTIVE", 1, true );
define( "USER_STATUS_DISABLED", 2, true );
define( "USER_STATUS_UNCONFIRMED", 3, true );
+ /**
+ * This class keeps track of all the possible status that a user can have. If plugins dynamically
+ * register new user statuses, this class will still be able to handle them
+ *
+ * \ingroup DAO
+ */
class UserStatus extends GenericStatusList
{
More information about the pLog-svn
mailing list