PHP code example of companyos / core

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

    

companyos / core example snippets


// config/bundles.php
return [
    // ... andere Bundles
    CompanyOS\CompanyOSCoreBundle::class => ['all' => true],
];



namespace MyPlugin;

use CompanyOS\Bundle\CoreBundle\Domain\Plugin\Domain\AbstractPlugin;

class MyPlugin extends AbstractPlugin
{
    public function getPluginName(): string
    {
        return 'my-plugin';
    }

    public function getVersion(): string
    {
        return '0.1.152-alpha
    }

    public function getAuthor(): string
    {
        return 'Your Name';
    }

    public function getRoutes(): array
    {
        return [
            'my_plugin_route' => '/my-route'
        ];
    }
}