You appear to be a bot. Output may be restricted
Description
Create a dummy reflection object for the APILoad the function/method from the file and create a dummy reflection object that contains enough information for us to get by.
Usage
$refFunc = oikai_load_and_reflect( $funcname, $sourcefile, $component_slug, $classname );
Parameters
- $funcname
- ( string ) required – the function or method name
- $sourcefile
- ( string ) required – relative filename
- $component_slug
- ( string ) required – the plugin or theme slug
- $classname
- ( string ) required – the classname, if applicable
Returns
refFunc object or nullSource
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 31 of 31
function oikai_load_and_reflect( $funcname, $sourcefile, $component_slug, $classname ) { global $filename, $plugin, $component_type; $refFunc = null; bw_trace2( null, null, true, BW_TRACE_DEBUG ); //bw_backtrace(); if ( $sourcefile ) { // oik_require( $sourcefile, $plugin ); oik_require( "admin/oik-apis.php", "oik-shortcodes" ); $component_type = oiksc_query_component_type( $component_slug ); $filename = oik_pathw( $sourcefile, $component_slug, $component_type ); if ( file_exists( $filename ) ) { //require_once( $filename ); //$file = file_get_contents( $filename ); //p( "TBC" ); oik_require( "classes/oik-listapis2.php", "oik-shortcodes" ); $functions = oiksc_list_file_functions2( $sourcefile, $component_type, $component_slug ); //bw_trace2( $functions, "functions" ); $function = oiksc_find_function( $functions, $funcname, $classname ); //bw_trace2( $function ); if ( $function ) { $filename = $sourcefile; $plugin = $component_slug; $refFunc = $function->load_and_reflect(); } } else { p( "Source file not available: $sourcefile plugin: $plugin filename: $filename " ); } } return( $refFunc ); }View on GitHub