PHP code example of thangnm93 / yii2-decomposer

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

    

thangnm93 / yii2-decomposer example snippets


return [
    'bootstrap' => ['decomposer'],
    'modules' => [
        'decomposer' => [
            'class' => 'thangnm93\decomposer\Module',
        ],
        // ...
    ],
    ...
];

  return [
      'components' => [
          'decompose' => [
              'class' => 'thangnm93\decomposer\Decomposer',
          ],
      ],
      ...
  ];
  

  use thangnm93\decomposer\helpers\DecomposerHelper;
    

  $decomposerStats = DecomposerHelper::getReportArray();
  

  use thangnm93\decomposer\helpers\DecomposerHelper;
    

  $decomposerStats = DecomposerHelper::getReportJson();