date.chapril.org-framadate/app/classes/Framadate/Choice.php
Olivier PEREZ 46ea697cb6 Refactor on choix_autre.php
* Utils::issetAndNoEmpty is now removed
* Use Form object to store value from page to page
2014-12-06 19:42:01 +01:00

43 lines
663 B
PHP

<?php
namespace Framadate;
class Choice
{
/**
* Name of the Choice
*/
private $name;
/**
* All availables slots for this Choice.
*/
private $slots;
public function __construct($name='')
{
$this->name = $name;
$this->slots = array();
}
public function addSlot($slot)
{
$this->slots[] = $slot;
}
public function getName()
{
return $this->name;
}
public function getSlots()
{
return $this->slots;
}
static function compare(Choice $a, Choice $b)
{
return strcmp($a->name, $b->name);
}
}