Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 12... Línea 12...
12
// GNU General Public License for more details.
12
// GNU General Public License for more details.
13
//
13
//
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea -...
16
 
-
 
17
/**
-
 
18
 * Cache data source for the time of the last message between users.
-
 
19
 *
-
 
20
 * @package    core_message
-
 
21
 * @category   cache
-
 
22
 * @copyright  2016 Ryan Wyllie <ryan@moodle.com>
-
 
23
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
24
 */
-
 
25
 
16
 
Línea 26... Línea 17...
26
namespace core_message;
17
namespace core_message;
-
 
18
 
Línea 27... Línea 19...
27
 
19
use core_cache\data_source_interface;
28
defined('MOODLE_INTERNAL') || die();
20
use core_cache\definition;
29
 
21
 
30
/**
22
/**
31
 * Cache data source for the time of the last message in a conversation.
23
 * Cache data source for the time of the last message in a conversation.
32
 *
24
 *
33
 * @package    core_message
25
 * @package    core_message
34
 * @category   cache
26
 * @category   cache
35
 * @copyright  2016 Ryan Wyllie <ryan@moodle.com>
27
 * @copyright  2016 Ryan Wyllie <ryan@moodle.com>
Línea 36... Línea 28...
36
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
37
 */
29
 */
Línea 38... Línea 30...
38
class time_last_message_between_users implements \cache_data_source {
30
class time_last_message_between_users implements data_source_interface {
39
 
31
 
40
    /** @var time_last_message_between_users the singleton instance of this class. */
32
    /** @var time_last_message_between_users the singleton instance of this class. */
41
    protected static $instance = null;
33
    protected static $instance = null;
42
 
34
 
43
    /**
35
    /**
44
     * Returns an instance of the data source class that the cache can use for loading data using the other methods
36
     * Returns an instance of the data source class that the cache can use for loading data using the other methods
45
     * specified by the cache_data_source interface.
37
     * specified by the data_source_interface interface.
46
     *
38
     *
47
     * @param \cache_definition $definition
39
     * @param definition $definition
48
     * @return object
40
     * @return object
49
     */
41
     */
50
    public static function get_instance_for_cache(\cache_definition $definition) {
42
    public static function get_instance_for_cache(definition $definition) {