FeaturePhp/Aspect/AspectKernel.php
public function generateFiles($class, $target) {
        $files = array();
        $includes = "";
        $registers = "";
        
        foreach ($this->aspects as $aspect) {
            $files[] = $aspect->getStoredFile();
            $includes .= "require_once __DIR__ . '/" . str_replace("'", "\'", $aspect->getRelativeFileTarget($target)) . "';\n";
            $registers .= '        $container->registerAspect(new ' . $aspect->getClassName() . "());\n";
        }

        $files[] = fphp\File\TemplateFile::fromSpecification(
            fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                array(
                    "source" => "AspectKernel.php.template",
                    "target" => $target,
                    "rules" => array(
                        array("assign" => "class", "to" => $class),
                        array("assign" => "includes", "to" => trim($includes)),
                        array("assign" => "registers", "to" => trim($registers))
                    )
                ), fphp\Settings::inDirectory(__DIR__))
        );
        
        return $files;
    }
public function generateFiles($class, $target) {
        $files = array();
        $includes = "";
        $registers = "";
        
        foreach ($this->aspects as $aspect) {
            $files[] = $aspect->getStoredFile();
            $includes .= "require_once __DIR__ . '/" . str_replace("'", "\'", $aspect->getRelativeFileTarget($target)) . "';\n";
            $registers .= '        $container->registerAspect(new ' . $aspect->getClassName() . "());\n";
        }

        $files[] = fphp\File\TemplateFile::fromSpecification(
            fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                array(
                    "source" => "AspectKernel.php.template",
                    "target" => $target,
                    "rules" => array(
                        array("assign" => "class", "to" => $class),
                        array("assign" => "includes", "to" => trim($includes)),
                        array("assign" => "registers", "to" => trim($registers))
                    )
                ), fphp\Settings::inDirectory(__DIR__))
        );
        
        return $files;
    }
public function generateFiles ( $ class , $ target ) { $ files = array ( ) ; $ includes = "" ; $ registers = "" ; foreach ( $ this -> aspects as $ aspect ) { $ files [ ] = $ aspect -> getStoredFile ( ) ; $ includes .= "require_once __DIR__ . '/" . str_replace ( "'" , "\'" , $ aspect -> getRelativeFileTarget ( $ target ) ) . "';\n" ; $ registers .= '        $container->registerAspect(new ' . $ aspect -> getClassName ( ) . "());\n" ; } $ files [ ] = fphp \ File \ TemplateFile :: fromSpecification ( fphp \ Specification \ TemplateSpecification :: fromArrayAndSettings ( array ( "source" => "AspectKernel.php.template" , "target" => $ target , "rules" => array ( array ( "assign" => "class" , "to" => $ class ) , array ( "assign" => "includes" , "to" => trim ( $ includes ) ) , array ( "assign" => "registers" , "to" => trim ( $ registers ) ) ) ) , fphp \ Settings :: inDirectory ( __DIR__ ) ) ) ; return $ files ; }
Generates the aspect kernel's files.
This includes all aspect files and the aspect kernel itself.
@param string $class
@param string $target
Generates the aspect kernel s files . This includes all aspect files and the aspect kernel itself .