You are here

private function Snapshot::snapshotClasses in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/sebastian/global-state/src/Snapshot.php \SebastianBergmann\GlobalState\Snapshot::snapshotClasses()

Creates a snapshot user-defined classes.

1 call to Snapshot::snapshotClasses()
Snapshot::__construct in vendor/sebastian/global-state/src/Snapshot.php
Creates a snapshot of the current global state.

File

vendor/sebastian/global-state/src/Snapshot.php, line 301

Class

Snapshot
A snapshot of global state.

Namespace

SebastianBergmann\GlobalState

Code

private function snapshotClasses() {
  foreach (array_reverse(get_declared_classes()) as $className) {
    $class = new ReflectionClass($className);
    if (!$class
      ->isUserDefined()) {
      break;
    }
    $this->classes[] = $className;
  }
  $this->classes = array_reverse($this->classes);
}