\seekquarry\yioop\configsConfigureTool

Provides a command-line interface way to configure a Yioop Instance.

Unlike the web interface this interface is English-only.

Summary

Methods
Properties
Constants
__construct()
loop()
configureMenu()
workDirectory()
rootPassword()
defaultLocale()
debugDisplay()
searchAccess()
searchPageElementLinks()
nameServer()
robotSetUp()
confirmChange()
drawChooseItems()
callConfigure()
banner()
prepareGlobals()
copyProfileFields()
$admin
$menu
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$admin

$admin : object

Used to hold an AdminController object used to manipulate the Yioop configuration

Type

object

$menu

$menu : array

Holds the main menu data for the configuration tool

Type

array

Methods

__construct()

__construct() 

To change configuration parameters of Yioop, this program invokes AdminController methods. These methods expect, data passed to them in super globals set up as a result of an HTTP request. This program fakes the settings of these variables.

To keep things simple this constructor initializes each of the relevant super globals to be empty arrays.

loop()

loop() 

This is the main loop where options of what the user can configure are presented, a choice is requested, and so on.

..

configureMenu()

configureMenu() 

This is used to draw the main configuration menu and ask for a user selection

workDirectory()

workDirectory() 

Used to create/change the location of this Yioop instances work directory

rootPassword()

rootPassword() 

Used to change the password of the root account of this Yioop Instance

defaultLocale()

defaultLocale() 

Changes the default locale (language) used by Yioop when it cannot determine that information from the users browswer

debugDisplay()

debugDisplay() 

Used to configure debugging information for this Yioop instance.

i.e., whether PHP notices, warnings, errors, should be displayed, whether query statistics and info should be displayed, and whether unit tests should be viewable from the web

searchAccess()

searchAccess() 

Configures which methods are allowed by this Yioop instance to access search results, (via the web, via open rss search results, via the API)

searchPageElementLinks()

searchPageElementLinks() 

Configures which of the various links of the SERPS page such as Cache, etc should be displayed. Also, configures whether the signin links, etc should be displayed.

nameServer()

nameServer() 

Configures settings relating to the location of the name server and the salt used when communicating with it. Also, configures caching mechanisms the name server should use when returning results.

robotSetUp()

robotSetUp() 

Used to set up the name of this instance of the Yioop robot as well as its description page.

confirmChange()

confirmChange(string  $admin_method, string  $reenter_method) : string

Used to select to confirm, cancel, or re-enter the last profile change

Parameters

string $admin_method

to call if confirmed

string $reenter_method

, return value if reenter chosen

Returns

string —

menu name to do to next

drawChooseItems()

drawChooseItems(array  $items, string  $currentView) : string

Draws a list of options to the screen and gets a choice from this list from the user.

Parameters

array $items

as associative array (return value => description)

string $currentView

value to return if invalid choice made

Returns

string —

a choice from the user

callConfigure()

callConfigure() 

Used to call system components configure method. It detects if a redirect happened by the fact that $data['PROFILE'] is not set.

If so it passes along the redirect message and re-calls configure()

banner()

banner() 

Prints the banner used by this configuration tool

prepareGlobals()

prepareGlobals(array  $data) 

Sets-up the field values of the super globals used by AdminController when changing a profile or managing passwords. These particular values don't change with respect to what this tool does.

Parameters

array $data

current profile state

copyProfileFields()

copyProfileFields(array  $data) : array

Used to copy the contents of $data which are profile fields to a new array.

Parameters

array $data

an array of profile and other fields

Returns

array —

a new array containing a copy of just the profile fields from the orginal array