# aksafan/yii2-emoji-detection architecture

> Architecture diagram of the GitHub repository aksafan/yii2-emoji-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aksafan/yii2-emoji-detection
- Repository: https://github.com/aksafan/yii2-emoji-detection

## Overview

This is a small Yii2 extension exposing aaronpk’s emoji-detection tools through a Yii-style `EmojiDetector` API. The main workflow is application code invoking the detector, which delegates detection to `EmojiWrapper`, then to the upstream PHP library. The detector also exposes extraction, replacement, counting, boolean checks, the emoji map, and the detection regexp. The sampled source shows the delegation and dependency calls; the README documents Yii configuration and the public capabilities.

Main entry points: [`source/EmojiDetector.php`](https://github.com/aksafan/yii2-emoji-detection/blob/master/source/EmojiDetector.php) (Emoji detector API), [`source/EmojiWrapper.php`](https://github.com/aksafan/yii2-emoji-detection/blob/master/source/EmojiWrapper.php) (Emoji wrapper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_yii_api["Yii API"]
  node_detector["Emoji detector API<br/>[EmojiDetector.php]"]
end

subgraph group_detection_bridge["Detection Bridge"]
  node_wrapper["Emoji wrapper<br/>[EmojiWrapper.php]"]
  node_upstream["Emoji detector library"]
end

node_application(("Yii application code"))

node_application -->|"invokes"| node_detector
node_detector -->|"delegates"| node_wrapper
node_wrapper -->|"calls"| node_upstream

click node_detector "https://github.com/aksafan/yii2-emoji-detection/blob/master/source/EmojiDetector.php"
click node_wrapper "https://github.com/aksafan/yii2-emoji-detection/blob/master/source/EmojiWrapper.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_detector toneBlue
class node_wrapper,node_upstream toneAmber
class node_application toneIndigo
```

## Components

### Yii API

- [Emoji detector API](https://github.com/aksafan/yii2-emoji-detection/blob/master/source/EmojiDetector.php): `source/EmojiDetector.php`

### Detection Bridge

- [Emoji wrapper](https://github.com/aksafan/yii2-emoji-detection/blob/master/source/EmojiWrapper.php): `source/EmojiWrapper.php`
- **Emoji detector library**

### Other components

- **Yii application code**

## Connections

- Yii application code → Emoji detector API: invokes (evidence: `README.md`)
- Emoji detector API → Emoji wrapper: delegates (evidence: `source/EmojiDetector.php`)
- Emoji wrapper → Emoji detector library: calls (evidence: `source/EmojiWrapper.php`)
