Base

class OC\Template\Base
Source:lib/private/Template/Base.php#35

Properties

Methods

public OC\Template\Base::__construct($template, $requestToken, $l10n, $theme)
Source:

lib/private/Template/Base.php#51

Parameters:
protected OC\Template\Base::getAppTemplateDirs($theme, $app, $serverRoot, $app_dir)
Source:

lib/private/Template/Base.php#66

Parameters:
  • $theme (string)
  • $app (string)
  • $serverRoot (string)
  • $app_dir (string | bool)
Returns:

string[]

protected OC\Template\Base::getCoreTemplateDirs($theme, $serverRoot)
Source:

lib/private/Template/Base.php#85

Parameters:
  • $theme (string)
  • $serverRoot (string)
Returns:

string[]

public OC\Template\Base::assign($key, $value)
Assign variables
Source:

lib/private/Template/Base.php#103

Parameters:
  • $key (string) key
  • $value (array | bool | int | string | \Throwable) value
Returns:

bool This function assigns a variable. It can be accessed via $_[$key] in the template.

If the key existed before, it will be overwritten

public OC\Template\Base::append($key, $value)
Appends a variable
Source:

lib/private/Template/Base.php#117

Parameters:
  • $key (string) key
  • $value (mixed) value

This function assigns a variable in an array context. If the key already exists, the value will be appended. It can be accessed via $_[$key][$position] in the template.

public OC\Template\Base::printPage()
Prints the proceeded template
Source:lib/private/Template/Base.php#131
Returns:bool This function proceeds the template and prints its output.
public OC\Template\Base::fetchPage($additionalParams=null)
Process the template
Source:

lib/private/Template/Base.php#149

Parameters:
  • $additionalParams (array | null)
Returns:

string This function processes the template.

This function processes the template.

protected OC\Template\Base::load($file, $additionalParams=null)
doing the actual work
Source:

lib/private/Template/Base.php#162

Parameters:
  • $file (string)
  • $additionalParams (array | null)
Returns:

string content

Includes the template file, fetches its output