Class Golem_Api_Article_Meta

Description

Class for accessing meta data for an article via web interface.

  • property-read: Integer $articleid: the artice identifier
  • property-read: String $headline: the headline
  • property-read: String $subheadline: the sub headline
  • property-read: String $abstracttext: the article abstract
  • property-read: Integer $date: the publishing date as unix timestamp
  • property-read: Integer $pages: the number of pages of the article
  • property-read: Array $leadimg: the properties of the headline image
  • property-read: String $leadimg['url']: the URL of the image
  • property-read: Integer $leadimg['height']: the height of the image
  • property-read: Integer $leadimg['width']: the height of the image
  • author: Alexander Merz <am@golem.de>
  • copyright: 2009 Klaß&Ihlenfeld Verlag GmbH
  • link: http://api.golem.de/
  • license: BSD Licence

Located in /Api/Article/Meta.php (line 63)


	
			
Class Constant Summary
 URL = 'http://api.golem.de/api/article/meta/'
Variable Summary
Array $article
Integer $idArticle
String $key
Method Summary
Golem_Api_Article_Meta __construct (String $key, Integer $id)
Boolean fetch ([Array $curlOptions = array()])
Mixed __get (String $value)
Variables
Array $article = array() (line 85)

Holds the meta data of an article

  • access: protected
Integer $idArticle = null (line 91)

Article identifier

  • access: protected
String $key = null (line 97)

Developer access key

  • access: protected
Methods
Constructor __construct (line 105)

Creates a MetaArticle object

  • access: public
Golem_Api_Article_Meta __construct (String $key, Integer $id)
  • String $key: the developer key
  • Integer $id: the article identifier
fetch (line 150)

Does the request to get the meta data.

If the request was succesful, true will be returned, else an exception will be thrown.

The possible Exception codes are Golem_Request::DATABASE, Golem_Api_Article_Meta::ERROR_INVALID_IDENITIFER and Golem_Api_Article_Meta::ERROR_NOARTICLE.

After a successful request the meta data is available as properties of the class instance

  • return: true, if request was successful
  • access: public
Boolean fetch ([Array $curlOptions = array()])
  • Array $curlOptions: optional options for cUrl
__get (line 120)

Accessor for a meta data value

  • return: the value
  • access: public
Mixed __get (String $value)
  • String $value: the name of the meta data value
Class Constants
ERROR_INVALID_IDENTIFIER = 32 (line 74)

Error code for an invalid article identifier

ERROR_NOARTICLE = 33 (line 79)

Error code that an identifier does not relate to an article

URL = 'http://api.golem.de/api/article/meta/' (line 69)

Base url of the webservice

Documentation generated on Tue, 20 Apr 2010 14:21:07 +0200 by phpDocumentor 1.4.3