@param int $id

@return Model\Manga\MangaStats
@throws Exception\BadResponseException
@throws ParserException
965866
public function MangaStats(int $id): Model\Manga\MangaStats
    {
        return $this->myanimelist->getMangaStats(
            new Request\Manga\MangaStatsRequest($id)
        );
    }
1147229
public function delete($id)
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		try {
			$imageService = $this->getServiceLocator()->get('document.service.image');
			$document = $imageService->delete($id);
			$data = array(
				'status' => 'success',
				'message' => "Deleted " . $id
			);
		} catch(\Exception $e) {
			$this->getResponse()
				->setStatusCode(Response::STATUS_CODE_500);
			$data = array(
				'status' => 'danger',
				'message' => $e->getMessage() 
			);
		}
		
		return new JsonModel($data);
	}
483517
public function actionDownload($id)
    {
        $model = $this->findModel($id);
        if ($model && ($model->isPublic() || $model->isAuthor())) {
            return Yii::$app->response->sendContentAsFile($model->content, $model->title);
        } else {
            Yii::$app->session->setFlash('success', Yii::t('note', 'Note does not exist.'));
            return $this->redirect(['index']);
        }
    }
283645
public function getAction($id)
    {
        $manager = $this->getTaskManager();

        return $this->handleView($this->view($manager->findById($id)));
    }
952750
public function getById($id)
    {
        $modelResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl(sprintf('models/%s', $id))
        );

        return $this->getModelFromResult($modelResult);
    }
211161
public function AnimeVideos(int $id): Model\Anime\AnimeVideos
    {
        return $this->myanimelist->getAnimeVideos(
            new Request\Anime\AnimeVideosRequest($id)
        );
    }
840663
public function deleteAction($id)
    {
        $this->checkCsrf();

        $transUnit = $this->get('lexik_translation.translation_storage')->getTransUnitById($id);

        if (!$transUnit) {
            throw $this->createNotFoundException(sprintf('No TransUnit found for id "%s".', $id));
        }

        $deleted = $this->get('lexik_translation.trans_unit.manager')->delete($transUnit);

        return new JsonResponse(array('deleted' => $deleted), $deleted ? 200 : 400);
    }
1269705
public function get($id)
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		$classifiedService = $this->getServiceLocator()->get('document.service.classified');
		
		try {
			$data = $classifiedService->get($id);
		} catch(\Exception $e) {
			$this->getResponse()
				->setStatusCode(Response::STATUS_CODE_500);
			$data = new \StdClass();
		}
		
		return new JsonModel(array(
			'data' => $data
		));
	}
1240542
public function Anime(int $id): Model\Anime\Anime
    {
        return $this->myanimelist->getAnime(
            new Request\Anime\AnimeRequest($id)
        );
    }
714208
public function get($id)
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		$data = $this->getModel()->get($id, $this->getServiceLocator());
		
		return $data;
		
		return new JsonModel(array(
			'data' => $data
		));
	}
513064
public function MangaNews(int $id): array
    {
        return $this->myanimelist->getNewsList(
            new Request\Manga\MangaNewsRequest($id)
        );
    }
1369109
public function show($id)
    {
        $documentRepository = new DocumentRepository();
        $file = $documentRepository->getFile( $id );
        return response( $file, 200 )->header( 'Content-Type', 'image/jpeg' );
    }
812601
public function index($id = null): Response
    {
        if ($id != null) {
            return $this->getById($id);
        }

        //parse the rquest
        $parse = new QueryParserCustomFields($this->request->getQuery(), $this->model);
        $parse->appendParams($this->additionalSearchFields);
        $parse->appendCustomParams($this->additionalCustomSearchFields);
        $parse->appendRelationParams($this->additionalRelationSearchFields);
        $params = $parse->request();

        $results = (new SimpleRecords(null, $this->model, $this->model->getReadConnection()->query($params['sql'], $params['bind'])));
        $count = $this->model->getReadConnection()->query($params['countSql'], $params['bind'])->fetch(\PDO::FETCH_OBJ)->total;
        $relationships = false;

        // Relationships, but we have to change it to sparo full implementation
        if ($this->request->hasQuery('relationships')) {
            $relationships = $this->request->getQuery('relationships', 'string');
        }

        //navigate los records
        $newResult = [];
        foreach ($results as $key => $record) {
            //field the object
            foreach ($record->getAllCustomFields() as $key => $value) {
                $record->{$key} = $value;
            }

            $newResult[] = !$relationships ? $record->toFullArray() : QueryParserCustomFields::parseRelationShips($relationships, $record);
        }

        unset($results);

        //this means the want the response in a vuejs format
        if ($this->request->hasQuery('format')) {
            $limit = (int)$this->request->getQuery('limit', 'int', 25);

            $newResult = [
                'data' => $newResult,
                'limit' => $limit,
                'page' => $this->request->getQuery('page', 'int', 1),
                'total_pages' => ceil($count / $limit)
            ];
        }

        return $this->response($newResult);
    }
1304241
public function index($id)
    {
        $this->authorize('readList', Block::class);
        $input  = $this->validator->validate('list');
        $params = $this->processor->process($input)->getProcessedFields();
        $block  = $this->repository->getById($id);
        if (!empty($block)) {
            $results = $this->repository->getTranslations(
                $block,
                $params['filter'],
                $params['orderBy'],
                $params['page'],
                $params['perPage']
            );
            return $this->respondWithSuccess($results, new BlockTranslationTransformer);
        } else {
            return $this->respondNotFound();
        }
    }
206610
public function get_from_id(int $id) {
        $records = $this->get_from_ids([$id]);
        return count($records) ? array_shift($records) : null;
    }
608254
public function AnimeNews(int $id): array
    {
        return $this->myanimelist->getNewsList(
            new Request\Anime\AnimeNewsRequest($id)
        );
    }
1026888
public function show($id)
    {
        return json()->setMeta($this->meta)->withItem(
            $this->model->findOrFail($id),
            new BookTransformer
        );
    }