getContentType(); if (stripos($contentType, 'form')) { return parent::getPost($name, $filters, $defaultValue, $notAllowEmpty, $noRecursive); } elseif (stripos($contentType, 'json')) { return $this->getPut($name, $filters, $defaultValue, $notAllowEmpty, $noRecursive); } else { throw new BadRequest('sys.invalid_content_type'); } } }