1<?php 2 3namespace Emojione; 4 5 6interface ClientInterface 7{ 8 /** 9 * First pass changes unicode characters into emoji markup. 10 * Second pass changes any shortnames into emoji markup. 11 * 12 * @param string $string The input string. 13 * @return string String with appropriate html for rendering emoji. 14 */ 15 public function toImage($string); 16 17 /** 18 * Uses toShort to transform all unicode into a standard shortname 19 * then transforms the shortname into unicode. 20 * This is done for standardization when converting several unicode types. 21 * 22 * @param string $string The input string. 23 * @return string String with standardized unicode. 24 */ 25 public function unifyUnicode($string); 26 27 /** 28 * This will output unicode from shortname input. 29 * If Client/$ascii is true it will also output unicode from ascii. 30 * This is useful for sending emojis back to mobile devices. 31 * 32 * @param string $string The input string. 33 * @return string String with unicode replacements. 34 */ 35 public function shortnameToUnicode($string); 36 37 /** 38 * This will replace shortnames with their ascii equivalent. 39 * ex. :wink: --> ;^) 40 * This is useful for systems that don't support unicode or images. 41 * 42 * @param string $string The input string. 43 * @return string String with ascii replacements. 44 */ 45 public function shortnameToAscii($string); 46 47 /** 48 * This will output image markup (for png or svg) from shortname input. 49 * 50 * @param string $string The input string. 51 * @return string String with appropriate html for rendering emoji. 52 */ 53 public function shortnameToImage($string); 54 55 /** 56 * This will return the shortname from unicode input. 57 * 58 * @param string $string The input string. 59 * @return string shortname 60 */ 61 public function toShort($string); 62 63 /** 64 * This will output image markup (for png or svg) from unicode input. 65 * 66 * @param string $string The input string. 67 * @return string String with appropriate html for rendering emoji. 68 */ 69 public function unicodeToImage($string); 70} 71