original_string: public function getPolymorphicRelation()
      {
          if ($this->_cached !== null) {
              return $this->_cached;
          }
          $className = $this->owner->getAttribute($this->classAttribute);
          if ($className == "") {
              return null;
          }
          if (!class_exists($className)) {
              Yii::error("Underlying object class " . $className . " not found!");
              return null;
          }
          $tableName = $className::tableName();
          $object = $className::find()->where([$tableName . '.id' => $this->owner->getAttribute($this->pkAttribute)])->one();
          if ($object !== null && $this->validateUnderlyingObjectType($object)) {
              $this->_cached = $object;
              return $object;
          }
          return null;
      }
code: public function getPolymorphicRelation()
      {
          if ($this->_cached !== null) {
              return $this->_cached;
          }
          $className = $this->owner->getAttribute($this->classAttribute);
          if ($className == "") {
              return null;
          }
          if (!class_exists($className)) {
              Yii::error("Underlying object class " . $className . " not found!");
              return null;
          }
          $tableName = $className::tableName();
          $object = $className::find()->where([$tableName . '.id' => $this->owner->getAttribute($this->pkAttribute)])->one();
          if ($object !== null && $this->validateUnderlyingObjectType($object)) {
              $this->_cached = $object;
              return $object;
          }
          return null;
      }
code_tokens: public function getPolymorphicRelation ( ) { if ( $ this -> _cached !== null ) { return $ this -> _cached ; } $ className = $ this -> owner -> getAttribute ( $ this -> classAttribute ) ; if ( $ className == "" ) { return null ; } if ( ! class_exists ( $ className ) ) { Yii :: error ( "Underlying object class " . $ className . " not found!" ) ; return null ; } $ tableName = $ className :: tableName ( ) ; $ object = $ className :: find ( ) -> where ( [ $ tableName . '.id' => $ this -> owner -> getAttribute ( $ this -> pkAttribute ) ] ) -> one ( ) ; if ( $ object !== null && $ this -> validateUnderlyingObjectType ( $ object ) ) { $ this -> _cached = $ object ; return $ object ; } return null ; }
docstring: Returns the Underlying Object
  
  @return mixed
docstring_tokens: Returns the Underlying Object