src/Common/Console/Command/Make/Model.php
private function createModelFile(\stdClass $oModel, string $sTemplate): self
    {
        $this->oOutput->write('Creating model <comment>' . $oModel->class_path . '</comment>... ');
        $this->createPath($oModel->path);
        $this->createFile(
            $oModel->path . $oModel->filename,
            $this->getResource('template/' . $sTemplate . '.php', (array) $oModel)
        );
        $this->oOutput->writeln('<info>done!</info>');

        return $this;
    }
private function createModelFile(\stdClass $oModel, string $sTemplate): self
    {
        $this->oOutput->write('Creating model <comment>' . $oModel->class_path . '</comment>... ');
        $this->createPath($oModel->path);
        $this->createFile(
            $oModel->path . $oModel->filename,
            $this->getResource('template/' . $sTemplate . '.php', (array) $oModel)
        );
        $this->oOutput->writeln('<info>done!</info>');

        return $this;
    }
private function createModelFile ( \ stdClass $ oModel , string $ sTemplate ) : self { $ this -> oOutput -> write ( 'Creating model <comment>' . $ oModel -> class_path . '</comment>... ' ) ; $ this -> createPath ( $ oModel -> path ) ; $ this -> createFile ( $ oModel -> path . $ oModel -> filename , $ this -> getResource ( 'template/' . $ sTemplate . '.php' , ( array ) $ oModel ) ) ; $ this -> oOutput -> writeln ( '<info>done!</info>' ) ; return $ this ; }
Creates the model file

@param \stdClass $oModel    The model being created
@param string    $sTemplate The template to use

@return $this
@throws NailsException
@throws Path\DoesNotExistException
@throws Path\IsNotWritableException
Creates the model file