PHP code example of mixerapi / core

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

    

mixerapi / core example snippets


# src/Application.php
use Cake\Http\BaseApplication;
use MixerApi\Core\Event\EventListenerLoader;

class Application extends BaseApplication
{
    public function bootstrap(): void
    {
        // ...other code
        (new EventListenerLoader())->load();
        // other code...
    }
}

use MixerApi\Core\Utility\NamespaceUtility;

$controllers = NamespaceUtility::findClasses('\App\Controller');

use MixerApi\Core\Utility\NamespaceUtility;

$controllers = NamespaceUtility::findClasses('\App\Controller', ['/absolute/path/to/src']);