FeedWizardSessionManager
in package
Adapter for PHP session state management in the Feed wizard.
Abstracts $_SESSION['wizard'] access for the Feed module, enabling testability and future session backend changes.
Tags
Table of Contents
Constants
- KEY_WIZARD = 'wizard'
- Session key for wizard data.
Methods
- clear() : void
- Clear the wizard session.
- clearHost() : void
- Clear host array.
- countFeedItems() : int
- Count numeric feed items.
- exists() : bool
- Check if wizard session exists.
- getAll() : array<string, mixed>
- Get the wizard session data as typed array.
- getArray() : array<int|string, mixed>
- Get an array value from wizard session.
- getArticleSection() : string
- Get article section.
- getArticleSelector() : string
- Get article selector.
- getArticleTags() : string
- Get article tags HTML.
- getDetectedFeed() : string
- Get detected feed type string.
- getEditFeedId() : int|null
- Get edit feed ID.
- getFeed() : array<int|string, mixed>
- Get feed data.
- getFeedItem() : array<string, mixed>|null
- Get feed item by index.
- getFeedItemHtml() : string|null
- Get feed item HTML.
- getFeedText() : string
- Get feed text type from feed data.
- getFeedTitle() : string
- Get feed title from feed data.
- getFilterTags() : string
- Get filter tags HTML.
- getHideImages() : string
- Get hide images flag.
- getHost() : array<string, string>
- Get host array.
- getHost2() : array<string, string>
- Get host2 array.
- getInt() : int
- Get an integer value from wizard session.
- getLang() : string
- Get language ID.
- getMaxim() : int
- Get max items.
- getOptions() : string
- Get feed options string.
- getRedirect() : string
- Get redirect option.
- getRssUrl() : string
- Get RSS URL.
- getSelectedFeed() : int
- Get selected feed index.
- getSelectMode() : string
- Get select mode.
- getString() : string
- Get a string value from wizard session.
- has() : bool
- Check if a key exists in wizard session.
- init() : void
- Initialize the session.
- remove() : void
- Remove a key from wizard session.
- set() : void
- Set a value in wizard session.
- setArticleSection() : void
- Set article section.
- setArticleSelector() : void
- Set article selector.
- setArticleTags() : void
- Set article tags HTML.
- setDetectedFeed() : void
- Set detected feed type string.
- setEditFeedId() : void
- Set edit feed ID.
- setFeed() : void
- Set feed data.
- setFeedItem() : void
- Set feed item by index.
- setFeedItemHtml() : void
- Set feed item HTML.
- setFeedText() : void
- Set feed text type in feed data.
- setFeedTitle() : void
- Set feed title in feed data.
- setFilterTags() : void
- Set filter tags HTML.
- setHideImages() : void
- Set hide images flag.
- setHost2Status() : void
- Set host2 status.
- setHostStatus() : void
- Set host status.
- setLang() : void
- Set language ID.
- setMaxim() : void
- Set max items.
- setOptions() : void
- Set feed options string.
- setRedirect() : void
- Set redirect option.
- setRssUrl() : void
- Set RSS URL.
- setSelectedFeed() : void
- Set selected feed index.
- setSelectMode() : void
- Set select mode.
- ensureSession() : void
- Ensure session is started.
Constants
KEY_WIZARD
Session key for wizard data.
private
mixed
KEY_WIZARD
= 'wizard'
Methods
clear()
Clear the wizard session.
public
clear() : void
clearHost()
Clear host array.
public
clearHost() : void
countFeedItems()
Count numeric feed items.
public
countFeedItems() : int
Return values
intexists()
Check if wizard session exists.
public
exists() : bool
Return values
boolgetAll()
Get the wizard session data as typed array.
public
getAll() : array<string, mixed>
Return values
array<string, mixed>getArray()
Get an array value from wizard session.
public
getArray(string $key) : array<int|string, mixed>
Parameters
- $key : string
-
Key to retrieve
Return values
array<int|string, mixed>getArticleSection()
Get article section.
public
getArticleSection() : string
Return values
stringgetArticleSelector()
Get article selector.
public
getArticleSelector() : string
Return values
stringgetArticleTags()
Get article tags HTML.
public
getArticleTags() : string
Return values
stringgetDetectedFeed()
Get detected feed type string.
public
getDetectedFeed() : string
Return values
stringgetEditFeedId()
Get edit feed ID.
public
getEditFeedId() : int|null
Return values
int|nullgetFeed()
Get feed data.
public
getFeed() : array<int|string, mixed>
Return values
array<int|string, mixed>getFeedItem()
Get feed item by index.
public
getFeedItem(int $index) : array<string, mixed>|null
Parameters
- $index : int
-
Item index
Return values
array<string, mixed>|nullgetFeedItemHtml()
Get feed item HTML.
public
getFeedItemHtml(int $index) : string|null
Parameters
- $index : int
-
Item index
Return values
string|nullgetFeedText()
Get feed text type from feed data.
public
getFeedText() : string
Return values
stringgetFeedTitle()
Get feed title from feed data.
public
getFeedTitle() : string
Return values
stringgetFilterTags()
Get filter tags HTML.
public
getFilterTags() : string
Return values
stringgetHideImages()
Get hide images flag.
public
getHideImages() : string
Return values
stringgetHost()
Get host array.
public
getHost() : array<string, string>
Return values
array<string, string>getHost2()
Get host2 array.
public
getHost2() : array<string, string>
Return values
array<string, string>getInt()
Get an integer value from wizard session.
public
getInt(string $key[, int $default = 0 ]) : int
Parameters
- $key : string
-
Key to retrieve
- $default : int = 0
-
Default value
Return values
intgetLang()
Get language ID.
public
getLang() : string
Return values
stringgetMaxim()
Get max items.
public
getMaxim() : int
Return values
intgetOptions()
Get feed options string.
public
getOptions() : string
Return values
stringgetRedirect()
Get redirect option.
public
getRedirect() : string
Return values
stringgetRssUrl()
Get RSS URL.
public
getRssUrl() : string
Return values
stringgetSelectedFeed()
Get selected feed index.
public
getSelectedFeed() : int
Return values
intgetSelectMode()
Get select mode.
public
getSelectMode() : string
Return values
stringgetString()
Get a string value from wizard session.
public
getString(string $key[, string $default = '' ]) : string
Parameters
- $key : string
-
Key to retrieve
- $default : string = ''
-
Default value
Return values
stringhas()
Check if a key exists in wizard session.
public
has(string $key) : bool
Parameters
- $key : string
-
Key to check
Return values
boolinit()
Initialize the session.
public
init() : void
Call this before any output is sent to ensure the session is started.
remove()
Remove a key from wizard session.
public
remove(string $key) : void
Parameters
- $key : string
-
Key to remove
Tags
set()
Set a value in wizard session.
public
set(string $key, mixed $value) : void
Parameters
- $key : string
-
Key to set
- $value : mixed
-
Value to set
Tags
setArticleSection()
Set article section.
public
setArticleSection(string $section) : void
Parameters
- $section : string
-
Section
setArticleSelector()
Set article selector.
public
setArticleSelector(string $selector) : void
Parameters
- $selector : string
-
Selector
setArticleTags()
Set article tags HTML.
public
setArticleTags(string $tags) : void
Parameters
- $tags : string
-
Tags HTML
setDetectedFeed()
Set detected feed type string.
public
setDetectedFeed(string $detected) : void
Parameters
- $detected : string
-
Detected type
setEditFeedId()
Set edit feed ID.
public
setEditFeedId(int $feedId) : void
Parameters
- $feedId : int
-
Feed ID
setFeed()
Set feed data.
public
setFeed(array<int|string, mixed> $feed) : void
Parameters
- $feed : array<int|string, mixed>
-
Feed data
setFeedItem()
Set feed item by index.
public
setFeedItem(int $index, array<string, mixed> $item) : void
Parameters
- $index : int
-
Item index
- $item : array<string, mixed>
-
Item data
setFeedItemHtml()
Set feed item HTML.
public
setFeedItemHtml(int $index, mixed $html) : void
Parameters
- $index : int
-
Item index
- $html : mixed
-
HTML content
Tags
setFeedText()
Set feed text type in feed data.
public
setFeedText(string $text) : void
Parameters
- $text : string
-
Text type
setFeedTitle()
Set feed title in feed data.
public
setFeedTitle(string $title) : void
Parameters
- $title : string
-
Title
setFilterTags()
Set filter tags HTML.
public
setFilterTags(string $tags) : void
Parameters
- $tags : string
-
Tags HTML
setHideImages()
Set hide images flag.
public
setHideImages(string $hide) : void
Parameters
- $hide : string
-
Hide flag
setHost2Status()
Set host2 status.
public
setHost2Status(string $hostName, string $status) : void
Parameters
- $hostName : string
-
Host name
- $status : string
-
Status
setHostStatus()
Set host status.
public
setHostStatus(string $hostName, string $status) : void
Parameters
- $hostName : string
-
Host name
- $status : string
-
Status
setLang()
Set language ID.
public
setLang(string $langId) : void
Parameters
- $langId : string
-
Language ID
setMaxim()
Set max items.
public
setMaxim(int $maxim) : void
Parameters
- $maxim : int
-
Max items
setOptions()
Set feed options string.
public
setOptions(string $options) : void
Parameters
- $options : string
-
Options
setRedirect()
Set redirect option.
public
setRedirect(string $redirect) : void
Parameters
- $redirect : string
-
Redirect string
setRssUrl()
Set RSS URL.
public
setRssUrl(string $url) : void
Parameters
- $url : string
-
URL
setSelectedFeed()
Set selected feed index.
public
setSelectedFeed(int $index) : void
Parameters
- $index : int
-
Index
setSelectMode()
Set select mode.
public
setSelectMode(string $mode) : void
Parameters
- $mode : string
-
Mode
ensureSession()
Ensure session is started.
private
ensureSession() : void