[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oikai_print_param() – Print a parameter

You appear to be a bot. Output may be restricted

Description

Print a parameter

Parameter #1 [ <optional> $parm2 = NULL ]DocBlock Object 
( 
[short_description:protected] => relect on me a while 
[long_description:protected] => Function to test the reflection logic to parse phpDoc comments and function prototypes 
If this works we can use this to dynamically generate content on the webpage 
BUT, since it may be dependent upon a certain version of PHP we might just have 
to create or update an oik_api record with the information 
[tags:protected] => Array 
( 
[0] => @link http://www.oik-plugins/ 
[1] => @param string $parm1 - parameter 1 
[2] => @return string|null 
) 

[namespace:protected] => \ 
[namespace_aliases:protected] => Array 
( 
) 

) 
When the param is an array then we may document the array with a series of @type tags which should also be formatted for the given param We stop processing the @type fields when we come across another @param tag

Usage

oikai_print_param( $param, $docblock );

Parameters

$param
( object ) required – refFunc parameter object
$docblock
( object ) required – docBlock for the function

Returns

void

Source

File name: oik-shortcodes/shortcodes/oik-api-importer.php
Lines:
1 to 45 of 45
function oikai_print_param( $param, $docblock ) {
  //bw_trace2();
  //bw_backtrace();
  $parm = bw_array_get( $param, "name" );
  $parm = "$". $parm;
  $tags = $docblock->getTags();
  $found = null;
  //bw_trace2( $parm, "parm", true, BW_TRACE_VERBOSE );
  //bw_trace2( $tags, "tags", false, BW_TRACE_VERBOSE ); 
  $processed = null;
  $starteddl = false;
  foreach ( $tags as $tag ) {
    bw_trace2( $tag, "tag", false, BW_TRACE_VERBOSE );
    list( $tagname, $type, $name, $description ) = oikai_explode_tag( $tag ); 
    if ( $tagname == "@param" ) { 
      if ( $name == $parm ) {
        oikai_print_param_info( $param, $type, $name, $description );
        $found = $name;
        $processed = $name;
        //break;
      } else {
        $found = null;
        //bw_trace2( $name, "wrong param $parm " );
      }
    } elseif ( $tagname == "@type" ) {
      if ( $found == $parm ) {
        if ( !$starteddl ) {
          stag( "dl" );
          $starteddl = true;
        }
        oikai_print_param_info( $param, $type, $name, $description );
      }
    } else {
      // I think we can do without the break!   break;
    } 
    
  }
  
  if ( $starteddl ) {
    etag( "dl" );
  }
  if ( null == $processed ) {
    oikai_print_param_info( $param );
  }
} 
 
 View on GitHub

Published: March 11, 2017 | Last updated: March 11, 2017

Information

Function name: oikai_print_param
Plugin ref: oik block shortcode and API server
Version: 1.41.1
Sourcefile: shortcodes/oik-api-importer.php
File ref: shortcodes/oik-api-importer.php
Deprecated?: No
API Letters: O,P

Recent plugin updates

oik v4.9.2 Upgrade to oik v4.9.2 for support for PHP 8.1 and PHP 8.2. ...
oik-block v0.3.0 oik-block v0.3.0 no longer displays the Editor selection meta box ...
oik-blocks v1.4.3 Upgrade to oik-blocks v1.4.3 for PHP 8.2 support. ...
cookie-cat v1.4.6 Upgrade to cookie-cat v1.4.6 for PHP 8.1 & PHP 8.2 support. ...
oik-fields v1.54.0 oik-fields v1.54.0 caters for the deprecation of get_page_by_title() in WordPress 6.2. ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: herb@bobbingwide.com

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2023. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.3.1. PHP: 7.4.33. Memory limit: 768M