# auto-alt-text/1.3.2/src/App/AltTextGeneratorAttachmentTitle.php

Auto Alt Text, version 1.3.2. 28 lines.

- Page: https://pluginprobe.com/plugins/auto-alt-text/1.3.2/code/src/App/AltTextGeneratorAttachmentTitle.php
- Raw: https://pluginprobe.com/plugins/auto-alt-text/1.3.2/raw/src/App/AltTextGeneratorAttachmentTitle.php
- Modified: 2024-03-10T14:55:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/auto-alt-text/1.3.2/code/src/App/AltTextGeneratorAttachmentTitle.php#L10-L20`.

```php
<?php
namespace AATXT\App;

class AltTextGeneratorAttachmentTitle implements AltTextGeneratorInterface
{

    private function __construct()
    {
    }

    /**
     * @return AltTextGeneratorAttachmentTitle
     */
    public static function make(): AltTextGeneratorAttachmentTitle
    {
        return new self();
    }

    /**
     * Get the alt text of the image
     * @param int $imageId
     * @return string
     */
    public function altText(int $imageId): string
    {
        return get_the_title($imageId);
    }
}
```
