src/generators/ComponentGenerator.php
public function validateClass($attribute, $params)
    {
        $className = @\Yii::import($this->$attribute, true);

        if (!is_string($className) || !$this->classExists($className)) {
            $this->addError($attribute, "Class '$className' does not exist or has syntax error.");
        } elseif (isset($params['extends'])
            && ltrim($className, '\\') !== ltrim($params['extends'], '\\')
            && !is_subclass_of($className, $params['extends'])) {
            $this->addError('baseClass', "Class '$className' must extend from {$params['extends']}.");
        }
    }
public function validateClass($attribute, $params)
    {
        $className = @\Yii::import($this->$attribute, true);

        if (!is_string($className) || !$this->classExists($className)) {
            $this->addError($attribute, "Class '$className' does not exist or has syntax error.");
        } elseif (isset($params['extends'])
            && ltrim($className, '\\') !== ltrim($params['extends'], '\\')
            && !is_subclass_of($className, $params['extends'])) {
            $this->addError('baseClass', "Class '$className' must extend from {$params['extends']}.");
        }
    }
public function validateClass ( $ attribute , $ params ) { $ className = @ \ Yii :: import ( $ this -> $ attribute , true ) ; if ( ! is_string ( $ className ) || ! $ this -> classExists ( $ className ) ) { $ this -> addError ( $ attribute , "Class '$className' does not exist or has syntax error." ) ; } elseif ( isset ( $ params [ 'extends' ] ) && ltrim ( $ className , '\\' ) !== ltrim ( $ params [ 'extends' ] , '\\' ) && ! is_subclass_of ( $ className , $ params [ 'extends' ] ) ) { $ this -> addError ( 'baseClass' , "Class '$className' must extend from {$params['extends']}." ) ; } }
Validates the base class to make sure that it exists and that it extends from the core class.

@param string $attribute the attribute to validate.
@param array $params validation parameters.
Validates the base class to make sure that it exists and that it extends from the core class .