Свойство | Type | Description | |
---|---|---|---|
$_params | array | Hash containing connection parameters. |
Méthode | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructs a new Driver storage object. | |
deleteChannel ( array $info ) | Remove a channel from storage. | |
getChannel ( integer $channel_id ) : array | Fetches the requested channel, while actually passing on the request to the backend _getChannel() function to do the real work. | |
getChannels ( ) : array | Get a list of stored channels. | |
getChecksum ( $story ) | ||
getIdBySlug ( $channel ) | ||
getIntervalLabel ( $seconds = null ) | ||
getStories ( integer $criteria, integer $order = Jonah::ORDER_PUBLISHED ) : array | Returns the most recent or all stories from a channel. | |
getStory ( integer $story_id, boolean $read = false ) : array | Retrieve the requested story from storage. | |
getStoryIdsByChannel ( integer $channel_id ) : array | Return a list of story_ids contained in the specified channel. | |
getStoryLink ( array $channel, array $story ) : Horde_Url | Returns the official link to a story. | |
listTagInfo ( $channel_id = null ) | ||
renderChannel ( integer $channel_id, string $tpl, integer $max = 10, integer $from, integer $order = Jonah::ORDER_PUBLISHED ) : string | Returns the stories of a channel rendered with the specified template. | |
saveStory ( array &$info ) | Save the provided story to storage. |
Méthode | Description | |
---|---|---|
_escapeStories ( &$value, $key ) | ||
_escapeStoryDescriptions ( &$value, $key ) | ||
getStoryAsMessage ( array $story ) : MIME_Part | Returns the provided story as a MIME part. |
public __construct ( array $params = [] ) | ||
$params | array | A hash containing connection parameters. |
public deleteChannel ( array $info ) | ||
$info | array | A channel info array. (@TODO: Look at passing just the id?) |
public getChannel ( integer $channel_id ) : array | ||
$channel_id | integer | The channel id to fetch. |
Résultat | array | The channel details as an array |
public getChannels ( ) : array | ||
Résultat | array | An array of channel hashes. |
public getStories ( integer $criteria, integer $order = Jonah::ORDER_PUBLISHED ) : array | ||
$criteria | integer | An associative array of attributes on which the resulting stories should be filtered. Examples: 'channel' => (string) Channel slug 'channel_id' => (integer) Channel ID (Either an id or slug is required) 'author' => (string) Story author 'updated-min' => (Horde_Date) Only return stories updated on or after this date 'updated-max' => (Horde_Date) Only return stories updatedon or before this date 'published-min' => (Horde_Date) Only return stories published on or after this date 'published-max' => (Horde_Date) Only return stories published on or before date 'tags' => (array) Tag names that must match to be included 'keywords' => (array) Strings which must match to be included 'published' => (boolean) Whether to return only published stories: Possible values: null return both 'published' returns publised 'unpublished' returns unpublished 'startnumber' => (integer) Story number to start at 'limit' => (integer) Max number of stories |
$order | integer | How to order the results. A Jonah::ORDER_* constant. |
Résultat | array | The specified number (or less, if there are fewer) of stories from the given channel. |
protected getStoryAsMessage ( array $story ) : MIME_Part | ||
$story | array | A data array representing a story. |
Résultat | MIME_Part | The MIME message part containing the story parts. |
public getStoryIdsByChannel ( integer $channel_id ) : array | ||
$channel_id | integer | The channel_id |
Résultat | array | An array of story_ids. |
public getStoryLink ( array $channel, array $story ) : Horde_Url | ||
$channel | array | A channel hash. |
$story | array | A story hash. |
Résultat | Horde_Url | The story link. |
public renderChannel ( integer $channel_id, string $tpl, integer $max = 10, integer $from, integer $order = Jonah::ORDER_PUBLISHED ) : string | ||
$channel_id | integer | The news channel to get stories from. |
$tpl | string | The name of the template to use. |
$max | integer | The maximum number of stories to get. If null, all stories will be returned. |
$from | integer | The number of the story to start with. |
$order | integer | How to sort the results for internal channels Possible values are the Jonah::ORDER_* constants. |
Résultat | string | The rendered story listing. |
protected array $_params | ||
Résultat | array |