Stubbing out the default resource functionality
This commit is contained in:
parent
1e8e9efd95
commit
15a4b807d5
2 changed files with 33 additions and 1 deletions
|
@ -327,6 +327,37 @@ class Resource extends Object
|
|||
}
|
||||
}
|
||||
|
||||
// Create
|
||||
public function POST()
|
||||
{
|
||||
// @todo Whatever gets POSTed (aside from OAuth stuff) should be inserted to the collection
|
||||
}
|
||||
|
||||
// Read
|
||||
public function GET()
|
||||
{
|
||||
if (current($this->uids))
|
||||
{
|
||||
// @todo Pulls the record with this UID
|
||||
}
|
||||
else
|
||||
{
|
||||
// @todo Do we pull all or return an empty set?
|
||||
}
|
||||
}
|
||||
|
||||
// Update
|
||||
public function PUT()
|
||||
{
|
||||
// @todo If we have a UID, update the record with whatever is posted
|
||||
}
|
||||
|
||||
// Delete
|
||||
public function DELETE()
|
||||
{
|
||||
// @todo If we have a UID, delete it
|
||||
}
|
||||
|
||||
public function respond()
|
||||
{
|
||||
http_response_code($this->status);
|
||||
|
|
|
@ -69,7 +69,8 @@ class Router extends Object
|
|||
}
|
||||
else
|
||||
{
|
||||
$nouns[] = $component;
|
||||
$nouns[] = $component;
|
||||
$uids[$component] = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue