public function model($name, $config = [])
    {
        $modelData = $this->modelMap[ucfirst($name)];

        if (!empty($config)) {
            if (is_string($modelData)) {
                $modelData = ['class' => $modelData];
            }

            $modelData = ArrayHelper::merge(
                $modelData,
                $config
            );
        }

        return $modelData;
    }
public function model($name, $config = [])
    {
        $modelData = $this->modelMap[ucfirst($name)];

        if (!empty($config)) {
            if (is_string($modelData)) {
                $modelData = ['class' => $modelData];
            }

            $modelData = ArrayHelper::merge(
                $modelData,
                $config
            );
        }

        return $modelData;
    }
public function model ( $ name , $ config = [ ] ) { $ modelData = $ this -> modelMap [ ucfirst ( $ name ) ] ; if ( ! empty ( $ config ) ) { if ( is_string ( $ modelData ) ) { $ modelData = [ 'class' => $ modelData ] ; } $ modelData = ArrayHelper :: merge ( $ modelData , $ config ) ; } return $ modelData ; }
Get defined className of model

Returns an string or array compatible
with the Yii::createObject method.

@param string $name
@param array $config // You should never send an array with a key defined as "class" since this will
// overwrite the main className defined by the system.
@return string|array
Get defined className of model