public function extendClass($className, $useAlias = true)
    {
        if ($className[0] === '\\' && $useAlias) {
            $className = ltrim($className, '\\');
            $this->useClass($className);

            $_p = explode('\\', $className);
            $shortClassName = end($_p);
            $this->extends = new ClassName($shortClassName);
        } else {
            $this->extends = new ClassName($className);
        }
    }
public function extendClass($className, $useAlias = true)
    {
        if ($className[0] === '\\' && $useAlias) {
            $className = ltrim($className, '\\');
            $this->useClass($className);

            $_p = explode('\\', $className);
            $shortClassName = end($_p);
            $this->extends = new ClassName($shortClassName);
        } else {
            $this->extends = new ClassName($className);
        }
    }
public function extendClass ( $ className , $ useAlias = true ) { if ( $ className [ 0 ] === '\\' && $ useAlias ) { $ className = ltrim ( $ className , '\\' ) ; $ this -> useClass ( $ className ) ; $ _p = explode ( '\\' , $ className ) ; $ shortClassName = end ( $ _p ) ; $ this -> extends = new ClassName ( $ shortClassName ) ; } else { $ this -> extends = new ClassName ( $ className ) ; } }
Add extends property

@param boolean $useAlias means append 'use' statement automatically.
Add extends property