blob: 729ca2b73d21d2402d8d201cef426127da85a6c6 [file] [log] [blame]
atoulmeb80b4682009-01-22 13:08:36 +00001<?php
2/*******************************************************************************
3 * Copyright (c) 2007-2009 Intalio, Inc.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Antoine Toulme, Intalio Inc.
11*******************************************************************************/
12
13// Use a class to define the hooks to avoid bugs with already defined functions.
14class Reference {
15 /**
16 * Returns the root path to the images.
17 * May be a distant server or a local folder.
18 */
atoulmedbe670e2009-01-27 11:23:51 +000019 function _imageRoot() {
atoulmeb80b4682009-01-22 13:08:36 +000020 return "http://dev.eclipse.org";
21 }
22
atoulmedbe670e2009-01-27 11:23:51 +000023 /**
24 * Returns a string representing a JS function named fnCheckUrl that
25 * is called to check on the integrity of the url of the map file.
26 */
atoulmeb80b4682009-01-22 13:08:36 +000027 function validateMapFileUrl($url) {
atoulmedbe670e2009-01-27 11:23:51 +000028 return "function fnCheckUrl() {}";
atoulmeb80b4682009-01-22 13:08:36 +000029 }
30
atoulmea4adf8e2009-01-27 19:01:35 +000031 /**
32 * Outputs the head of the html page.
33 */
34 function head() {
35 }
36
37 /**
38 * Outputs the footer of the html page.
39 */
40 function footer() {
41 }
atoulmeb80b4682009-01-22 13:08:36 +000042}
43
atoulme13073032009-01-27 16:31:27 +000044function __register_html_ref($addon) {
atoulmedbe670e2009-01-27 11:23:51 +000045 $addon->register('image_root', array('Reference', '_imageRoot'));
46 $addon->register('validate_map_file_url', array('Reference', 'validateMapFileUrl'));
atoulmea4adf8e2009-01-27 19:01:35 +000047 $addon->register('head', array('Reference', 'head'));
48 $addon->register('footer', array('Reference', 'footer'));
atoulmeb80b4682009-01-22 13:08:36 +000049}
50
atoulme13073032009-01-27 16:31:27 +000051global $register_function_html;
52$register_function_html = '__register_html_ref';
53
atoulmeb80b4682009-01-22 13:08:36 +000054?>