Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vutran/wpmvc-core

Simple framework for building WordPress themes/apps
https://github.com/vutran/wpmvc-core

mvc php wordpress wp

Last synced: about 1 month ago
JSON representation

Simple framework for building WordPress themes/apps

Awesome Lists containing this project

README

        

# WPMVC Core

> Simple framework for building WordPress themes/apps

## Quick Start

See below for a quick usage example. All files are relative to your theme directory.

#### functions.php
````php
TEMPLATEPATH,
'templateDir' => str_replace(WP_CONTENT_DIR, '', WP_CONTENT_URL . TEMPLATEPATH),
'templateUrl' => get_template_directory_uri()
));

// Create a view
$myView = $app->createView('slug-a/slug-b');

// set view variables
$myView->set([
'foo' => 'Hello',
'bar' => 'World',
]);

// prints the view
echo $myView->output();
````

#### views/slug-a/slug-b.php

````php
` tag |

# Docker

## Install

```bash
$ docker-compose up install
```

## Update Composer and Packages

```bash
$ docker-compose up update
```

## PHP Code Sniffer

```bash
$ docker-compose up phpcs
```

## Validate PHP

```bash
# --rm automatically remove the container on exit
# -v map volume host volume to container (host:container)
# php:5.6 image name:tag
# php command to run in container
# script.php PHP script to run
$ docker run --rm -v "$PWD":/app -w /app php:5.6 php /path/to/script.php
```