public function createModel($scenario = 'insert')
    {
        /* @var File $model */
        $model = new $this->modelClass($scenario);
        if (!$model instanceof File) {
            throw new CException(sprintf('Model class "%s" must extend "File".', $this->modelClass));
        }
        return $model;
    }
public function createModel($scenario = 'insert')
    {
        /* @var File $model */
        $model = new $this->modelClass($scenario);
        if (!$model instanceof File) {
            throw new CException(sprintf('Model class "%s" must extend "File".', $this->modelClass));
        }
        return $model;
    }
public function createModel ( $ scenario = 'insert' ) { /* @var File $model */ $ model = new $ this -> modelClass ( $ scenario ) ; if ( ! $ model instanceof File ) { throw new CException ( sprintf ( 'Model class "%s" must extend "File".' , $ this -> modelClass ) ) ; } return $ model ; }
Creates a file model.
@param string $scenario the scenario name.
@return File the file model.
@throws CException if the file model does not extend the "File" class.
Creates a file model .