Services_Blogging
[ class tree: Services_Blogging ] [ index: Services_Blogging ] [ all elements ]

Class: Services_Blogging_Driver_Blogger

Source Location: /Services_Blogging-0.1.1/Services/Blogging/Driver/Blogger.php

Class Overview

Services_Blogging_Driver
   |
   --Services_Blogging_Driver_Blogger

Blogger API implementation.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Blogging_Driver

Services_Blogging_Driver::createNewPost()
Creates a new post object and returns that.
Services_Blogging_Driver::deletePost()
Delete a given post
Services_Blogging_Driver::getSupportedPostProperties()
Returns an array of strings thay define the properties that a post to this blog may have.
Services_Blogging_Driver::isPostPropertySupported()
Checks if the given property name/id is supported for this driver.
Services_Blogging_Driver::savePost()
Save a new post into the blog.

Class Details

[line 20]
Blogger API implementation.

This class implements the Blogger XML-RPC API described at http://www.blogger.com/developers/api/1_docs/



[ Top ]


Class Variables

$nBlogId =  null

[line 35]

Id of the blog to be used.

Some blogs support multiple blogs with one account.

  • Access: protected

Type:   int


[ Top ]

$userdata = array()

[line 41]

Internal list with user data.
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 63]

Services_Blogging_Driver_Blogger __construct( string $user, string $pass, [string $server = null], [string $path = null])

Constructor for the Blogger class that authenticates the user and sets class properties. It will return the userinfo if authentication was successful, an exception if authentication failed. The username, password, path to the XML-RPC client and server URI are passed as parameters.

If $server and $path are set to NULL, the default blogger.com address is used.

  • Throws: Services_Blogging_Exception If authentication fails
  • Access: public

Parameters:

string   $user   —  The username of the blog account.
string   $pass   —  The password of the blog account.
string   $server   —  The URI of the server to connect to.
string   $path   —  The path to the XML-RPC server script.

[ Top ]

deletePost   [line 147]

boolean deletePost( mixed $post)

Delete a given post
  • Return: True if deleted, false if not.
  • Access: public

Overrides Services_Blogging_Driver::deletePost() (Delete a given post)

Parameters:

mixed   $post   —  Services_Blogging_Post object to delete, or post id (integer) to delete

[ Top ]

getBlogId   [line 219]

int getBlogId( )

Returns the id of the currently used blog.
  • Return: Blog id
  • Access: public

[ Top ]

getBlogs   [line 231]

array getBlogs( )

Returns an array of blogs for that account.
  • Return: Array of Services_Blogging_Blog
  • Access: public

[ Top ]

getSupportedPostProperties   [line 178]

array getSupportedPostProperties( )

Returns an array of strings thay define the properties that a post to this blog may have.
  • Return: Array of strings
  • Access: public

Overrides Services_Blogging_Driver::getSupportedPostProperties() (Returns an array of strings thay define the properties that a post to this blog may have.)
[ Top ]

getSupportedTemplates   [line 331]

void getSupportedTemplates( )

  • Access: public

[ Top ]

getTemplate   [line 270]

string getTemplate( string $tempType)

Implements the blogger.getTemplate() method. The BlogID of the blog for which the template must be retrieved and the template type are passed as parameters.

The template type is usually one of 'main' or 'archiveIndex'. The template in HTML format is returned.

A template is the HTML code that represents the format of your blog. It is best to first examine the code that is returned by using this method; modifying it to suit your requirements, and then updating the template using the setTemplate() method.

  • Return: The template in HTML form.
  • Access: public

Parameters:

string   $tempType   —  The type of template to retrived. Usually either 'main' or 'archiveIndex'.

[ Top ]

isPostPropertySupported   [line 193]

boolean isPostPropertySupported( string $strProperty)

Checks if the given property name/id is supported for this driver.
  • Return: If the property is supported
  • Access: public

Overrides Services_Blogging_Driver::isPostPropertySupported() (Checks if the given property name/id is supported for this driver.)

Parameters:

string   $strProperty   —  Property name/id to check

[ Top ]

savePost   [line 106]

void savePost( Services_Blogging_Post $post)

Save a new post into the blog.
  • Throws: Services_Blogging_Exception If an error occured
  • Access: public

Overrides Services_Blogging_Driver::savePost() (Save a new post into the blog.)

Parameters:

Services_Blogging_Post   $post   —  Post object to put online

[ Top ]

setBlogId   [line 206]

void setBlogId( int $nBlogId)

Sets the blog id to use (some blogging APIs support multiple blogs with one account)
  • Access: public

Parameters:

int   $nBlogId   —  Id of the blog to use

[ Top ]

setTemplate   [line 308]

boolean setTemplate( string $tempType, string $template, string $blogid)

Implements the blogger.setTemplate() method. The BlogID of the blog for which the template is to be set, the template type (again: 'main' or 'archiveIndex') and the actual template in the HTML format are passed as parameters.

See the docblock for the getTemplate() to find out what a template is.

  • Return: Whether or not the template was set.
  • Access: public

Parameters:

string   $blogid   —  The BlogID of the blog for which the template is to be set. (As returned by the getUsersBlogs() method).
string   $tempType   —  The type of the template being set. Either 'main' or 'archiveIndex'.
string   $template   —  The actual template in the HTML format.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:57:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.