Yioop_V9.5_Source_Code_Documentation

SystemComponent extends Component
in package

This component is used to handle activities related to the configuration of a Yioop installation, translations of text ging in the installation, as well as control of specifying what machines make up the installation and which processes they run.

Tags
author

Chris Pollett

Table of Contents

$parent  : object
Reference to the controller this component lives on
__construct()  : mixed
Sets up this component by storing in its parent field a reference to controller this component lives on
appearance()  : array<string|int, mixed>
Responsible for handling admin request related to the appearance activity
configure()  : array<string|int, mixed>
Responsible for handling admin request related to the configure activity
initCrawlBadges()  : mixed
Used to compute statistics for badges related for the manage crawls, mix crawls, and manage machine buttons shown typically to admin accounts
initializeWikiEditor()  : mixed
Called to include the Javascript Wiki Editor (wiki.js) on a page and to send any localizations needed from PHP to Javascript-land It is used by both Crawl and SocialComponent
initSocialBadges()  : mixed
Used to compute the impression statistics for badges on the social controls button for $user_id. These badges display the number of unread messages, the number of unread group post and the number of groups the user belongs to
manageLocales()  : array<string|int, mixed>
Handles admin request related to the manage locale activity
manageLocalesModifiers()  : array<string|int, mixed>
What modifiers of the manageLocales activity can be added in manageRoles
manageMachines()  : array<string|int, mixed>
Handles admin request related to the managing the machines which perform crawls
security()  : mixed
Responsible for the Captcha Settings and managing Captcha/Recovery questions.
serverSettings()  : array<string|int, mixed>
Handles admin panel requests for mail, database, tor, proxy server settings
systemCheck()  : string
Checks to see if the current machine has php configured in a way Yioop! can run.

Properties

$parent

Reference to the controller this component lives on

public object $parent = null

Methods

__construct()

Sets up this component by storing in its parent field a reference to controller this component lives on

public __construct(object $parent_controller) : mixed
Parameters
$parent_controller : object

reference to the controller this component lives on

Return values
mixed

appearance()

Responsible for handling admin request related to the appearance activity

public appearance() : array<string|int, mixed>

The activity is used to control the look and feel of the Yioop instance such as foreground, background color, icons, etc.

Return values
array<string|int, mixed>

$data fields for current appearance settings

configure()

Responsible for handling admin request related to the configure activity

public configure() : array<string|int, mixed>

The configure activity allows a user to set the work directory for storing data local to this SeekQuarry/Yioop instance. It also allows one to set the default language of the installation, debug info, robot info, test info, etc.

Return values
array<string|int, mixed>

$data fields for available language, debug level, etc as well as results of processing sub activity if any

initCrawlBadges()

Used to compute statistics for badges related for the manage crawls, mix crawls, and manage machine buttons shown typically to admin accounts

public initCrawlBadges(int $user_id, array<string|int, mixed> &$data) : mixed
Parameters
$user_id : int

of user - used to determin the mix crawl list

$data : array<string|int, mixed>

associative array of data to send to the view. This method adds three new field NUM_MIXES, CRAWL_MANAGER, "NUM_MACHINES, CRAWLS_RUNNING, and NUM_CLOSED_CRAWLS

Return values
mixed

initializeWikiEditor()

Called to include the Javascript Wiki Editor (wiki.js) on a page and to send any localizations needed from PHP to Javascript-land It is used by both Crawl and SocialComponent

public initializeWikiEditor(array<string|int, mixed> &$data[,  $id = "" ]) : mixed
Parameters
$data : array<string|int, mixed>

an asscoiative array of data to be used by the view and layout that the wiki editor will be drawn on This method tacks on to INCLUDE_SCRIPTS to make the layout load wiki.js.

$id : = ""

if "" then all textareas on page will get editor buttons, if -1 then sets up translations, but does not add any button, otherwise, add buttons to textarea $id will. (Can call this method multiple times, if want more than one but not all)

Return values
mixed

initSocialBadges()

Used to compute the impression statistics for badges on the social controls button for $user_id. These badges display the number of unread messages, the number of unread group post and the number of groups the user belongs to

public initSocialBadges(int $user_id, array<string|int, mixed> &$data) : mixed
Parameters
$user_id : int

id of user to compute statistics for

$data : array<string|int, mixed>

associative array of data to send to the view. This method adds three new field NUM_GROUPS, UNREAD_POSTS, and UNREAD_MESSAGES

Return values
mixed

manageLocales()

Handles admin request related to the manage locale activity

public manageLocales(array<string|int, mixed> $modifiers) : array<string|int, mixed>

The manage locale activity allows a user to add/delete locales, view statistics about a locale as well as edit the string for that locale

Parameters
$modifiers : array<string|int, mixed>

that affect acces to this activity

Return values
array<string|int, mixed>

$data info about current locales, statistics for each locale as well as potentially the currently set string of a locale and any messages about the success or failure of a sub activity.

manageLocalesModifiers()

What modifiers of the manageLocales activity can be added in manageRoles

public manageLocalesModifiers() : array<string|int, mixed>
Return values
array<string|int, mixed>

key value pairs modifier_name => localized description

manageMachines()

Handles admin request related to the managing the machines which perform crawls

public manageMachines() : array<string|int, mixed>

With this activity an admin can add/delete machines to manage. For each managed machine, the admin can stop and start fetchers/queue_servers as well as look at their log files

Return values
array<string|int, mixed>

$data MACHINES, their MACHINE_NAMES, data for FETCHER_NUMBERS drop-down

security()

Responsible for the Captcha Settings and managing Captcha/Recovery questions.

public security() : mixed
Return values
mixed

serverSettings()

Handles admin panel requests for mail, database, tor, proxy server settings

public serverSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

$data data for the view concerning the current settings so they can be displayed

systemCheck()

Checks to see if the current machine has php configured in a way Yioop! can run.

public systemCheck() : string
Return values
string

a message indicatign which required and optional components are missing; or "Passed" if nothing missing.


        

Search results