'task', '_resource' => 'comment', ]; foreach ($this->getAttributes() as $attribute => $value) { switch ($attribute) { case 'task_id' : case 'user_id' : case 'body' : $resource[$attribute] = $value; break; } } return $resource; } }