public function createSubsidiary($name, $config)
    {
        if (!is_string($name) || empty($name)) {
            return null;
        }
        $className = '';
        if (class_exists($name)) {
            $className = $name;
        } elseif (array_key_exists($name, $this->subsidiaryMap)) {
            $className = $this->getSubsidiaryClass($name);
        } else {
            return null;
        }
        return $this->create($className, $config);
    }
public function createSubsidiary($name, $config)
    {
        if (!is_string($name) || empty($name)) {
            return null;
        }
        $className = '';
        if (class_exists($name)) {
            $className = $name;
        } elseif (array_key_exists($name, $this->subsidiaryMap)) {
            $className = $this->getSubsidiaryClass($name);
        } else {
            return null;
        }
        return $this->create($className, $config);
    }
public function createSubsidiary ( $ name , $ config ) { if ( ! is_string ( $ name ) || empty ( $ name ) ) { return null ; } $ className = '' ; if ( class_exists ( $ name ) ) { $ className = $ name ; } elseif ( array_key_exists ( $ name , $ this -> subsidiaryMap ) ) { $ className = $ this -> getSubsidiaryClass ( $ name ) ; } else { return null ; } return $ this -> create ( $ className , $ config ) ; }
Create subsidiary model.
@param string $name Subsidiary name, case insensitive.
@param array $config Subsidiary model configuration array.
@return mixed
Create subsidiary model .