PHP code example of jumper423 / shelter
1. Go to this page and download the library: Download jumper423/shelter 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/ */
jumper423 / shelter example snippets
$shelter = \jumper423\Shelter::getInstance();
$cat1 = new \jumper423\Cat();
$shelter->newAnimal($cat1);
$dog1 = new \jumper423\Dog();
$shelter->newAnimal($dog1);
$dog2 = new \jumper423\Dog();;
$shelter->newAnimal($dog2);
$animalsCats = $shelter->viewAnimal(\jumper423\Cat::class);
$animalsDogs = $shelter->viewAnimal(\jumper423\Dog::class);
$people = new \jumper423\People();
$animal1= $shelter->transferAnimal(\jumper423\Cat::class);
$people->newAnimal($animal1);
$animal2 = $shelter->transferAnimal();
$people->newAnimal($animal2);
php composer.phar