@@ 76-84 (lines=9) @@ | ||
73 | /** |
|
74 | * @return boolean |
|
75 | */ |
|
76 | protected function respondWithJSON() { |
|
77 | if($this->getRequest()->getExtension() == 'json') { |
|
78 | return true; |
|
79 | } |
|
80 | if(strpos($this->getRequest()->getHeader('Accept'), 'application/json') !== false) { |
|
81 | return true; |
|
82 | } |
|
83 | return false; |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * @return boolean |
|
@@ 89-97 (lines=9) @@ | ||
86 | /** |
|
87 | * @return boolean |
|
88 | */ |
|
89 | protected function respondWithText() { |
|
90 | if($this->getRequest()->getExtension() == 'txt') { |
|
91 | return true; |
|
92 | } |
|
93 | if(strpos($this->getRequest()->getHeader('Accept'), 'text/plain') !== false) { |
|
94 | return true; |
|
95 | } |
|
96 | return false; |
|
97 | } |
|
98 | ||
99 | /** |
|
100 | * @return array|null |