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

Class: Services_Blogging

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

Class Overview


Generic package for several Blogging APIs.


Author(s):

Version:

  • $Id: Blogging.php,v 1.1 2007/01/27 16:59:40 cweiske Exp $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Generic package for several Blogging APIs.

Create a new instance via Services_Blogging::factory($driver, $username, $password, $server, $path), or more easy via Services_Blogging::discoverDriver($url, $username, $password) .

Note that some Blogging APIs allow multiple blogs with one account. These drivers implement Services_Blogging_MultipleBlogsInterface

  • you need to call setBlogId($id) before you can use the driver in that case.

  • Author: Anant Narayanan <anant@php.net>
  • Author: Christian Weiske <cweiske@php.net>
  • Version: $Id: Blogging.php,v 1.1 2007/01/27 16:59:40 cweiske Exp $
  • Todo: Missing drivers
    • MovableType
    • Conversant
    • Manila
    • MetaWiki
    • Antville
  • License: LGPL


[ Top ]


Method Detail

discoverDriver   [line 80]

Services_Blogging_Driver discoverDriver( string $url, string $username, string $password)

Autodiscover the driver settings from the given blog URL and create a driver instance.
  • Return: The driver object if all goes ok
  • Throws: Services_Blogging_Exception If an error occured
  • Access: public

Parameters:

string   $url   —  Blog URL
string   $username   —  Username for the blog account
string   $password   —  Password for the blog account

[ Top ]

discoverSettings   [line 128]

mixed discoverSettings( string $url)

Tries to auto-discover the driver settings for the blog at the given URL.

Internally, an RSD page is tried to load and read.


Parameters:

string   $url   —  Url of the blog

[ Top ]

driverExists   [line 224]

boolean driverExists( string $driver)

Tries to include the driver file and checks if the driver class exists.
  • Return: If the driver exists
  • Access: protected

Parameters:

string   $driver   —  Driver to check

[ Top ]

factory   [line 54]

void factory( string $driver, string $username, string $password, string $server, string $path)

The factory function that instantiates the appropriate class and returns the object, so that further methods may be executed. This function serves as the single entry point for the class.
  • Access: public

Parameters:

string   $driver   —  The driver name, currently either "Blogger" or "metaWeblog".
string   $username   —  The username of the blog account to connect to.
string   $password   —  The password of the blog account to connect to.
string   $server   —  The URI of the blog's server.
string   $path   —  The location of the XML-RPC server script.

[ Top ]

getBestAvailableDriver   [line 191]

string getBestAvailableDriver( array $arSettings)

Tries to return the best available driver for the given settings array. The settings array is returned by Services_Blogging::discoverSettings()
  • Return: The driver to use, false if none found
  • Access: public

Parameters:

array   $arSettings   —  Settings array

[ Top ]


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