public function get(RESTApiRequest $request, $user_id)
 {
     $recorder = new \StreamRecorder();
     $free = ceil($recorder->checkTotalUserRecordsLength($user_id) / 60);
     $total = \Config::getSafe('total_records_length', 600);
     return array('total' => $total, 'free' => $free);
 }
Ejemplo n.º 2
0
 public function getOrderedList()
 {
     $result = $this->prepareQuery()->where(array('uid' => $this->stb->id))->limit(self::max_page_items, $this->page * self::max_page_items);
     $this->setResponseData($result);
     $recorder = new StreamRecorder();
     $rest_length = $recorder->checkTotalUserRecordsLength($this->stb->id);
     $this->response['records_rest_length'] = $rest_length;
     return $this->getResponse('prepareData');
 }