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

Class: Services_Blogging_Driver_LiveJournal

Source Location: /Services_Blogging-0.2.4/Services/Blogging/Driver/LiveJournal.php

Class Overview

Services_Blogging_Driver
   |
   --Services_Blogging_ExtendedDriver
      |
      --Services_Blogging_Driver_LiveJournal

LiveJournal API implementation.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Blogging_ExtendedDriver

Services_Blogging_ExtendedDriver::getPost()
The getPost method is intended to retrive a given post as an object of the Services_Blogging_Post class; given the unique post id which is passed as a parameter to the function.
Services_Blogging_ExtendedDriver::getRecentPosts()
Returns an array of recent posts as Services_Blogging_Post objects
Services_Blogging_ExtendedDriver::getRecentPostTitles()
The getRecentPostTitles method is intended to retrieve the given number of posts titles from a blog.

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 32]
LiveJournal API implementation.

This class implements the LiveJournal XML-RPC API described at http://www.livejournal.com/doc/server/ljp.csp.xml-rpc.protocol.html



[ Top ]


Class Variables

$arSupportedPostProperties = array(
        Services_Blogging_Post::TITLE,
        Services_Blogging_Post::CONTENT,
        Services_Blogging_Post::DATE,
        Services_Blogging_Post::URL,
        Services_Blogging_Post::CATEGORIES,
        Services_Blogging_Post::LOCATION,
        Services_Blogging_Post::MOOD,
        Services_Blogging_Post::MUSIC,
        Services_Blogging_Post::ALLOW_COMMENTS,
        Services_Blogging_Post::AUTO_FORMAT,
    )

[line 47]

  • Access: protected

Type:   mixed


[ Top ]

$field_correspondence = array(
        Services_Blogging_Post::LOCATION => 'current_location',
        Services_Blogging_Post::MOOD => 'current_mood',
        Services_Blogging_Post::MUSIC => 'current_music',
    )

[line 60]

  • Access: protected

Type:   mixed


[ Top ]

$userdata = array()

[line 45]

Internal list with user data.
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 80]

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

Constructor for the LiveJournal driver.

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 ]

convertStructToPost   [line 496]

Services_Blogging_Post convertStructToPost( array $arStruct)

Converts a struct returned by the webservice to a Services_Blogging_Post object
  • Return: Converted post
  • Access: protected

Parameters:

array   $arStruct     Struct to convert

[ Top ]

deletePost   [line 280]

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 ]

getAuthData   [line 152]

array getAuthData( )

Returns the authentication data used for the challenge-repsonse mechanism.
  • Return: Array with authentican data.
  • Access: protected

[ Top ]

getPost   [line 312]

Services_Blogging_Post getPost( string $id)

The getPost method is intended to retrieve a given post as an object of the Services_Blogging_Post class; given the unique post id which is passed as a parameter to the function.
  • Return: The elements of the post returned as an object of the Services_Blogging_Post class.
  • Throws: Services_Blogging_Exception If the post does not exist
  • Access: public

Overrides Services_Blogging_ExtendedDriver::getPost() (The getPost method is intended to retrive a given post as an object of the Services_Blogging_Post class; given the unique post id which is passed as a parameter to the function.)

Parameters:

string   $id     The PostID of the post to be retrieved.

[ Top ]

getRecentPosts   [line 358]

Array getRecentPosts( [int $number = 15])

Returns an array of recent posts as Services_Blogging_Post objects
  • Return: An array of objects of the Services_Blogging_Post class that correspond to the number of posts requested.
  • Access: public

Overrides Services_Blogging_ExtendedDriver::getRecentPosts() (Returns an array of recent posts as Services_Blogging_Post objects)

Parameters:

int   $number     The number of posts to be retrieved. Defaults to 15

[ Top ]

getRecentPostTitles   [line 408]

Array getRecentPostTitles( [int $number = 15])

The getRecentPostTitles method is intended to retrieve the given number of post titles from a blog.

The posts themselves can be retrieved with getPost() or getPosts().

  • Return: An array of int => strings representing the post ids (key) and their title (value).
  • Access: public

Overrides Services_Blogging_ExtendedDriver::getRecentPostTitles() (The getRecentPostTitles method is intended to retrieve the given number of posts titles from a blog.)

Parameters:

int   $number     The number of posts to be retrieved.

[ Top ]

getSupportedPostProperties   [line 463]

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 ]

isPostPropertySupported   [line 481]

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 ]

md5hex   [line 134]

string md5hex( string $string)

Creates md5 hash of the given string and converts it to hexadecimal representation.
  • Return: md5-hashed hecadecimal representation
  • Access: protected

Parameters:

string   $string     Some string value

[ Top ]

savePost   [line 179]

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 ]


Documentation generated on Sat, 10 Dec 2011 15:30:28 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.