This repository has been archived by the owner on Feb 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
653dbbf
commit b2749cb
Showing
3 changed files
with
150 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
<?php | ||
|
||
/** | ||
* User: marcus-campos | ||
* Date: 18/10/17 | ||
* Time: 14:24 | ||
*/ | ||
|
||
namespace Maestro\Http; | ||
|
||
trait Methods | ||
{ | ||
/** | ||
* @return $this | ||
*/ | ||
public function get() | ||
{ | ||
$this->method = 'GET'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function post() | ||
{ | ||
$this->method = 'POST'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function put() | ||
{ | ||
$this->method = 'PUT'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function delete() | ||
{ | ||
$this->method = 'DELETE'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function patch() | ||
{ | ||
$this->method = 'PATCH'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function copy() | ||
{ | ||
$this->method = 'COPY'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function head() | ||
{ | ||
$this->method = 'HEAD'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function options() | ||
{ | ||
$this->method = 'OPTIONS'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function link() | ||
{ | ||
$this->method = 'LINK'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function unlink() | ||
{ | ||
$this->method = 'UNLINK'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function purge() | ||
{ | ||
$this->method = 'PURGE'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function lock() | ||
{ | ||
$this->method = 'LOCK'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function unlock() | ||
{ | ||
$this->method = 'UNLOCK'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function propfind() | ||
{ | ||
$this->method = 'PROPFIND'; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return $this | ||
*/ | ||
public function view() | ||
{ | ||
$this->method = 'VIEW'; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.