Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
/ framework Public archive

Dynamis was a lightweight component based PHP framework that integrated a modern development workflow into Wordpress.

License

Notifications You must be signed in to change notification settings

dynamis-wp/framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamis Wordpress Framework

Dynamis is a lightweight component base PHP framework that integrates a modern development workflow, through Tekton, into Wordpress.

To get started, just require the project in your composer configuration and initialize the framework. Put the following sample code into your theme's functions.php to get it set up.

Sample Code

// Not required but used by Tekton date helpers
define('DATE_FORMAT', 'M j, Y');

/* ------------------------------ */

// Autoload classes
require_once __DIR__ . '/vendor/autoload.php';

// Create framework
$framework = \Dynamis\Framework::getInstance();

// Configure environment
if ($stage = getenv('APP_STAGE')) {
    $framework->setEnvironment($stage);
}
else {
    if (defined('WP_DEBUG') && WP_DEBUG) {
        $framework->setEnvironment('development');
    }
    else {
        $framework->setEnvironment('production');
    }
}

// Initialize
$framework->init();

All configuration files will be loaded from [theme-path]/config but it can and should be be manually overridden to avoid having the config in a public directory:

$framework->overridePath('config', 'path/to/theme/config')

Documentation

The documentation and tutorials for the framework can be found here.

License

MIT

About

Dynamis was a lightweight component based PHP framework that integrated a modern development workflow into Wordpress.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages