PHP code example of reketaka / yii2-helps

1. Go to this page and download the library: Download reketaka/yii2-helps 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/ */

    

reketaka / yii2-helps example snippets


'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'templateFile' => '@reketaka/helps/common/views/migration/migration.php',
            'generatorTemplateFiles' => [
                'create_table'=>'@reketaka/helps/common/views/migration/createTableMigration.php'
            ]
        ]

php composer.phar 

'modules'=>[
        'importOnec'=>[
            'class'=>'reketaka\helps\modules\onec\Module',
            'userName'=>'test';
            'userPassword'=>'test';
            'authKeyName'=>'AuthKey';
            'authKeyVal'=>'pzshkmm0VzIZru65cB1Zsr6o47xZYqpR';
            'maxFileSize'=>102400;
            'enableZip'=>true;
            'saveDirPath'=>'@backend/runtime/temp';
            'authKeyCallback' => function(){
                if (!($cookie = Yii::$app->request->headers->get('cookie', false))) {
                    throw new Exception('Not find authKey in Cookie');
                }

                list($n, $authKey) = explode('=', $cookie);
                return $authKey;
            }
        ]
    ]