PHP code example of shieldfy / shieldfy-yii-extension

1. Go to this page and download the library: Download shieldfy/shieldfy-yii-extension 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/ */

    

shieldfy / shieldfy-yii-extension example snippets


'bootstrap' => ['shieldfy'],
'components' => [
    ...
    'shieldfy' => [
          'class' => 'Shieldfy\Extensions\Yii\BootstrapLoader',
          'appKey' => '<APP_KEY>',
          'appSecret' => '<APP_SECRET>',
    ],
    ...
]

return [
    .....

    'on afterOpen' => function($event) {
            (\Yii::$container->get('shieldfy'))?\Yii::$container->get('shieldfy')->attachPDO($event->sender->pdo):null;
    }
]

return [
    'components' => [
        'db' => [
            ...
            'on afterOpen' => function($event) {
                (\Yii::$container->get('shieldfy'))?\Yii::$container->get('shieldfy')->attachPDO($event->sender->pdo):null;
        	},
        ],
        'mailer' => [
        .....
    ],
];