function CompiledRoute::__serialize

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/CompiledRoute.php \Drupal\Core\Routing\CompiledRoute::__serialize()
  2. 10 core/lib/Drupal/Core/Routing/CompiledRoute.php \Drupal\Core\Routing\CompiledRoute::__serialize()

File

core/lib/Drupal/Core/Routing/CompiledRoute.php, line 116

Class

CompiledRoute
A compiled route contains derived information from a route object.

Namespace

Drupal\Core\Routing

Code

public function __serialize() : array {
    // Calling the parent method is safer than trying to optimize out the extra
    // function calls.
    $data = parent::__serialize();
    $data['fit'] = $this->fit;
    $data['patternOutline'] = $this->patternOutline;
    $data['numParts'] = $this->numParts;
    return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.