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

Class: Services_Blogging_Driver_Blogger

Source Location: /Services_Blogging-0.2.4/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::getSupportedPostTypes()
Returns an array of supported post types. Pass one of them to createNewPost() to instantiate such a post object.
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 35]
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 50]

Id of the blog to be used.

Some blogs support multiple blogs with one account.

  • Access: protected

Type:   int


[ Top ]

$userdata = array()

[line 56]

Internal list with user data.
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 78]

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 174]

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 258]

int getBlogId( )

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

[ Top ]

getBlogs   [line 270]

array getBlogs( )

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

[ Top ]

getSupportedPostProperties   [line 212]

array getSupportedPostProperties( [string $strPostType = 'post'])

Returns an array of strings thay define the properties that a post to this blog may have.

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

Parameters:

string   $strPostType     Type of post to create.

[ Top ]

getSupportedTemplates   [line 386]

array getSupportedTemplates( )

Returns an array of supported Templates
  • Return: Array of templates (strings)
  • Access: public

[ Top ]

getTemplate   [line 316]

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 230]

boolean isPostPropertySupported( string $strProperty, [string $strPostType = 'post'])

Checks if the given property name/id is supported for this driver.

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
string   $strPostType     Type of post to create.

[ Top ]

savePost   [line 126]

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 245]

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 356]

boolean setTemplate( string $tempType, string $template)

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   $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 Sat, 10 Dec 2011 15:30:27 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.