original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Takes the data provided by prepare_to_cache and reinitialises an instance of the associated from it .