PHP Класс Gregwar\RST\Environment

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$errorManager Error manager
$letters Letters used as separators for titles and horizontal line
$prettyTableHeader
$prettyTableJoint
$prettyTableLetter
$tableLetter Table letters

Защищенные свойства (Protected)

Свойство Тип Описание
$anonymous Anonymous links stack
$counters
$currentDirectory
$currentFileName Current file name
$currentTitleLevel Title letter for each levels
$dependencies Dependencies of this document
$levels Level counters
$links Links
$metas Metas
$references References that can be resolved
$targetDirectory
$titleLetters
$url
$variables Variables of the document

Открытые методы

Метод Описание
__construct ( )
absoluteRelativePath ( $url ) Returns an absolute path for a relative given URL
addDependency ( $dependency ) Adds a dependency to the document
canonicalUrl ( $url ) Gets a canonical URL from the given one
createTitle ( $level ) Title level
found ( $section, $data )
getDependencies ( ) Getting all the dependencies for this environment
getDepth ( ) Get the depth of the current file name (the number of parent directories)
getDirName ( ) Returns the directory name
getErrorManager ( )
getLevel ( $letter )
getLink ( $name, $relative = true ) Get a link value
getMetas ( )
getMyToc ( ) Get the docs involving this document
getNumber ( $level ) Get a level number
getParent ( ) Get my parent metas
getTargetDirectory ( )
getTitleLetters ( )
getUrl ( )
getVariable ( $variable, $default = null ) Gets the variable value
pushAnonymous ( $name ) Set the current anonymous links name
registerReference ( Gregwar\RST\Reference $reference ) Registers a new reference
relativeUrl ( $url ) Resolves a relative URL using directories, for instance, if the current directory is "path/to/something", and you want to get the relative URL to "path/to/something/else.html", the result will be else.html. Else, ".
reset ( ) Puts the environment in a clean state for a new parse, like title level order.
resetAnonymousStack ( ) Resets the anonymous stack
resolve ( $section, $data ) Resolves a reference
setCurrentDirectory ( $directory ) Sets the directory of the current parsing
setCurrentFileName ( $filename ) Sets the current file name
setErrorManager ( Gregwar\RST\ErrorManager $errorManager )
setLink ( $name, $url ) Set the link url
setMetas ( $metas )
setTargetDirectory ( $directory )
setUrl ( $url )
setVariable ( $variable, $value ) Sets the giving variable to a value

Защищенные методы

Метод Описание
canonicalize ( $url ) Canonicalize a path, a/b/c/.
samePrefix ( $url ) Returns true if the given url have the same prefix as the current document

Описание методов

__construct() публичный Метод

public __construct ( )

absoluteRelativePath() публичный Метод

Returns an absolute path for a relative given URL
public absoluteRelativePath ( $url )

addDependency() публичный Метод

Adds a dependency to the document
public addDependency ( $dependency )

canonicalUrl() публичный Метод

Gets a canonical URL from the given one
public canonicalUrl ( $url )

canonicalize() защищенный Метод

./d/e will become a/b/d/e
protected canonicalize ( $url )

createTitle() публичный Метод

Title level
public createTitle ( $level )

found() публичный Метод

public found ( $section, $data )

getDependencies() публичный Метод

Getting all the dependencies for this environment
public getDependencies ( )

getDepth() публичный Метод

Get the depth of the current file name (the number of parent directories)
public getDepth ( )

getDirName() публичный Метод

Returns the directory name
public getDirName ( )

getErrorManager() публичный Метод

public getErrorManager ( )

getLevel() публичный Метод

public getLevel ( $letter )

getMetas() публичный Метод

public getMetas ( )

getMyToc() публичный Метод

Get the docs involving this document
public getMyToc ( )

getNumber() публичный Метод

Get a level number
public getNumber ( $level )

getParent() публичный Метод

Get my parent metas
public getParent ( )

getTargetDirectory() публичный Метод

public getTargetDirectory ( )

getTitleLetters() публичный Метод

public getTitleLetters ( )

getUrl() публичный Метод

public getUrl ( )

getVariable() публичный Метод

Gets the variable value
public getVariable ( $variable, $default = null )

pushAnonymous() публичный Метод

Set the current anonymous links name
public pushAnonymous ( $name )

registerReference() публичный Метод

Registers a new reference
public registerReference ( Gregwar\RST\Reference $reference )
$reference Gregwar\RST\Reference

relativeUrl() публичный Метод

./" will be added to go to the upper directory
public relativeUrl ( $url )

reset() публичный Метод

Puts the environment in a clean state for a new parse, like title level order.
public reset ( )

resetAnonymousStack() публичный Метод

Resets the anonymous stack
public resetAnonymousStack ( )

resolve() публичный Метод

Resolves a reference
public resolve ( $section, $data )

samePrefix() защищенный Метод

Returns true if the given url have the same prefix as the current document
protected samePrefix ( $url )

setCurrentDirectory() публичный Метод

Sets the directory of the current parsing
public setCurrentDirectory ( $directory )

setCurrentFileName() публичный Метод

Sets the current file name
public setCurrentFileName ( $filename )

setErrorManager() публичный Метод

public setErrorManager ( Gregwar\RST\ErrorManager $errorManager )
$errorManager Gregwar\RST\ErrorManager

setMetas() публичный Метод

public setMetas ( $metas )

setTargetDirectory() публичный Метод

public setTargetDirectory ( $directory )

setUrl() публичный Метод

public setUrl ( $url )

setVariable() публичный Метод

Sets the giving variable to a value
public setVariable ( $variable, $value )
$variable the variable name
$value the variable value

Описание свойств

$anonymous защищенное свойство

Anonymous links stack
protected $anonymous

$counters защищенное свойство

protected $counters

$currentDirectory защищенное свойство

protected $currentDirectory

$currentFileName защищенное свойство

Current file name
protected $currentFileName

$currentTitleLevel защищенное свойство

Title letter for each levels
protected $currentTitleLevel

$dependencies защищенное свойство

Dependencies of this document
protected $dependencies

$errorManager публичное свойство

Error manager
public $errorManager

$letters публичное статическое свойство

Letters used as separators for titles and horizontal line
public static $letters

$levels защищенное свойство

Level counters
protected $levels

$metas защищенное свойство

Metas
protected $metas

$prettyTableHeader публичное статическое свойство

public static $prettyTableHeader

$prettyTableJoint публичное статическое свойство

public static $prettyTableJoint

$prettyTableLetter публичное статическое свойство

public static $prettyTableLetter

$references защищенное свойство

References that can be resolved
protected $references

$tableLetter публичное статическое свойство

Table letters
public static $tableLetter

$targetDirectory защищенное свойство

protected $targetDirectory

$titleLetters защищенное свойство

protected $titleLetters

$url защищенное свойство

protected $url

$variables защищенное свойство

Variables of the document
protected $variables