public function GenerateCustomSources()
    {
        // Variables used by some template files.
        $authors = \Peg\Lib\Settings::GetAuthors();
        $contributors = \Peg\Lib\Settings::GetContributors();
        $extension = \Peg\Lib\Settings::GetExtensionName();
        $version = \Peg\Lib\Settings::GetVersion();

        // Variable to temporarily store a template file content.
        $content = "";

        // Generate custom sources list
        $custom_sources = $this->GetCustomSources();

        if(count($custom_sources) > 0)
        {
            foreach($custom_sources as $custom_source)
            {
                if($custom_source != "." && $custom_source != "..")
                {
                    ob_start();
                        include($this->GetGenericTemplate(
                            $custom_source, "custom_sources"
                        ));
                        $content = ob_get_contents();
                    ob_end_clean();

                    if(
                        (strpos($custom_source, ".c") !== false)
                        ||
                        (strpos($custom_source, ".cpp") !== false)
                    )
                    {
                        $this->AddGenericFile(
                            $custom_source,
                            $content,
                            "src"
                        );
                    }
                    elseif(
                        (strpos($custom_source, ".h") !== false)
                        ||
                        (strpos($custom_source, ".hpp") !== false)
                    )
                    {
                        $this->AddGenericFile(
                            $custom_source,
                            $content,
                            "includes"
                        );
                    }
                }
            }
        }
    }
public function GenerateCustomSources()
    {
        // Variables used by some template files.
        $authors = \Peg\Lib\Settings::GetAuthors();
        $contributors = \Peg\Lib\Settings::GetContributors();
        $extension = \Peg\Lib\Settings::GetExtensionName();
        $version = \Peg\Lib\Settings::GetVersion();

        // Variable to temporarily store a template file content.
        $content = "";

        // Generate custom sources list
        $custom_sources = $this->GetCustomSources();

        if(count($custom_sources) > 0)
        {
            foreach($custom_sources as $custom_source)
            {
                if($custom_source != "." && $custom_source != "..")
                {
                    ob_start();
                        include($this->GetGenericTemplate(
                            $custom_source, "custom_sources"
                        ));
                        $content = ob_get_contents();
                    ob_end_clean();

                    if(
                        (strpos($custom_source, ".c") !== false)
                        ||
                        (strpos($custom_source, ".cpp") !== false)
                    )
                    {
                        $this->AddGenericFile(
                            $custom_source,
                            $content,
                            "src"
                        );
                    }
                    elseif(
                        (strpos($custom_source, ".h") !== false)
                        ||
                        (strpos($custom_source, ".hpp") !== false)
                    )
                    {
                        $this->AddGenericFile(
                            $custom_source,
                            $content,
                            "includes"
                        );
                    }
                }
            }
        }
    }
public function GenerateCustomSources ( ) { // Variables used by some template files. $ authors = \ Peg \ Lib \ Settings :: GetAuthors ( ) ; $ contributors = \ Peg \ Lib \ Settings :: GetContributors ( ) ; $ extension = \ Peg \ Lib \ Settings :: GetExtensionName ( ) ; $ version = \ Peg \ Lib \ Settings :: GetVersion ( ) ; // Variable to temporarily store a template file content. $ content = "" ; // Generate custom sources list $ custom_sources = $ this -> GetCustomSources ( ) ; if ( count ( $ custom_sources ) > 0 ) { foreach ( $ custom_sources as $ custom_source ) { if ( $ custom_source != "." && $ custom_source != ".." ) { ob_start ( ) ; include ( $ this -> GetGenericTemplate ( $ custom_source , "custom_sources" ) ) ; $ content = ob_get_contents ( ) ; ob_end_clean ( ) ; if ( ( strpos ( $ custom_source , ".c" ) !== false ) || ( strpos ( $ custom_source , ".cpp" ) !== false ) ) { $ this -> AddGenericFile ( $ custom_source , $ content , "src" ) ; } elseif ( ( strpos ( $ custom_source , ".h" ) !== false ) || ( strpos ( $ custom_source , ".hpp" ) !== false ) ) { $ this -> AddGenericFile ( $ custom_source , $ content , "includes" ) ; } } } } }
Generates sources from the custom_sources templates directory.
Generates sources from the custom_sources templates directory .