Beispiel #1
0
	public function destroy () {
		$this->requireParameter("id");
		
		UnitManager::getInstance()->deleteUnit($this->getParameter("id"));
		
		return array("data" => null);
	}
Beispiel #2
0
	public function getSiPrefixes ($id) {
		$unit = UnitManager::getInstance()->getUnit($id);
		
		$aData = array();
		
		foreach ($unit->getPrefixes() as $prefix) {
			$aData[] = $prefix->serialize();	
		}
		
		return array("response" => array("totalCount" => count($aData), "data" => $aData));
	}