프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_connected | boolean | Boolean indicating whether or not we're connected to the SQL server. | |
$_db | Horde_Db_Adapter_Base | Handle for the current database connection. |
메소드 | 설명 | |
---|---|---|
__construct ( $params = [] ) | ||
deleteStory ( $channel_id, $story_id ) | ||
getChannelId ( string $channel ) : integer | Look up a channel ID by its name | |
getLatestStoryId ( integer $channel_id ) : integer | Gets the latest released story from a given internal channel | |
getStoryCount ( integer $channel_id ) : integer | Returns the total number of stories in the specified channel. | |
saveChannel ( array &$info ) : integer | Saves a channel to the backend. |
메소드 | 설명 | |
---|---|---|
_addPermalink ( array &$story ) | Adds a missing permalink to a story. | |
_connect ( ) : boolean | Attempts to open a persistent connection to the SQL server. | |
_convertFromBackend ( array $story ) : array | Converts the text fields of a story from the backend charset to the output charset. | |
_deleteChannel ( integer $channel_id ) : boolean. | Remove a channel from storage. | |
_getChannel ( $channel_id ) : array | Retrieve a single channel definition from storage. | |
_getChannels ( ) : array | Get a list of stored channels. | |
_getIdBySlug ( string $slug ) : integer | Obtain a channel id from a slug | |
_getStories ( array $criteria, $order = Jonah::ORDER_PUBLISHED ) : array | Returns a list of stories from the storage backend filtered by arbitrary criteria. | |
_getStory ( integer $story_id, boolean $read = false ) : The | Retrieve a story from storage. | |
_getStoryIdsByChannel ( $channel_id ) | ||
_readStory ( integer $story_id ) | Increment the story's read count. | |
_saveStory ( &$info ) | Save a story to storage. | |
_timestampChannel ( integer $channel_id, integer $timestamp ) : boolean | Update the channel's timestamp |
protected _addPermalink ( array &$story ) | ||
$story | array | A story hash. |
protected _convertFromBackend ( array $story ) : array | ||
$story | array | A story hash. |
리턴 | array | The converted hash. |
protected _deleteChannel ( integer $channel_id ) : boolean. | ||
$channel_id | integer | The channel to remove. |
리턴 | boolean. |
protected _getChannel ( $channel_id ) : array | ||
리턴 | array | The channel definition array. |
protected _getChannels ( ) : array | ||
리턴 | array | An array of channel hashes. |
protected _getIdBySlug ( string $slug ) : integer | ||
$slug | string | The slug to search for. |
리턴 | integer | The channel id. |
protected _getStories ( array $criteria, $order = Jonah::ORDER_PUBLISHED ) : array | ||
$criteria | array | |
리턴 | array |
protected _readStory ( integer $story_id ) | ||
$story_id | integer | The story_id to increment. |
public getChannelId ( string $channel ) : integer | ||
$channel | string | |
리턴 | integer | Channel ID |
public getLatestStoryId ( integer $channel_id ) : integer | ||
$channel_id | integer | The channel id. |
리턴 | integer | The story id. |
public getStoryCount ( integer $channel_id ) : integer | ||
$channel_id | integer | The Channel Id |
리턴 | integer | The count |
public saveChannel ( array &$info ) : integer | ||
$info | array | The channel to add.
Must contain a combination of the following
entries:
'channel_id' If empty a new channel is being added, otherwise one is being edited. 'channel_slug' The channel slug. 'channel_name' The headline. 'channel_desc' A description of this channel. 'channel_interval' If external then interval at which to refresh. 'channel_link' The link to the source. 'channel_url' The url from where to fetch the story list. 'channel_image' A channel image. |
리턴 | integer | The channel ID. |
protected bool $_connected | ||
리턴 | boolean |