You appear to be a bot. Output may be restricted
Description
Determine the reference type for a string
Usage
$string = oikai_determine_reference_type( $string );
Parameters
- $string
- ( string ) required – the passed string literal
Returns
string the determined reference typeValue | Meaning |
---|---|
internal | This is a PHP function |
user | This is a currently active application function |
T_STRING | We couldn’t decide |
constant | It’s a defined constant name ( currently active ) |
T_ other | It’s a PHP token such as T_REQUIRE, T_REQUIRE_ONCE, etc |
class | It’s a class |
function | It’s a function – but it’s not active otherwise we’d have received “user” or “internal” |
method | It’s a method ( with class name ) |
null | Not expected at the end of this processing |
Source
File name: oik-shortcodes/shortcodes/oik-api.phpLines:
1 to 17 of 17
function oikai_determine_reference_type( $string ) { $reference_type = oikai_determine_function_type( $string ); if ( !$reference_type ) { $reference_type = oikai_determine_from_tokens( $string ); } if ( $reference_type == "T_STRING" ) { $reference_type = oikai_check_constants( $string ); } if ( $reference_type == "T_STRING" ) { $reference_type = oikai_check_class_method_or_function( $string ); } //p( "$string:$reference_type" ); return( $reference_type ); }View on GitHub