Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vutran/wpmvc-core
- Owner: vutran
- License: mit
- Created: 2015-11-09T21:23:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-03T16:40:58.000Z (over 8 years ago)
- Last Synced: 2024-11-14T14:52:30.747Z (3 months ago)
- Topics: mvc, php, wordpress, wp
- Language: PHP
- Homepage: https://packagist.org/packages/vutran/wpmvc-core
- Size: 335 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```