Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:dto:postrequestdto

This is an old revision of the document!


PostRequestDto

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.

Docblock Metadata

Tag Value
@category DTO
@author M.Noermoehammad
@license MIT
@version 1.0
@since Since Release 1.0

Inheritance

No parent, interface or trait. This is a root type.

Constants (0)

None.

Properties (2)

Visibility Type Name Default Line
public (untyped) $catIds []; 41
public (untyped) $postLocale 'en'; 62

Methods (5)

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

__construct()

public function __construct(array $post, array $files)

lines 70–90 (21)

Parameter Type Default Description
$post array required none
$files array required none

fromGlobals()

public static function fromGlobals()

lines 97–100 (4)

Factory method from globals.

Takes no parameters.

Returns: (none declared) — self

isSubmitted()

public function isSubmitted()

lines 107–110 (4)

Check whether the post form was submitted.

Takes no parameters.

Returns: (none declared) — bool

isProtected()

public function isProtected()

lines 117–120 (4)

Check whether the post is password-protected.

Takes no parameters.

Returns: (none declared) — bool

isNewPost()

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.

scriptlog/lib/dto/postrequestdto.1790414214.txt.gz · Last modified: by admin