Layer: DTO · Source: lib/dto/PostRequestDto.php:20 (lines 20–131)
class PostRequestDto
Data Transfer Object for post form submissions.
Encapsulates all $_POST and $_FILES access so controllers never touch superglobals directly. Created via fromGlobals() or constructor injection for testability.
| Tag | Value |
|---|---|
@category | DTO |
@author | M.Noermoehammad |
@license | MIT |
@version | 1.0 |
@since | Since Release 1.0 |
No parent, interface or trait. This is a root type.
None.
| Visibility | Type | Name | Default | Line |
|---|---|---|---|---|
public | (untyped) | $postTitle | 23 | |
public | (untyped) | $postContent | 26 | |
public | (untyped) | $postSummary | 29 | |
public | (untyped) | $postDate | 32 | |
public | (untyped) | $postModified | 35 | |
public | (untyped) | $imageId | 38 | |
public | (untyped) | $catIds | [] | 41 |
public | (untyped) | $postTags | 44 | |
public | (untyped) | $postStatus | 47 | |
public | (untyped) | $visibility | 50 | |
public | (untyped) | $postPassword | 53 | |
public | (untyped) | $postHeadlines | 56 | |
public | (untyped) | $commentStatus | 59 | |
public | (untyped) | $postLocale | 'en' | 62 |
public | (untyped) | $postId | 65 | |
public | (untyped) | $mediaFile | 68 |
| Visibility | Method | Summary | Line |
|---|---|---|---|
| public | __construct() | (undocumented) | 70 |
| public static | fromGlobals() | Factory method from globals. | 97 |
| public | isSubmitted() | Check whether the post form was submitted. | 107 |
| public | isProtected() | Check whether the post is password-protected. | 117 |
| public | isNewPost() | Check whether this is a new post (no post_id). | 127 |
public function __construct(array $post, array $files)
lines 70–90 (21)
| Parameter | Type | Default | Description |
|---|---|---|---|
$post | array | required | none |
$files | array | required | none |
public static function fromGlobals()
lines 97–100 (4)
Factory method from globals.
Takes no parameters.
Returns: (none declared) — self
public function isSubmitted()
lines 107–110 (4)
Check whether the post form was submitted.
Takes no parameters.
Returns: (none declared) — bool
public function isProtected()
lines 117–120 (4)
Check whether the post is password-protected.
Takes no parameters.
Returns: (none declared) — bool
public function isNewPost()
lines 127–130 (4)
Check whether this is a new post (no post_id).
Takes no parameters.
Returns: (none declared) — bool
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.