PHP code example of nattreid / reference-service

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

    

nattreid / reference-service example snippets


class ReferenceService extends Service {

    /**
     * @return array[key => class]
     */
    public static function getEntities()
    {
        return [
            1 => Test::class,
            2 => Test2::class,
            3 => Test3::class,
            4 => Test4::class,
        ];
    }
}

class Test extends Entity {

}