• Home
  • Knowledge Base
    • KB Category
    • Single Page
    • Private Content
      • Private – Category
      • Private – Article
      • Private – Attached Files
      • Password Protected Article
    • Page – features
      • One Click Article Feedback
      • Attached Files
      • Print Article
      • Custom header
  • Search
  • Home
  • Knowledge Base
    • KB Category
    • Single Page
    • Private Content
      • Private – Category
      • Private – Article
      • Private – Attached Files
      • Password Protected Article
    • Page – features
      • One Click Article Feedback
      • Attached Files
      • Print Article
      • Custom header
  • Search
home/Knowledge Base/Emma Validations/Converters

Converters

36 views 1

Written by admin
May 17, 2022
Converters Definition Example
  DateTimeFormat   The `DateTimeFormat` converter class is a PHP attribute that can be applied to properties in an entity class to specify the input and output formats for converting values to and from `DateTime` objects. #[DateValidator]
#[DateTimeFormat]
protected ?\DateTime $time_created;

The Converter are PHP attribute that can be applied to properties in an entity/DTO class to specify the input and output formats for converting values to and from one data type into another.

Converters Definition Example
  DateTimeFormat   The `DateTimeFormat` converter class is a PHP attribute that can be applied to properties in an entity class to specify the input and output formats for converting values to and from `DateTime` objects. #[DateValidator]
#[DateTimeFormat]
protected ?\DateTime $time_created;

Was this helpful?

1 Yes  0 No
Related Articles
  • Validation Usage Example
  • Validators

Didn't find your answer? Contact Us

  Validators

  • Copyright 2023 Emma Technologies LLC. All Rights Reserved