1. Go to this page and download the library: Download carono/yii2-giix 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/ */
namespace app\templates\model;
use carono\codegen\ClassGenerator;
use Nette\PhpGenerator\Method;
class Finder extends ClassGenerator
{
protected function formExtends()
{
return 'yii\base\Model';
}
protected function formClassNamespace()
{
return 'app\models\finders';
}
protected function formClassName()
{
return $this->params['className'] . 'Finder';
}
protected function formOutputPath()
{
return \Yii::getAlias('@app/models/finders/' . $this->formClassName() . '.php');
}
/**
* @param Method $method
*/
public function myFunction($method)
{
$method->addParameter('param');
$method->addBody('echo "Hello World";');
}
}
/**
* This class is generated using the package carono/codegen
*/
namespace app\models\finders;
class UserFinder extends \yii\base\Model
{
public function myFunction($param)
{
echo "Hello World";
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.