setExtends() public method

public setExtends ( PHPClass $extends ) : PHPClass
$extends PHPClass
return PHPClass
示例#1
0
 private function handleClassExtension(PHPClass $class, Type $type)
 {
     if ($alias = $this->getTypeAlias($type)) {
         $c = PHPClass::createFromFQCN($alias);
         $val = new PHPProperty('__value');
         $val->setType($c);
         $c->addProperty($val);
         $class->setExtends($c);
     } else {
         $extension = $this->visitType($type, true);
         $class->setExtends($extension);
     }
 }