PHP code example of timber / teak

1. Go to this page and download the library: Download timber/teak library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

timber / teak example snippets


/**
 * Class My_Public_Class
 *
 * @api
 */
class My_Public_Class {}

/**
 * Function summary.
 * 
 * Function description.
 *
 * @api
 * @example
 *
 * Optional text to describe the example
 * 
 * 

/**
 * Fires on a specific processing status.
 * 
 * The status can be one of the following: `success`, `error` or `fail`.
 */
do_action( "myplugin/process/status/{$status}" );
do_action( "myplugin/process/status/{$status}/{$action}" );
bash
vendor/bin/teak generate:class-reference ./lib/Post.php --output ./docs/reference

 *
 * @param string $param1 Description. Default 'value'.
 * @param bool   $param2 Description. Default true.
 */
function my_method( $param1 = 'value', $param2 = true ) {}