Added detailed list of received/given likes in user profiles
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / smiley / Smiley.class.php
1 <?php
2 namespace wcf\data\smiley;
3 use wcf\data\DatabaseObject;
4 use wcf\system\WCF;
5 use wcf\util\StringUtil;
6
7 /**
8 * Represents a smiley.
9 *
10 * @author Alexander Ebert
11 * @copyright 2001-2014 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package com.woltlab.wcf
14 * @subpackage data.smiley
15 * @category Community Framework
16 */
17 class Smiley extends DatabaseObject {
18 /**
19 * @see \wcf\data\DatabaseObject::$databaseTableName
20 */
21 protected static $databaseTableName = 'smiley';
22
23 /**
24 * @see \wcf\data\DatabaseObject::$databaseTableIndexName
25 */
26 protected static $databaseTableIndexName = 'smileyID';
27
28 /**
29 * Returns the url to this smiley.
30 *
31 * @return string
32 */
33 public function getURL() {
34 return WCF::getPath().$this->smileyPath;
35 }
36
37 /**
38 * Returns all aliases for this smiley.
39 *
40 * @return array<string>
41 */
42 public function getAliases() {
43 if (!$this->aliases) return array();
44
45 return explode("\n", StringUtil::unifyNewlines($this->aliases));
46 }
47 }