public static function wake_from_cache($a) {
        $record = new stdClass;
        foreach (self::$coursecatfields as $property => $cachedirectives) {
            if ($cachedirectives !== null) {
                list($shortname, $defaultvalue) = $cachedirectives;
                if (array_key_exists($shortname, $a)) {
                    $record->$property = $a[$shortname];
                } else {
                    $record->$property = $defaultvalue;
                }
            }
        }
        $record->ctxid = $a['xi'];
        $record->ctxpath = $a['xp'];
        $record->ctxdepth = $record->depth + 1;
        $record->ctxlevel = CONTEXT_COURSECAT;
        $record->ctxinstance = $record->id;
        $record->ctxlocked = $a['xl'];
        return new self($record, true);
    }
public static function wake_from_cache($a) {
        $record = new stdClass;
        foreach (self::$coursecatfields as $property => $cachedirectives) {
            if ($cachedirectives !== null) {
                list($shortname, $defaultvalue) = $cachedirectives;
                if (array_key_exists($shortname, $a)) {
                    $record->$property = $a[$shortname];
                } else {
                    $record->$property = $defaultvalue;
                }
            }
        }
        $record->ctxid = $a['xi'];
        $record->ctxpath = $a['xp'];
        $record->ctxdepth = $record->depth + 1;
        $record->ctxlevel = CONTEXT_COURSECAT;
        $record->ctxinstance = $record->id;
        $record->ctxlocked = $a['xl'];
        return new self($record, true);
    }
public static function wake_from_cache ( $ a ) { $ record = new stdClass ; foreach ( self :: $ coursecatfields as $ property => $ cachedirectives ) { if ( $ cachedirectives !== null ) { list ( $ shortname , $ defaultvalue ) = $ cachedirectives ; if ( array_key_exists ( $ shortname , $ a ) ) { $ record -> $ property = $ a [ $ shortname ] ; } else { $ record -> $ property = $ defaultvalue ; } } } $ record -> ctxid = $ a [ 'xi' ] ; $ record -> ctxpath = $ a [ 'xp' ] ; $ record -> ctxdepth = $ record -> depth + 1 ; $ record -> ctxlevel = CONTEXT_COURSECAT ; $ record -> ctxinstance = $ record -> id ; $ record -> ctxlocked = $ a [ 'xl' ] ; return new self ( $ record , true ) ; }
Takes the data provided by prepare_to_cache and reinitialises an instance of the associated from it.

implementing method from interface cacheable_object

@param array $a
@return core_course_category
Takes the data provided by prepare_to_cache and reinitialises an instance of the associated from it .