Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\Datamatrix
Backing type: string
File: DatamatrixShape.php line 35
Backed enum for the Data Matrix symbol shape: S (square, default) or R (rectangular).
Tags
- since: 2026-07-17
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2010-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-barcode
Cases
Square
File: DatamatrixShape.php line 38
Rectangular
File: DatamatrixShape.php line 41
Methods
fromLoose()
File: DatamatrixShape.php line 52
public static fromLoose(string|self $value) : self
Accepts the canonical letter or an enum instance (returned unchanged). Unknown values fall back to Square, matching the lenient behavior of Datamatrix.
Parameters
- $value : string|self: Shape letter or enum case.
Return values
self