[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/net/ -> rawrequestgenerator.class.php (sommaire)

(pas de description)

Poids: 465 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 2 fois
Nécessite: 0 fichiers

Définit 1 class

RawRequestGenerator:: (23 méthodes):
  RawRequestGenerator()
  addParameter()
  removeParameter()
  postPermalink()
  postCommentLink()
  postLink()
  postRssLink()
  postCategoryLink()
  categoryLink()
  postUserLink()
  blogLink()
  rssLink()
  categoryRssLink()
  replyCommentLink()
  getArchiveLink()
  postTrackbackStatsLink()
  albumLink()
  parentAlbumLink()
  templatePage()
  resourceLink()
  getRequest()
  getCurrentUrl()
  getPageSuffix()


Classe: RawRequestGenerator  - X-Ref

\ingroup Net

Generates normal, plain HTTP requests.

RawRequestGenerator( $blogInfo )   X-Ref
Constructor.

param: blogInfo A BlogInfo object

addParameter( $paramName, $paramValue )   X-Ref
Adds a parameter to the request

param: paramName Name of the parameter
param: paramValue Value given to the parameter

removeParameter( $paramName )   X-Ref


postPermalink( $post )   X-Ref
Returns the permalink for a post

param: post The Article object
return: The link for the permalink

postCommentLink( $post )   X-Ref
Returns the comment link for a post

param: post The Article object
return: The correct string

postLink( $post )   X-Ref
Returns the link for the post

param: post The Article object
return: The link for the post

postRssLink( $post )   X-Ref
Returns the link for the post. This is kind of a dirty trick... :( This is only meant to be
used in the template that generates the rss feed for a blog.

param: post The Article object
return: The link for the post

postCategoryLink( $post )   X-Ref
Returns the link of a category.

param: post The post from which we'll fetch the category and then generate the right link.
return: The url pointing to the page with only the posts belonging to that category.

categoryLink( $category )   X-Ref
Returns the link but given a category. Does the same as postCategoryLink but this time we don't need
a post but an ArticleCategory object.

param: An ArticleCategory object containing the information regarding the category.
return: A string with the correct url pointing to the page that will show only the posts that belong

postUserLink( $user, $category = null )   X-Ref
Returns a link to only the articles of the user

param: user The user whose posts we would like to see
param: category Optionally, we can specify an ArticleCategory object
return: A string containing the right url to only the posts of the user.

blogLink( $blogInfo = null )   X-Ref
Returns the url of the host where the blog is running

return: Returns the url where the blog is running.

rssLink( $profile = "", $blogInfo = null )   X-Ref
Returns the url where the rss feed is running

param: blogInfo A BlogInfo object containing information about the blog.
param: profile The RSS profile we'd like to use. It defaults to none.
return: The url pointing to the rss feed of the journal.

categoryRssLink( $category, $profile = "", $blogInfo = null )   X-Ref
Returns the url for the rss feed of a category

param: category The ArticleCategory object with information about the category
param: blogInfo A BlogInfo object containing information about the blog.
return: The url pointing to the rss feed of the journal.

replyCommentLink( $post, $comment )   X-Ref
Returns the url to reply to a given comment.

param: post An Article object with information about the post
param: commen A UserComment object containing information about the post we'd like to reply to.
return: The right url to reply to this comment.

getArchiveLink( $date )   X-Ref
generates an archive link given a date.

param: date A String in the format yyyymm
return: A valid archive link

postTrackbackStatsLink( $post )   X-Ref
Returns the link to the page showing the trackback statistics for a given post.

param: post The post with the information.
return: Returns a string with the valid link.

albumLink( $album = null )   X-Ref
Returns the link to an album

param: album The GalleryAlbum object.

parentAlbumLink( $album )   X-Ref
Given an album, generates a link to its parent. Must be implemented by child classes to generate
a valid URL.

param: album The album

templatePage( $template )   X-Ref
Given the name of a template file, generate the right link to it.

param: template
return: A link to the given template file/static page

resourceLink( $resource )   X-Ref
Returns the link to a resource

param: album Generates the correct link to fetch a resource

getRequest( $removeBlogIdIfNecessary = true )   X-Ref
Returns a string representing the request

return: A String object representing the request

getCurrentUrl( $category = null, $userInfo = null, $date = -1 )   X-Ref
given the parameters, recalculates the current URL. This method also has support
for paged urls

param: category
param: userInfo
param: date
param: page
return: the current url with its page

getPageSuffix()   X-Ref
Returns the page format for this URL generator

return: A page suffix



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics