MaplePHP
  • MaplePHP - Layered structure MVC PHP framework
  • Guide
    • Get started
    • Installation
    • Service Provider
    • Dependency injector
    • Controller
    • Middlewares
    • Routers
  • Navigation
    • Simple navigation
    • Dynamic navigation
  • Template engine
    • Getting started
    • Templates
      • Index
      • Views
      • Partials
    • Content (DTO)
      • String
      • Number
      • Array
      • DateTime
      • Encode
      • Dom
  • Form builder
    • Form builder
  • Database
    • MySQL
  • Service providers
    • url
    • encode
    • dir
    • DB
    • responder
  • Installations
    • Authorization & login
  • Frontend template
    • Responder
    • Views & components
    • Modals
    • Redirects
  • Access
    • MaplePHP with Docker
  • Libraries
    • Container
    • MySQL queries
    • Validation
    • Cache
    • Logger
    • Request
    • Response
  • What is?
    • Dependency injector
    • Controller
    • Middleware
    • Router
Powered by GitBook
On this page
  • MaplePHP HTML Dom Library
  • Constructor
  • Static Factory Method
  • DOM Access Methods
  • Properties
  • Exceptions

Was this helpful?

  1. Template engine
  2. Content (DTO)

Dom

MaplePHP HTML Dom Library

This PHP library, named MaplePHP\DTO\Format\Dom, provides functionality for working with HTML DOM elements.

Constructor

__construct(mixed $value)

  • Initializes the DOM object with the given value, ensuring it is a string or a convertible string value.

  • Parameters:

    • $value: The initial value for the DOM object.

Static Factory Method

value(mixed $value): self

  • Creates and returns a new instance of the DOM object.

  • Parameters:

    • $value: The value to set for the DOM object.

  • Returns:

    • An instance of the DOM object.

DOM Access Methods

getDom(): object

  • Retrieves the DOM object if it has been modified.

  • Returns:

    • The DOM object.

create(string $tag): object

  • Creates an HTML DOM element with some default values.

  • Parameters:

    • $tag: The HTML tag for the element.

  • Returns:

    • The created DOM element.

Properties

  • $dom: The DOM object associated with the class.

  • $str: A Str object representing the string value.

Exceptions

  • Throws an InvalidArgumentException if the input value is not a string or a convertible string value.

PreviousEncodeNextForm builder

Last updated 1 year ago

Was this helpful?