Ferreteria/v0.5/@cls/cKiosk: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
(Created page with "{{fmt/title|class <code>menu\cKiosk</code>}} ==Methods== * public function __construct(string $wp) { $this->SetPath($wp); } * protected function SetPath(string $wp) { $this->w...")
 
(moved cKiosk_admin method-usage to page for that class)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{fmt/title|class <code>menu\cKiosk</code>}}
{{fmt/title|class <code>menu\cKiosk</code>}}
* '''namespace''': {{l/same|menu}}
* '''source''': {{l/ferreteria/code|menu/kiosk.php}}
==Methods==
==Methods==
* public function __construct(string $wp) { $this->SetPath($wp); }
{| class="wikitable sortable"
* protected function SetPath(string $wp) { $this->wp = ltrim($wp,'/'); } // make it a relative path
! access || function name || code (if short) || purpose
* public function GetAbsolutePath($doEndSlash) : string
|-
* public function GetRelativePath(bool $doEndSlash) : string
| public || __construct(string $wp) || { $this->SetPath($wp); }
* public function MakeURLFromString(string $sPath) : string
|-
** RETURNS: The full URL for the given input string
| protected || SetPath(string $wp) || { $this->wp = ltrim($wp,'/'); } || make it a relative path
*** This format can be overridden if you want the string to be presented some other way, such as in a ?query
|-
* public function GetInputString(bool $doEndSlash) : string
| public || GetAbsolutePath($doEndSlash) : string
** RETURNS: The string from which all input arguments may be parsed
|-
*** This format can be overridden if you want to get the string from somewhere else, such as a ?query
| public || GetRelativePath(bool $doEndSlash) : string
* public function DumpFull() : string {
|-
| public || MakeURLFromString(string $sPath) : string
|
| RETURNS: The full URL for the given input string
* This format can be overridden if you want the string to be presented some other way, such as in a ?query
|-
| public || GetInputString(bool $doEndSlash) : string
|
| RETURNS: The string from which all input arguments may be parsed
* This format can be overridden if you want to get the string from somewhere else, such as a ?query
|-
| public || DumpFull() : string
|}
==Usage==
* {{l/ver/class|cDropIndex}}::RegisterMenuBits() ({{l/ferreteria/code|base/dropin.php}}) calls <code>GetAbsolutePath(TRUE)</code>
* {{l/ver/class|caPageContent}}::RedirectToDefaultPage() ({{l/ferreteria/code|layout/page/content.php}}) calls <code>GetAbsolutePath(TRUE)</code>
* {{l/ver/class|caWidget}}
** ::RedirectAfterLogin() calls <code>MakeURLFromString($uri)</code>
** multiple calls to <code>GetAbsolutePath(TRUE)</code>
** Also calls one method that's only in {{l/ver/class|cKiosk_admin}}.
* {{l/ver/class|taForObject}}::LinkURL() calls <code>GetAbsolutePath(TRUE)</code>
 
===access methods===
These are global ways of accessing the active Kiosk object:
* {{l/ver/class|caAppUser}}::GetKioskObject() is supposed to be the canonical method to bring up a singleton object of the app-appropriate class.
* {{l/ver/class|caDynamicLink}}::GetAppKiosk() is an alias to <code>F\caApp::Me()->GetKioskObject()</code>

Latest revision as of 00:05, 18 October 2022

class menu\cKiosk

Methods

access function name code (if short) purpose
public __construct(string $wp) { $this->SetPath($wp); }
protected SetPath(string $wp) { $this->wp = ltrim($wp,'/'); } make it a relative path
public GetAbsolutePath($doEndSlash) : string
public GetRelativePath(bool $doEndSlash) : string
public MakeURLFromString(string $sPath) : string RETURNS: The full URL for the given input string
  • This format can be overridden if you want the string to be presented some other way, such as in a ?query
public GetInputString(bool $doEndSlash) : string RETURNS: The string from which all input arguments may be parsed
  • This format can be overridden if you want to get the string from somewhere else, such as a ?query
public DumpFull() : string

Usage

access methods

These are global ways of accessing the active Kiosk object:

  • caAppUser::GetKioskObject() is supposed to be the canonical method to bring up a singleton object of the app-appropriate class.
  • caDynamicLink::GetAppKiosk() is an alias to F\caApp::Me()->GetKioskObject()