Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mms] Refactor alarm code to prevent the need from accessing the them…
…es cache on every server access.
- Loading branch information
Showing
4 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
framework/Core/lib/Horde/Core/Alarm/Handler/Desktop/Icon.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/** | ||
* Copyright 2014 Horde LLC (http://www.horde.org/) | ||
* | ||
* See the enclosed file COPYING for license information (LGPL). If you | ||
* did not receive this file, see http://www.horde.org/licenses/lgpl21. | ||
* | ||
* @category Horde | ||
* @copyright 2014 Horde LLC | ||
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
* @package Core | ||
*/ | ||
|
||
/** | ||
* Hack to prevent the need to access the theme cache on every server access. | ||
* | ||
* @author Michael Slusarz <slusarz@horde.org> | ||
* @category Horde | ||
* @copyright 2014 Horde LLC | ||
* @internal | ||
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
* @package Core | ||
* @todo Refactor Horde_Core_Alarm_Handler_Desktop to avoid this | ||
*/ | ||
class Horde_Core_Alarm_Handler_Desktop_Icon | ||
{ | ||
/** | ||
* Icon path. | ||
* | ||
* @var string | ||
*/ | ||
protected $_path; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param string $path Icon path. | ||
*/ | ||
public function __construct($path) | ||
{ | ||
$this->_path = $path; | ||
} | ||
|
||
/** | ||
*/ | ||
public function __toString() | ||
{ | ||
return strval(Horde_Themes::img($this->_path)->fulluri); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters