Copied!
CloneableInstantiable
Constants
public PHPFUI\InstaDoc\Controller::CLASS_NAME = 'c'
public PHPFUI\InstaDoc\Controller::CSS_FILE = 'CSS'
public PHPFUI\InstaDoc\Controller::DOC_PAGE = 'd'
public PHPFUI\InstaDoc\Controller::FILE_PAGE = 'f'
public PHPFUI\InstaDoc\Controller::GIT_LIMIT = 'gl'
public PHPFUI\InstaDoc\Controller::GIT_ONPAGE = 'gp'
public PHPFUI\InstaDoc\Controller::GIT_PAGE = 'g'
public PHPFUI\InstaDoc\Controller::GIT_SHA1 = 'gs'
public PHPFUI\InstaDoc\Controller::NAMESPACE = 'n'
public PHPFUI\InstaDoc\Controller::PAGE = 'p'
public PHPFUI\InstaDoc\Controller::TAB_SIZE = 't'
public PHPFUI\InstaDoc\Controller::VALID_CLASS_PAGES = ['d', 'f', 'g']
Methods
public __construct(PHPFUI\InstaDoc\FileManager $fileManager)
public addHomePageMarkdown(string $path) : PHPFUI\InstaDoc\Controller
public clearMenu() : PHPFUI\InstaDoc\Controller
 

Clears the cached menu in case you want to use two or more menu types on a page

public display(array $classPagesToShow = ['d', 'f', 'g']PHPFUI\InstaDoc\Controller::VALID_CLASS_PAGES, ?PHPFUI\InstaDoc\PageInterface $page = NULL) : string
 

Display a page according to the parameters passed on the url.

  • param string[] $classPagesToShow limits the allowed pages to display, used for static file generation
  • param ?\PageInterface $page to use, default to current controller page, but pass in a new page for multiple page generations on the same controller instance
public generate(string $directoryPath, array $pagesToInclude = ['d'], string $extension = '.html') : array
 

Generate static files for high volume sites. Pass the path to the directory where you want the files to be placed, it must exist.

  • param string[] $pagesToInclude
  • return array<string,float|int<1, max>> array with generation file count and time
public getAccessTabs() : array
 
  • return string[] tabs to show access in UI
public getClassParts(string $namespacedClass) : array
 

break up a namespaced class into parts

  • return array<string,string>
public getClassUrl(string $namespacedClass) : string
 

Get the url given a class

public getConstructorParameters(string $className) : string
 

Get parameters for the class and method

public getControllerPage() : PHPFUI\InstaDoc\PageInterface
 

Returns the current page for the controller that will be used to display the documentation.

public getFileManager() : PHPFUI\InstaDoc\FileManager
public getGitFileOffset() : string
 

The git file offset is a relative path to the source to make it compatible with the git repo path.

public getGitRoot() : string
 

The git root is the directory where the associated git repo lives

public getHomePageMarkdown() : array
 

Get unique home page markdown files

  • return string[] markdown file names
public getLandingPageUrl(string $namespace) : string
 

Return a landing page URL

public getMenu(?PHPFUI\Menu $menu = NULL) : PHPFUI\Menu
 

Return a menu

  • param PHPFUI\Menu $menu to use if you don't want the default AccordionMenu
public getNamespaceURL(string $namespace) : string
 

Get the url for a namespace

public getPage() : PHPFUI\InstaDoc\PageInterface
 

Gets a blank page and sets the page title. Override to change the generated page layout.

public getPageURL(string $page) : string
 

Get the url for the specified page

public getParameter(string $parameter, ?string $default = NULL) : string
 

Get a specific parameter

public getParameters() : array
 

Get all parameters

  • return array<string,string>
public getSection(string $sectionName) : PHPFUI\InstaDoc\Section
 

Get a section for display. Override to change layout

public getUrl(array $parameters) : string
 

Get a url given parameters. Remove invalid parameters.

  • param array<string,string> $parameters
public setAccessTabs(array $tabs) : PHPFUI\InstaDoc\Controller
 
  • param string[] $tabs tabs to show access in UI
public setGitFileOffset(string $directory) : PHPFUI\InstaDoc\Controller
 

The git file offset is a relative path to the source to make it compatible with the git repo path.

public setGitRoot(string $directory) : PHPFUI\InstaDoc\Controller
 

This allows InstaDoc to open and display commits from the associated git repo

public setHomeUrl(string $url) : PHPFUI\InstaDoc\Controller
 

Set the home URL for the nav bar menu

public setPageTitle(string $title) : PHPFUI\InstaDoc\Controller
 

Set the title for the page

public setParameter(string $parameter, string $value) : PHPFUI\InstaDoc\Controller
 

Set a parameter, must be valid

public setParameters(array $parameters) : PHPFUI\InstaDoc\Controller
 

Set the valid parameters from an array

  • param array<string,string> $parameters key value pairs
Constants
private PHPFUI\InstaDoc\Controller::SECTIONS = ['Git', 'File', 'Doc', 'Landing', 'Home', 'GitDiff']
private PHPFUI\InstaDoc\Controller::VALID_PARAMETERS = ['n' => '', 'c' => '', 't' => '', 'CSS' => '', 'p' => '', 'gl' => '', 'gp' => '', 'gs' => '']
private PHPFUI\InstaDoc\Controller::VALID_STATIC_PARTS = ['n', 'c', 'p']
Properties
private array $accessTabs
 
  • var string[] $accessTabs tabs to show access in UI
private PHPFUI\InstaDoc\FileManager $fileManager
private string $generating
private string $gitFileOffset
private string $gitRoot
private array $homePageMarkdown
 
  • var array<string,bool> markdown file names
private string $homeUrl
private PHPFUI\Menu $menu
private PHPFUI\InstaDoc\PageInterface $page
private array $parameters
 
  • var array<string,string>
private string $siteTitle
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration