public function getURL(\ElggEntity $entity, $size = '') {

		$icon = $this->getIconFile($entity, $size);
		if (!$icon->exists()) {
			return;
		}
		
		$key = get_site_secret();
		$guid = $entity->guid;
		$path = $icon->getFilename();

		$hmac = hash_hmac('sha256', $guid . $path, $key);

		$query = serialize(array(
			'uid' => $guid,
			'd' => ($entity instanceof \ElggUser) ? $entity->guid : $entity->owner_guid, // guid of the dir owner
			'dts' => ($entity instanceof \ElggUser) ? $entity->time_created : $entity->getOwnerEntity()->time_created,
			'path' => $path,
			'ts' => $entity->icontime,
			'mac' => $hmac,
		));

		$url = elgg_http_add_url_query_elements('mod/hypeApps/servers/icon.php', array(
			'q' => base64_encode($query),
		));

		return elgg_normalize_url($url);
	}
public function getURL(\ElggEntity $entity, $size = '') {

		$icon = $this->getIconFile($entity, $size);
		if (!$icon->exists()) {
			return;
		}
		
		$key = get_site_secret();
		$guid = $entity->guid;
		$path = $icon->getFilename();

		$hmac = hash_hmac('sha256', $guid . $path, $key);

		$query = serialize(array(
			'uid' => $guid,
			'd' => ($entity instanceof \ElggUser) ? $entity->guid : $entity->owner_guid, // guid of the dir owner
			'dts' => ($entity instanceof \ElggUser) ? $entity->time_created : $entity->getOwnerEntity()->time_created,
			'path' => $path,
			'ts' => $entity->icontime,
			'mac' => $hmac,
		));

		$url = elgg_http_add_url_query_elements('mod/hypeApps/servers/icon.php', array(
			'q' => base64_encode($query),
		));

		return elgg_normalize_url($url);
	}
public function getURL ( \ ElggEntity $ entity , $ size = '' ) { $ icon = $ this -> getIconFile ( $ entity , $ size ) ; if ( ! $ icon -> exists ( ) ) { return ; } $ key = get_site_secret ( ) ; $ guid = $ entity -> guid ; $ path = $ icon -> getFilename ( ) ; $ hmac = hash_hmac ( 'sha256' , $ guid . $ path , $ key ) ; $ query = serialize ( array ( 'uid' => $ guid , 'd' => ( $ entity instanceof \ ElggUser ) ? $ entity -> guid : $ entity -> owner_guid , // guid of the dir owner 'dts' => ( $ entity instanceof \ ElggUser ) ? $ entity -> time_created : $ entity -> getOwnerEntity ( ) -> time_created , 'path' => $ path , 'ts' => $ entity -> icontime , 'mac' => $ hmac , ) ) ; $ url = elgg_http_add_url_query_elements ( 'mod/hypeApps/servers/icon.php' , array ( 'q' => base64_encode ( $ query ) , ) ) ; return elgg_normalize_url ( $ url ) ; }
Prepares a URL that can be used to display an icon bypassing the engine boot

@param \ElggEntity $entity Entity
@param string      $size   Size
@return string|null
Prepares a URL that can be used to display an icon bypassing the engine boot