Esempio n. 1
0
 public function __construct()
 {
     $config = [];
     require __DIR__ . '/../lib/conf.php';
     $bees = new BeeBuilder($config);
     $bees->createBees();
     $this->response = new Response($bees);
 }
Esempio n. 2
0
 /**
  * BeeHitTest constructor.
  * @var $bees BeeBuilder
  */
 public function __construct()
 {
     $config = [];
     require __DIR__ . '/../lib/conf.php';
     $this->config = $config;
     $bees = new BeeBuilder($this->config);
     $bees->createBees();
     $this->beehit = new BeeHit($bees);
 }
Esempio n. 3
0
<?php

/**
 * User: Dacascas
 * Date: 31/01/2016
 * Time: 22:56
 */
include_once 'lib/conf.php';
include_once 'lib/class.php';
$storage = new Storage('bee.txt');
if (isset($_REQUEST['reset'])) {
    $storage->store('');
    Response::redirect('/');
}
if ($storage->isEmpty()) {
    $bees = new BeeBuilder($config);
    $bees->createBees();
    $storage->store($bees);
} else {
    $bees = $storage->get();
}
if (isset($_REQUEST['bee'])) {
    $bees = new BeeHit($bees);
    $bees = $bees->hit($_REQUEST['bee']);
    $storage->store($bees);
}
echo new Response($bees);