public function getModelName()
    {
        if (!$name = $this->modelName) {
            $tableName = $this->getName();

            $modelNames = [];
            foreach (explode('_', $tableName) as $word) {
                $modelNames[] = ucfirst(Inflector::singularize($word));
            } //foreach
            $modelName = implode('', $modelNames);

            $this->setModelName($name = ucfirst($this->isReservedPHPWord($modelName) ? $tableName : $modelName));
        } // if

        return $name;
    }
public function getModelName()
    {
        if (!$name = $this->modelName) {
            $tableName = $this->getName();

            $modelNames = [];
            foreach (explode('_', $tableName) as $word) {
                $modelNames[] = ucfirst(Inflector::singularize($word));
            } //foreach
            $modelName = implode('', $modelNames);

            $this->setModelName($name = ucfirst($this->isReservedPHPWord($modelName) ? $tableName : $modelName));
        } // if

        return $name;
    }
public function getModelName ( ) { if ( ! $ name = $ this -> modelName ) { $ tableName = $ this -> getName ( ) ; $ modelNames = [ ] ; foreach ( explode ( '_' , $ tableName ) as $ word ) { $ modelNames [ ] = ucfirst ( Inflector :: singularize ( $ word ) ) ; } //foreach $ modelName = implode ( '' , $ modelNames ) ; $ this -> setModelName ( $ name = ucfirst ( $ this -> isReservedPHPWord ( $ modelName ) ? $ tableName : $ modelName ) ) ; } // if return $ name ; }
Returns the model name.
@return string
Returns the model name .