Browse: Home / Classes /

Learndash_DTO

Learndash_DTO

DTO class.


Description #


Source #

File: includes/dto/class-learndash-dto.php


Changelog #

Changelog
Version Description
4.5.0 Introduced.


Methods #

  • __construct — Constructor.
  • all — Returns all properties. Keys are property names.
  • create — Creates a DTO instance.
  • except — Excludes a property or multiple properties from the DTO.
  • get_properties — Returns public properties.
  • get_validators — Validates properties on construction based on validators.
  • only — Includes a property or multiple properties in the DTO.
  • parse_array — Recursively parses an array and converts DTOs to arrays.
  • to_array — Returns an array of properties.
  • to_json — Returns a json encoded array of properties.
  • validate — Returns public properties.