PHP code example of phpdevcommunity / michel-package-starter

1. Go to this page and download the library: Download phpdevcommunity/michel-package-starter 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/ */

    

phpdevcommunity / michel-package-starter example snippets




namespace PhpDevCommunity\Michel\Package;

interface PackageInterface
{
    public function getDefinitions(): array;

    public function getParameters(): array;

    public function getListeners(): array;

    public function getRoutes(): array;

    public function getCommands(): array;
}

final class MyCustomPackage implements PackageInterface
{
    public function getDefinitions(): array
    {
        // Implement your service definitions here
        return [];
    }

    public function getParameters(): array
    {
        // Define package-specific parameters here
        return [];
    }

    public function getListeners(): array
    {
        // Specify event listeners provided by your package
        return [];
    }

    public function getRoutes(): array
    {
        // Define package-specific routes here
        return [];
    }

    public function getCommands(): array
    {
        // List console commands provided by your package
        return [];
    }
}



// /config/packages.php

return [
    MyCustomPackage::class => ['dev', 'prod'],
];