1. Go to this page and download the library: Download eudiegoborgs/hyperf-cgen 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/ */
// path/to/real/stub/example_type_interface.stub
declare(strict_types=1);
namespace %NAMESPACE%;
use %other_type.NAMESPACE%\%other_type.CLASS%;
class %CLASS%
{
public function __construct(
private %other_type.CLASS% %other_type.VARIABLE_NAME%
) {}
}
declare(strict_types=1);
namespace CyBorgs\Hyperf\CGen\OtherCustom;
class PrefixMyClassNameSuffix
{
}
declare(strict_types=1);
namespace CyBorgs\Hyperf\CGen\Custom\MyClassName\Interfaces;
class MyClassNameInterface
{
}
declare(strict_types=1);
namespace CyBorgs\Hyperf\CGen\Custom;
use CyBorgs\Hyperf\CGen\OtherCustom\PrefixMyClassNameSuffix;
class MyClassName
{
public function __construct(
private PrefixMyClassNameSuffix $classTest
) {}
}