ItemArgs final class
Minn\Http\ItemArgs · public/minn/src/Minn/Http/ItemArgs.php · 48 lines
The parameters a single resource's read takes, as the reference's REST index declares them for posts, pages, blocks, navigation, menus, menu items, menu locations and comments. The path names the resource, and a query parameter of the same name stands in for it (the router reads it over the path's), so the id is declared and judged like any other. Each set names the code that reads it, as Args does, and keeps the reference's order.
Constants and properties
| private | POST_ID = array ( 'description' => 'Unique identifier for the post.', 'type' => 'integer', 'required' => false, ) | The id a post's read takes, read through the router's capture (Http\Router). |
| private | POST_PASSWORD = array ( 'description' => 'The password for the post if it is password protected.', 'type' => 'string', 'required' => false, ) | Read by Rest\PostsController::serveSingle(): a post's password, opening its content or refusing a wrong one. |
| const | POST = array ( 'id' => array ( 'description' => 'Unique identifier for the post.', 'type' => 'integer', 'required' => false, ), 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', 1 => 'embed', 2 => 'edit', ), 'default' => 'view', 'required' => false, ), 'excerpt_length' => array ( 'description' => 'Override the default excerpt length.', 'type' => 'integer', 'required' => false, ), 'password' => array ( 'description' => 'The password for the post if it is password protected.', 'type' => 'string', 'required' => false, ), ) | Read by Rest\PostsController::serveSingle(): a post, page or block, its excerpt cut to the length asked for. |
| const | NAVIGATION = array ( 'id' => array ( 'description' => 'Unique identifier for the post.', 'type' => 'integer', 'required' => false, ), 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', 1 => 'embed', 2 => 'edit', ), 'default' => 'view', 'required' => false, ), 'password' => array ( 'description' => 'The password for the post if it is password protected.', 'type' => 'string', 'required' => false, ), ) | Read by Rest\PostsController::serveSingle(): a navigation post, which has no excerpt. |
| const | MENU_ITEM = array ( 'id' => array ( 'description' => 'Unique identifier for the post.', 'type' => 'integer', 'required' => false, ), 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', 1 => 'embed', 2 => 'edit', ), 'default' => 'view', 'required' => false, ), ) | Read by Rest\MenusController::singleItem(): a menu item. |
| const | MENU = array ( 'id' => array ( 'description' => 'Unique identifier for the term.', 'type' => 'integer', 'required' => false, ), 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', 1 => 'embed', 2 => 'edit', ), 'default' => 'view', 'required' => false, ), ) | Read by Rest\MenusController::singleMenu(): a menu. |
| const | MENU_LOCATION = array ( 'location' => array ( 'description' => 'An alphanumeric identifier for the menu location.', 'type' => 'string', 'required' => false, ), 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', 1 => 'embed', 2 => 'edit', ), 'default' => 'view', 'required' => false, ), ) | Read by Rest\MenusController::oneLocation(): a menu location by its name. |
| const | COMMENT = array ( 'id' => array ( 'description' => 'Unique identifier for the comment.', 'type' => 'integer', 'required' => false, ), 'context' => array ( 'description' => 'Scope under which the request is made; determines fields present in response.', 'type' => 'string', 'enum' => array ( 0 => 'view', 1 => 'embed', 2 => 'edit', ), 'default' => 'view', 'required' => false, ), 'password' => array ( 'description' => 'The password for the parent post of the comment (if the post is password protected).', 'type' => 'string', 'required' => false, ), ) | Read by Rest\CommentsController::single(): a comment, and the password of the post it is on. |
Nothing matches.