/** * @param Category $obj * @return int */ public function serialize($obj) { return ['category' => $obj->getValue()]; }