Ouzo\Tools\Controller\Template\ControllerClassStubPlaceholderReplacer::content PHP Method

content() public method

public content ( )
    public function content()
    {
        $stubContent = file_get_contents($this->stubFilePath());
        $strSubstitutor = new StrSubstitutor(array('namespace' => $this->generator->getClassNamespace(), 'class' => $this->generator->getClassName()));
        return $strSubstitutor->replace($stubContent);
    }

Usage Example

Example #1
0
 public function templateContents()
 {
     $classStubPlaceholderReplacer = new ControllerClassStubPlaceholderReplacer($this);
     return $classStubPlaceholderReplacer->content();
 }
ControllerClassStubPlaceholderReplacer