PHP code example of ndakotabe / php-ide-stub-generator

1. Go to this page and download the library: Download ndakotabe/php-ide-stub-generator 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/ */

    

ndakotabe / php-ide-stub-generator example snippets


$generator = new Z\IdeStubGenerator\Strategy\PSR0();

$generator = new Z\IdeStubGenerator\Strategy\OneFile();

$generator->setTagToIgnore('@ignore');

$generator = new Z\IdeStubGenerator\Strategy\PSR0();
$generator->setBaseDir(...); //  'functions.php'
// $generator->setConstantsStubFileName('constants.stub.php'); // optional. Default: 'constants.php'

// $generator->setClasses(array('class_name', ...)); // optional
// $generator->setFunctions(array('function_name', ...)); // optional
// $generator->setConstants(array('constant_name'=>constant_value, ...)); // optional
$generator->generate();

$generator = new Z\IdeStubGenerator\Strategy\OneFile();
$generator->setFilePath(...); // tions(array('function_name', ...)); // optional
// $generator->setConstants(array('constant_name'=>constant_value, ...)); // optional
$generator->generate();