| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -452,9 +452,18 @@ class Engine {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param int $code HTTP status code
 | 
					 | 
					 | 
					 | 
					     * @param int $code HTTP status code
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param bool $encode Whether to perform JSON encoding
 | 
					 | 
					 | 
					 | 
					     * @param bool $encode Whether to perform JSON encoding
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param string $charset Charset
 | 
					 | 
					 | 
					 | 
					     * @param string $charset Charset
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */
 | 
					 | 
					 | 
					 | 
					     * @param int $encodeOption Bitmask Json constant such as JSON_HEX_QUOT
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public function _json($data, $code = 200, $encode = true, $charset = 'utf-8') {
 | 
					 | 
					 | 
					 | 
					     * @param int $encodeDepth Maximum encoding depth, must be greater than 0
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        $json = ($encode) ? json_encode($data) : $data;
 | 
					 | 
					 | 
					 | 
					     */
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    public function _json(
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $data,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $code = 200,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $encode = true,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $charset = 'utf-8',
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $encodeOption = 0,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $encodeDepth = 512
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    ) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $json = ($encode) ? json_encode($data, $encodeOption, $encodeDepth) : $data;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        $this->response()
 | 
					 | 
					 | 
					 | 
					        $this->response()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ->status($code)
 | 
					 | 
					 | 
					 | 
					            ->status($code)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -471,9 +480,19 @@ class Engine {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param int $code HTTP status code
 | 
					 | 
					 | 
					 | 
					     * @param int $code HTTP status code
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param bool $encode Whether to perform JSON encoding
 | 
					 | 
					 | 
					 | 
					     * @param bool $encode Whether to perform JSON encoding
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param string $charset Charset
 | 
					 | 
					 | 
					 | 
					     * @param string $charset Charset
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */
 | 
					 | 
					 | 
					 | 
					     * @param int $encodeOption Bitmask Json constant such as JSON_HEX_QUOT
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public function _jsonp($data, $param = 'jsonp', $code = 200, $encode = true, $charset = 'utf-8') {
 | 
					 | 
					 | 
					 | 
					     * @param int $encodeDepth Maximum encoding depth, must be greater than 0
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        $json = ($encode) ? json_encode($data) : $data;
 | 
					 | 
					 | 
					 | 
					     */
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    public function _jsonp(
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $data,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $param = 'jsonp',
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $code = 200,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $encode = true,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $charset = 'utf-8',
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $encodeOption = 0,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $encodeDepth = 512
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    ) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        $json = ($encode) ? json_encode($data, $encodeOption, $encodeDepth) : $data;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        $callback = $this->request()->query[$param];
 | 
					 | 
					 | 
					 | 
					        $callback = $this->request()->query[$param];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |