| [ Index ] |
PHP Cross Reference of Textpattern 4.0.8 |
[Source view] [Print] [Project Stats]
Textpattern Wrapper Class for Textpattern 4.0.x
| Author: | Pedro Palazon - http://kusor.net/ |
| Copyright: | 2005-2008 The Textpattern Development Team - http://textpattern.com |
| File Size: | 707 lines (21 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
TXP_Wrapper:: (23 methods):
TXP_Wrapper()
deleteArticleID()
getArticleList()
getArticle()
getArticleID()
updateArticleID()
newArticle()
getSectionsList()
getSection()
getCategoryList()
getCategory()
getCategoryID()
getCategoryTitle()
getUser()
getTemplate()
setTemplate()
updateArticleField()
_setArticle()
_validate()
_sendPings()
_check_keys()
textile_main_fields()
format_field()
Class: TXP_Wrapper - X-Ref
| TXP_Wrapper($txp_user, $txpass = NULL) X-Ref |
| Class constructor param: string $txp_user the user login name param: strign $txpass user password |
| deleteArticleID($article_id) X-Ref |
| Delete the article given the id param: mixed(string|integer) $article_id the ID of the article to delete return: boolean true on success deletion |
| getArticleList($what='*', $where='1', $offset='0', $limit='10', $slash=true) X-Ref |
| Retrieves a list of articles matching the given criteria param: string $what SQL column names to retrieve param: string $where SQL condition to match param: string $offset SQL offset param: string $limit SQL limit param: boolean $slash escape SQL column names and condition return: mixed array on success, false on failure |
| getArticle($what='*', $where='1', $slash=true) X-Ref |
| Retrieves an article matching the given criteria param: string $what SQL column names to retrieve param: string $where SQL condition to match param: boolean $slash escape SQL column names and condition return: mixed array on success, false on failure |
| getArticleID($article_id, $what='*') X-Ref |
| Same thing, but handy shortcut known the ID param: mixed(string|integer) $article_id the ID of the article param: string $what SQL column names to retrieve return: mixed array on success, false on failure |
| updateArticleID($article_id, $params) X-Ref |
| Updates an existing article param: array $params the article fields to update param: mixed(string|integer) $article_id the ID of the article to update return: mixed integer article id on success, false on failure |
| newArticle($params) X-Ref |
| Creates a new article param: array $params the article fields return: mixed integer article id on success, false on failure |
| getSectionsList() X-Ref |
| Get full sections information return: mixed array on success, false on failure |
| getSection($name) X-Ref |
| Get one section param: string $name the section name return: mixed array on success, false on failure |
| getCategoryList() X-Ref |
| Get full categories information return: mixed array on success, false on failure |
| getCategory($name) X-Ref |
| Get one category by category name param: string $name the category name return: mixed array on success, false on failure |
| getCategoryID($id) X-Ref |
| Get one category by category id param: mixed(string|integer) $id category id return: mixed array on success, false on failure |
| getCategoryTitle($title) X-Ref |
| Get one category by category title param: string $title the category title return: mixed array on success, false on failure |
| getUser() X-Ref |
| Get full information for current user return: mixed array on success, false on failure |
| getTemplate($name) X-Ref |
| Retrieves a template with the given name param: string $name the template name |
| setTemplate($name, $html) X-Ref |
| Updates a template with the given name param: string $name the template name param: string $html the template contents return: boolean true on success |
| updateArticleField($article_id, $field, $value) X-Ref |
| Intended to update article non content fields, like categories, section or Keywords param: mixed(string|integer) $article_id the ID of the article to update param: string $field the name of the field to update param: mixed $value desired value for that field return: boolean true on success |
| _setArticle($incoming, $article_id = null) X-Ref |
| Executes the real action for @see udpateArticleId and @see newArticle param: array $incoming containing the desired article fields param: mixed(string|integer) $article_id the ID of the article to update return: mixed integer article id on success, false otherwise |
| _validate($user,$password = NULL) X-Ref |
| Attemp to validates the user with the provided password or takes it from the global scope, assuming the user is logged in param: string $user login name of the user to validate param: string(optional) $password for that user return: boolean, true if user is logged in |
| _sendPings() X-Ref |
| No description |
| _check_keys($incoming, $default = array() X-Ref |
| Check if the given parameters are the appropiated ones for the articles param: $incoming array the incoming associative array param: $default associative array containing default values for the desired keys return: array properly striped off the fields which don't match the defined ones. |
| textile_main_fields($incoming, $use_textile = 1) X-Ref |
| Apply textile to the main article fields (duplicated from txp_article.php!) param: array containing the $incoming vars array param: global use_textile preference return: array the same one containing the formatted fields |
| format_field($field, $format,$textile) X-Ref |
| Apply markup to a given fields param: string $field raw field contents param: integer $format format type to apply param: object $textile instance return: string html formated field |
| Generated: Thu May 21 23:03:01 2009 | Cross-referenced by PHPXref 0.7 |