PHP Class SassScriptFunction

Preforms a SassScript function.
Exibir arquivo Open project: richthegeek/phpsass Class Usage Examples

Public Properties

Property Type Description
$context

Public Methods

Method Description
__construct ( string $name, array $args ) : SassScriptFunction SassScriptFunction constructor
extractArgs ( $string, $include_null = TRUE, $context )
fill_parameters ( $required, $provided, $context, $source )
get_reflection ( $method )
isa ( string $subject ) : mixed Returns a value indicating if a token of this type can be matched at the start of the subject string.
perform ( ) : object Evaluates the function.

Private Methods

Method Description
import ( string $dir ) : array Imports files in the specified directory.
process_arguments ( $input )

Method Details

__construct() public method

SassScriptFunction constructor
public __construct ( string $name, array $args ) : SassScriptFunction
$name string name of the function
$args array arguments for the function
return SassScriptFunction

extractArgs() public static method

public static extractArgs ( $string, $include_null = TRUE, $context )

fill_parameters() public static method

public static fill_parameters ( $required, $provided, $context, $source )

get_reflection() public static method

public static get_reflection ( $method )

isa() public static method

Returns a value indicating if a token of this type can be matched at the start of the subject string.
public static isa ( string $subject ) : mixed
$subject string the subject string
return mixed match at the start of the string or false if no match

perform() public method

Look for a user defined function first - this allows users to override pre-defined functions, then try the pre-defined functions.
public perform ( ) : object
return object the value of this Function

Property Details

$context public_oe static_oe property

public static $context