Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
1.4 kB · 58 lines
PHP
at dev
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859<?php
namespace SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\CreateReport;
use SocialDept\AtpSchema\Data\Data;
/** * GENERATED CODE - DO NOT EDIT * * Moderation tool information for tracing the source of the action * * Lexicon: com.atproto.moderation.createReport.modTool * Type: object * * @property string $name Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome') * @property mixed $meta Additional arbitrary metadata about the source * * Constraints: * - Required: name */class ModTool extends Data{ /** * @param string $name Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome') * @param mixed $meta Additional arbitrary metadata about the source */ public function __construct( public readonly string $name, public readonly mixed $meta = null ) { }
/** * Get the lexicon NSID for this data type. * * @return string */ public static function getLexicon(): string { return 'com.atproto.moderation.createReport.modTool'; }
/** * Create an instance from an array. * * @param array $data The data array * @return static */ public static function fromArray(array $data): static { return new static( name: $data['name'], meta: $data['meta'] ?? null ); }
}