Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Σταύρος Παπαδάκης
gredu_labs
Commits
2b37f76f
Commit
2b37f76f
authored
Feb 10, 2016
by
Georgios Tsakalos
Browse files
add action for posting staff
parent
ff5671f4
Changes
1
Show whitespace changes
Inline
Side-by-side
module/schools/src/Action/StaffCreate.php
0 → 100644
View file @
2b37f76f
<?php
/**
* gredu_labs.
*
* @link https://github.com/eellak/gredu_labs for the canonical source repository
*
* @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
* @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
*/
namespace
GrEduLabs\Schools\Action
;
use
Slim\Http\Request
;
use
Slim\Http\Response
;
class
StaffCreate
{
public
function
__construct
(
$staffservice
)
{
$this
->
staffservice
=
$staffservice
;
}
public
function
__invoke
(
Request
$req
,
Response
$res
,
array
$args
=
[])
{
$staff
=
$this
->
staffservice
->
getTeacherById
(
1
);
$res
=
$res
->
withJson
(
$staff
->
export
());
return
$res
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment