1. Go to this page and download the library: Download eloquent/cosmos 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/ */
use Eloquent\Cosmos\ClassName;
use Eloquent\Cosmos\ClassNameResolver;
$resolver = new ClassNameResolver(
ClassName::fromString('\MilkyWay\SolarSystem'), // namespace
array(
array(
ClassName::fromString('\MilkyWay\AlphaCentauri\ProximaCentauri'), // use
),
array(
ClassName::fromString('\Andromeda\GalacticCenter'), // use
ClassName::fromString('Andromeda'), // as
),
)
);
namespace MilkyWay\SolarSystem;
use MilkyWay\AlphaCentauri\ProximaCentauri;
use Andromeda\GalacticCenter as Andromeda;