PHP code example of germania-kg / worlds
1. Go to this page and download the library: Download germania-kg/worlds 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/ */
germania-kg / worlds example snippets
$worlds = new Germania\Worlds\Worlds( $pdo );
// Use either ID or URL slug
$check = $worlds->has( 'my_world' );
$check = $worlds->has( 42 );
// Use either ID or URL slug
$my_world = $worlds->get( 'my_world' );
$my_world = $worlds->get( 42 );
echo $my_world->getName();