original_string: public function create($request, $response, $args) {
  
  		$params=$this->getCreateParams($request);
  
  		if($this->createWithClientID){
  			$params['client_id']=$request->getAttribute('client_id');
  		}
  
  		$validation= $this->validator->validateParams($params,$this->getValidation(0));
  
  		if($validation->failed()){
  			return $this->error_helper->validationFailed($response,$validation->getErrors());
  		}
  
  		if(!$created_id = $this->Model->insertGetId($params)){
  			return $this->error_helper->createFailed($response,'');
  		}
  
  		$data['error']=false;
  		$data[$this->name_s]=$this->Model->find($created_id);
  		$response=$response->withAddedHeader('insert_id',$created_id);
  		return  $response->withJson($data);
  
  	}
code: public function create($request, $response, $args) {
  
  		$params=$this->getCreateParams($request);
  
  		if($this->createWithClientID){
  			$params['client_id']=$request->getAttribute('client_id');
  		}
  
  		$validation= $this->validator->validateParams($params,$this->getValidation(0));
  
  		if($validation->failed()){
  			return $this->error_helper->validationFailed($response,$validation->getErrors());
  		}
  
  		if(!$created_id = $this->Model->insertGetId($params)){
  			return $this->error_helper->createFailed($response,'');
  		}
  
  		$data['error']=false;
  		$data[$this->name_s]=$this->Model->find($created_id);
  		$response=$response->withAddedHeader('insert_id',$created_id);
  		return  $response->withJson($data);
  
  	}
code_tokens: public function create ( $ request , $ response , $ args ) { $ params = $ this -> getCreateParams ( $ request ) ; if ( $ this -> createWithClientID ) { $ params [ 'client_id' ] = $ request -> getAttribute ( 'client_id' ) ; } $ validation = $ this -> validator -> validateParams ( $ params , $ this -> getValidation ( 0 ) ) ; if ( $ validation -> failed ( ) ) { return $ this -> error_helper -> validationFailed ( $ response , $ validation -> getErrors ( ) ) ; } if ( ! $ created_id = $ this -> Model -> insertGetId ( $ params ) ) { return $ this -> error_helper -> createFailed ( $ response , '' ) ; } $ data [ 'error' ] = false ; $ data [ $ this -> name_s ] = $ this -> Model -> find ( $ created_id ) ; $ response = $ response -> withAddedHeader ( 'insert_id' , $ created_id ) ; return $ response -> withJson ( $ data ) ; }
docstring: Creates a new element in the model according to the request
  @method create
  @param  [Object] $request  [Slim request object]
  @param  [Object] $response [Slim response object]
  @param  [Array] $args     [Arguments array]
  @return [Object]           [Slim response object]
docstring_tokens: Creates a new element in the model according to the request