PHP Class Vanilla\Utility\DelimitedScheme

Inheritance: extends NameScheme
显示文件 Open project: vanilla/vanilla

Public Methods

Method Description
__construct ( $delimiter, NameScheme $scheme )
convert ( string $name ) : string Convert a name into this name spec.
getDelimiter ( ) : string Get the delimiter.
getScheme ( ) : NameScheme Get the scheme.
setDelimiter ( string $delimiter ) : DelimitedScheme Set the delimiter.
setScheme ( NameScheme $scheme ) : DelimitedScheme Set the scheme.
valid ( string $name ) : boolean Test that a name is valid for this scheme.

Method Details

__construct() public method

public __construct ( $delimiter, NameScheme $scheme )
$scheme NameScheme

convert() public method

Convert a name into this name spec.
public convert ( string $name ) : string
$name string The name to convert to this scheme.
return string Returns the new name as a string.

getDelimiter() public method

Get the delimiter.
public getDelimiter ( ) : string
return string Returns the delimiter.

getScheme() public method

Get the scheme.
public getScheme ( ) : NameScheme
return NameScheme Returns the scheme.

setDelimiter() public method

Set the delimiter.
public setDelimiter ( string $delimiter ) : DelimitedScheme
$delimiter string
return DelimitedScheme Returns `$this` for fluent calls.

setScheme() public method

Set the scheme.
public setScheme ( NameScheme $scheme ) : DelimitedScheme
$scheme NameScheme
return DelimitedScheme Returns `$this` for fluent calls.

valid() public method

Test that a name is valid for this scheme.
public valid ( string $name ) : boolean
$name string The name to test.
return boolean Returns **true** if the name is valid for this spec or **false** otherwise.