You are here

public function Decorator::getOriginalObject in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Decorator.php \Drupal\webprofiler\Decorator::getOriginalObject()
  2. 8.2 webprofiler/src/Decorator.php \Drupal\webprofiler\Decorator::getOriginalObject()
  3. 4.x webprofiler/src/Decorator.php \Drupal\webprofiler\Decorator::getOriginalObject()

Return the original (i.e. non decorated) object.

Return value

mixed The original object.

3 calls to Decorator::getOriginalObject()
Decorator::isCallable in webprofiler/src/Decorator.php
Returns true if $method is a PHP callable.
Decorator::__call in webprofiler/src/Decorator.php
Decorator::__get in webprofiler/src/Decorator.php

File

webprofiler/src/Decorator.php, line 31

Class

Decorator
Generic class Decorator.

Namespace

Drupal\webprofiler

Code

public function getOriginalObject() {
  $object = $this->object;
  while ($object instanceof Decorator) {
    $object = $object
      ->getOriginalObject();
  }
  return $object;
}