PHP code example of jeyroik / extas-installer

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

    

jeyroik / extas-installer example snippets


namespace my\extas;

use extas\components\Item;

class My extends Item
{
    protected function getSubjectForExtension(): string
    {
        return 'my';
    }
}

namespace my\extas;

use extas\components\repositories\Repository;

class MyRepository extends Repository
{
    protected string $pk = 'name';
    protected string $itemClass = My::class;
    protected string $scope = 'my';
    protected string $name = 'names';
}

namespace my\extas;

use extas\components\plugins\install\InstallSection;

class PluginInstallMyNames extends InstallSection
{
    protected string $selfSection = 'my_names';
    protected string $selfName = 'my name';
    protected string $selfRepositoryClass = 'myRepository';
    protected string $selfUID = 'name';
    protected string $selfItemClass = My::class;
}