Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| ActionWebSource | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| spawnWebsource | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getAccessUrl | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; under version 2 |
| 8 | * of the License (non-upgradable). |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | * |
| 19 | * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | namespace oat\tao\model\websource; |
| 24 | |
| 25 | /** |
| 26 | * Grants Access to compiled data via the MVC |
| 27 | * |
| 28 | * @access public |
| 29 | * @author Joel Bout, <joel@taotesting.com> |
| 30 | * @package tao |
| 31 | |
| 32 | * @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php |
| 33 | */ |
| 34 | class ActionWebSource extends BaseWebsource |
| 35 | { |
| 36 | public static function spawnWebsource($fileSystemId) |
| 37 | { |
| 38 | return self::spawn($fileSystemId); |
| 39 | } |
| 40 | |
| 41 | public function getAccessUrl($relativePath) |
| 42 | { |
| 43 | return _url( |
| 44 | 'accessFile/' . base64_encode($this->getId() . ' ' |
| 45 | . trim($relativePath, DIRECTORY_SEPARATOR)) . '/', |
| 46 | 'File', |
| 47 | 'tao' |
| 48 | ); |
| 49 | } |
| 50 | } |