| 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 |
* Abstract class for core_competency objects saved to the DB.
|
- |
|
| 19 |
*
|
- |
|
| 20 |
* @package core_competency
|
- |
|
| 21 |
* @copyright 2015 Damyon Wiese
|
- |
|
| 22 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
- |
|
| 23 |
*/
|
16 |
|
| 24 |
namespace core_competency;
|
- |
|
| 25 |
defined('MOODLE_INTERNAL') || die();
|
- |
|
| 26 |
|
- |
|
| 27 |
// We need to alias the invalid_persistent_exception, because the persistent classes from
|
- |
|
| 28 |
// core_competency used to throw a \core_competency\invalid_persistent_exception. They now
|
- |
|
| 29 |
// fully inherit from \core\persistent which throws a core exception. Using class_alias
|
- |
|
| 30 |
// ensures that previous try/catch statements still work. Also note that we always need
|
- |
|
| 31 |
// need to alias, we cannot do it passively in the classloader because try/catch statements
|
- |
|
| 32 |
// do not trigger a class loading. Note that for this trick to work, all the classes
|
- |
|
| 33 |
// which were extending \core_competency\persistent still need to extend it or the alias
|
- |
|
| 34 |
// won't be effective.
|
- |
|
| Línea 35... |
Línea 17... |
| 35 |
class_alias('core\\invalid_persistent_exception', 'core_competency\\invalid_persistent_exception');
|
17 |
namespace core_competency;
|
| 36 |
|
18 |
|
| 37 |
/**
|
19 |
/**
|
| 38 |
* Abstract class for core_competency objects saved to the DB.
|
20 |
* Abstract class for core_competency objects saved to the DB.
|