meta_directive = $this->normalize( $meta_directive ); $this->suppress_default = $suppress_default; } /** * Retrieve the meta directive value. * * @return string|null */ public function get_meta_directive(): ?string { return $this->meta_directive; } /** * Determine whether default output should be suppressed. * * @return bool */ public function should_suppress_default(): bool { return $this->suppress_default; } /** * Normalize meta directive input. * * @param string|null $value Meta directive value. * * @return string|null */ private function normalize( ?string $value ): ?string { if ( null === $value ) { return null; } $value = trim( strtolower( $value ) ); if ( '' === $value || 'index,follow' === $value ) { return null; } return $value; } }