Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gabbydgab committed Jun 8, 2016
0 parents commit 0feee9d
Show file tree
Hide file tree
Showing 28 changed files with 884 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Composer files
composer.phar
composer.lock
vendor/

# Local configs
config/autoload/*.local.php

# Binary gettext files
*.mo

# Data
data/logs/
data/cache/
data/sessions/
data/tmp/
temp/

# Test Build
build/

# Netbeans Project
nbproject

#Others
._*
.vagrant
.~lock.*
.buildpath
.DS_Store
.idea
.project
.settings
.gitmodules
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016, Coding Matters, Inc. (Gab Amba <gamba@gabbydgab.com>)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Initial AIM World Site Module
===========


Features
--------

TO DO
60 changes: 60 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "blessed-alliance/aim-world-component",
"description": "AIM World Site Integration",
"license": "MIT",
"type": "project",
"keywords": ["ZF module"],
"homepage": "http://www.aimworld.me/",
"authors": [
{
"name": "Gab Amba",
"email": "gamba@gabbydgab.com",
"homepage": "http://www.gabbydgab.com/"
}
],
"require": {
"php": "^5.6 || ^7.0",
"roave/security-advisories": "dev-master",
"evandotpro/edp-module-layouts": "dev-master",
"zendframework/zend-mvc": "^3.0",
"zendframework/zend-router": "^3.0",
"codingmatters/kernel": "^1.0 || ~0.1"
},
"require-dev": {
"zendframework/zend-test": "^3.0",
"squizlabs/php_codesniffer": "^2.3",
"phpbench/phpbench": "^0.11",
"filp/whoops": "^2.0"
},
"autoload": {
"psr-4": {
"AimWorld\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"AimWorldTest\\": "test/"
}
},
"extra": {
"zf": {
"module": "AimWorld",
"config-provider": "AimWorld\\ConfigProvider"
}
},
"scripts": {
"post-install-cmd" : [
"@check"
],
"post-update-cmd" : [
"@check"
],
"check": [
"@test",
"@cs"
],
"cs": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit"
}
}
2 changes: 2 additions & 0 deletions config/autoload/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
local.php
*.local.php
33 changes: 33 additions & 0 deletions config/autoload/aim-world.local.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* The MIT License
*
* Copyright (c) 2016, Coding Matters, Inc. (Gab Amba <gamba@gabbydgab.com>)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

$settings = [
'user_id' => "<your-id-here>",
];

return [
'aim_world_settings' => $settings
];
9 changes: 9 additions & 0 deletions config/controller-plugins.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

/**
* We inform the application about controller plugins we expect to have in the application.
*
* @see https://zendframework.github.io/zend-mvc/plugins/
*/

return [];
16 changes: 16 additions & 0 deletions config/controllers.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* We inform the application about controllers we expect to have in the application.
*
* @see https://zendframework.github.io/zend-mvc/quick-start/#create-a-route
*/

use Zend\ServiceManager\Factory\InvokableFactory;
use AimWorld\Controller;

return [
'factories' => [
Controller\PageController::class => InvokableFactory::class,
]
];
16 changes: 16 additions & 0 deletions config/dependencies.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* The Service Manager component can be configured by passing an associative array to the component's constructor.
*
* @see https://zendframework.github.io/zend-servicemanager/configuring-the-service-manager/
*/

return [
'factories' => [],
'services' => [],
'abstract_factories' => [],
'delegators' => [],
'shared' => [],
'shared_by_default' => true
];
17 changes: 17 additions & 0 deletions config/glob.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

return [
/**
* Module (less than 20 lines) that simply allows you to specify alternative layouts to use for each module.
*
* @package evandotpro/edp-module-layouts
* @see https://github.com/EvanDotPro/EdpModuleLayouts/blob/master/README.md
*/
'module_layouts' => [
'AimWorld' => 'site/layout'
],

/**
* Append additional glob config below:
*/
];
14 changes: 14 additions & 0 deletions config/middleware.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

return [
'always' => [
'middleware' => [
// Add more middleware here that you want to execute on
// every request:
// - bootstrapping
// - pre-conditions
// - modifications to outgoing responses
],
'priority' => PHP_INT_MAX,
]
];
5 changes: 5 additions & 0 deletions config/navigation.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
'default' => []
];
76 changes: 76 additions & 0 deletions config/routes.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php

/**
* Most of the routing definitions will be done in module configuration files.
*
* @see https://zendframework.github.io/zend-router/routing/
*/

use Zend\Router\Http\Literal;
use AimWorld\Controller;

return [
'aim-world' => [
'type' => Literal::class,
'options' => [
'route' => '/aim-world',
'defaults' => [
'controller' => Controller\PageController::class,
'action' => 'about'
],
'may_terminate' => true,
'child_routes' => [
'marketing-plan' => [
'type' => Literal::class,
'options' => [
'route' => '/marketing-plan',
'defaults' => [
'controller' => Controller\PageController::class,
'action' => 'marketing_plan'
]
]
],
'products' => [
'type' => Literal::class,
'options' => [
'route' => '/products',
'defaults' => [
'controller' => Controller\PageController::class,
'action' => 'products'
]
]
],
'i-protect' => [
'type' => Literal::class,
'options' => [
'route' => '/product/i-protect-24-7',
'defaults' => [
'controller' => Controller\PageController::class,
'action' => 'i_protect'
]
]
],
'i-protect-home' => [
'type' => Literal::class,
'options' => [
'route' => '/product/i-protect-home',
'defaults' => [
'controller' => Controller\PageController::class,
'action' => 'i_protect_home'
]
]
],
'careleaf' => [
'type' => Literal::class,
'options' => [
'route' => '/product/careleaf',
'defaults' => [
'controller' => Controller\PageController::class,
'action' => 'careleaf'
]
]
]
]
]
]
];
29 changes: 29 additions & 0 deletions config/templates.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

return [
// Zend Framework Configuration
'view_manager' => [
'template_map' => [],
'template_path_stack' => [
'aim-world' => __DIR__ . '/../view',
],
],

// Zend Expressive Configuration
'templates' => [
'layout' => "site/layout",
'map' => [],
'paths' => [
'aim-world' => [__DIR__ . '/../view']
]
],

/**
* Zend View Helpers
*/
'view_helpers' => [
'aliases' => [],
'invokables' => [],
'factories' => []
]
];
20 changes: 20 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<ruleset name="Zend Framework coding standard">
<description>Zend Framework coding standard</description>

<!-- display progress -->
<arg value="p"/>
<arg name="colors"/>

<!-- inherit rules from: -->
<rule ref="PSR2"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false"/>
</properties>
</rule>

<!-- Paths to check -->
<file>src</file>
</ruleset>
21 changes: 21 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="./vendor/autoload.php" colors="true">
<logging>
<log type="coverage-html" target="build/coverage" title="SkeletonModule"
charset="UTF-8" yui="true" highlight="true"
lowUpperBound="35" highLowerBound="true" />
<log type="coverage-clover" target="build/logs/clover.xml" />
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
<log type="testdox-html" target="build/phpdox/index.html"/>
<log type="testdox-txt" target="build/phpdox/testdox.txt"/>
</logging>
<testsuite name="unit">
<directory>./test/</directory>
</testsuite>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 0feee9d

Please sign in to comment.