commit a6c48a3d1da39bfc3f589c20b0e11fa6cc787aec Author: Antonio Ramirez Date: Sat Dec 3 16:01:05 2016 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8171ada --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# yii console command +/yii + +# phpstorm project files +.idea + +# netbeans project files +nbproject + +# zend studio for eclipse project files +.buildpath +.project +.settings + +# windows thumbnail cache +Thumbs.db + +# composer vendor dir +/vendor + +# composer itself is not needed +composer.phar + +# Mac DS_Store Files +.DS_Store + +# phpunit itself is not needed +phpunit.phar +# local phpunit config +/phpunit.xml + +# vagrant runtime +/.vagrant +# vagrant folder we are not using it +vagrant +Vagrantfile + +# javascript files +/node_modules diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..f2574da --- /dev/null +++ b/composer.json @@ -0,0 +1,31 @@ +{ + "name": "vendor_name/package_name", + "description": "description_text", + "license": "proprietary", + "authors": [ + { + "name": "author's name", + "email": "email@example.com" + } + ], + "require-dev": { + "squizlabs/php_codesniffer": "^2.7", + "fabpot/php-cs-fixer": "^1.12", + "phpmd/phpmd": "^2.4" + }, + "autoload": { + "psr-4": { + "Da\\" : ["./lib", "./tests/lib"] + } + }, + "autoload-dev": { + "psr-4": { + "Da\\": ["./lib", "./tests/lib"] + } + }, + "require": { + "dektrium/yii2-user": "^0.9.9", + "dektrium/yii2-rbac": "^0.3.0" + }, + "minimum-stability": "dev" +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..7f5fc03 --- /dev/null +++ b/composer.lock @@ -0,0 +1,947 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "8cb621f351f80e4f0c473a0c4b2bdbd9", + "content-hash": "f3c9716791a798a7b8045a548b52ecf5", + "packages": [ + { + "name": "bower-asset/bootstrap", + "version": "v4.0.0-alpha.4", + "source": { + "type": "git", + "url": "https://github.com/twbs/bootstrap.git", + "reference": "295c93846c154fb461f85b30e663102f7e171104" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/295c93846c154fb461f85b30e663102f7e171104", + "reference": "295c93846c154fb461f85b30e663102f7e171104", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.9.1,<4.0", + "bower-asset/tether": ">=1.1.1,<2.0.0" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": [ + "scss/bootstrap.scss", + "dist/js/bootstrap.js" + ], + "bower-asset-ignore": [ + "/.*", + "_config.yml", + "CNAME", + "composer.json", + "CONTRIBUTING.md", + "docs", + "js/tests", + "test-infra" + ] + }, + "license": [ + "MIT" + ], + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", + "keywords": [ + "css", + "framework", + "front-end", + "js", + "mobile-first", + "responsive", + "sass", + "web" + ] + }, + { + "name": "bower-asset/jquery", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/jquery/jquery-dist.git", + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72", + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "dist/jquery.js", + "bower-asset-ignore": [ + "package.json" + ] + }, + "license": [ + "MIT" + ], + "keywords": [ + "browser", + "javascript", + "jquery", + "library" + ] + }, + { + "name": "bower-asset/jquery.inputmask", + "version": "3.2.7", + "source": { + "type": "git", + "url": "https://github.com/RobinHerbots/Inputmask.git", + "reference": "5a72c563b502b8e05958a524cdfffafe9987be38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5a72c563b502b8e05958a524cdfffafe9987be38", + "reference": "5a72c563b502b8e05958a524cdfffafe9987be38", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.7" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": [ + "./dist/inputmask/inputmask.js" + ], + "bower-asset-ignore": [ + "**/*", + "!dist/*", + "!dist/inputmask/*", + "!dist/min/*", + "!dist/min/inputmask/*", + "!extra/bindings/*", + "!extra/dependencyLibs/*", + "!extra/phone-codes/*" + ] + }, + "license": [ + "http://opensource.org/licenses/mit-license.php" + ], + "description": "jquery.inputmask is a jquery plugin which create an input mask.", + "keywords": [ + "form", + "input", + "inputmask", + "jquery", + "mask", + "plugins" + ] + }, + { + "name": "bower-asset/punycode", + "version": "v1.3.2", + "source": { + "type": "git", + "url": "https://github.com/bestiejs/punycode.js.git", + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "punycode.js", + "bower-asset-ignore": [ + "coverage", + "tests", + ".*", + "component.json", + "Gruntfile.js", + "node_modules", + "package.json" + ] + } + }, + { + "name": "bower-asset/tether", + "version": "v1.2.4", + "source": { + "type": "git", + "url": "https://github.com/HubSpot/tether.git", + "reference": "a7ee918947c4ab3d8f91727c08e632aaefcfa3d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/HubSpot/tether/zipball/a7ee918947c4ab3d8f91727c08e632aaefcfa3d4", + "reference": "a7ee918947c4ab3d8f91727c08e632aaefcfa3d4", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "dist/js/tether.js", + "bower-asset-ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] + }, + "license": [ + "MIT" + ], + "description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.", + "keywords": [ + "javascript" + ] + }, + { + "name": "bower-asset/yii2-pjax", + "version": "v2.0.6", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/jquery-pjax.git", + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978", + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978", + "shasum": "" + }, + "require": { + "bower-asset/jquery": ">=1.8" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": "./jquery.pjax.js", + "bower-asset-ignore": [ + ".travis.yml", + "Gemfile", + "Gemfile.lock", + "CONTRIBUTING.md", + "vendor/", + "script/", + "test/" + ] + }, + "license": [ + "MIT" + ] + }, + { + "name": "cebe/markdown", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/cebe/markdown.git", + "reference": "2c368a9329cde1fdaac30b75d74e20b5c85f70a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cebe/markdown/zipball/2c368a9329cde1fdaac30b75d74e20b5c85f70a8", + "reference": "2c368a9329cde1fdaac30b75d74e20b5c85f70a8", + "shasum": "" + }, + "require": { + "lib-pcre": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "cebe/indent": "*", + "facebook/xhprof": "*@dev", + "phpunit/phpunit": "4.1.*" + }, + "bin": [ + "bin/markdown" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "cebe\\markdown\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc", + "homepage": "http://cebe.cc/", + "role": "Creator" + } + ], + "description": "A super fast, highly extensible markdown parser for PHP", + "homepage": "https://github.com/cebe/markdown#readme", + "keywords": [ + "extensible", + "fast", + "gfm", + "markdown", + "markdown-extra" + ], + "time": "2016-09-27 13:35:10" + }, + { + "name": "dektrium/yii2-rbac", + "version": "0.3.0", + "source": { + "type": "git", + "url": "https://github.com/dektrium/yii2-rbac.git", + "reference": "4c5c383f577256d34cbc37ed26809a8ff109b2ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dektrium/yii2-rbac/zipball/4c5c383f577256d34cbc37ed26809a8ff109b2ec", + "reference": "4c5c383f577256d34cbc37ed26809a8ff109b2ec", + "shasum": "" + }, + "require": { + "kartik-v/yii2-widget-select2": "*", + "yiisoft/yii2": "2.0.*" + }, + "type": "yii2-extension", + "extra": { + "bootstrap": "dektrium\\rbac\\Bootstrap" + }, + "autoload": { + "psr-4": { + "dektrium\\rbac\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dmitry Erofeev", + "email": "dmeroff@gmail.com", + "homepage": "http://dmeroff.ru" + } + ], + "description": "RBAC management module for Yii2", + "keywords": [ + "dektrium", + "rbac gui", + "rbac management", + "rbac module", + "yii rbac", + "yii2", + "yii2-rbac" + ], + "time": "2016-03-30 12:19:16" + }, + { + "name": "dektrium/yii2-user", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/dektrium/yii2-user.git", + "reference": "a908ab3652668c6f2755052098dac09a8c6de6f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dektrium/yii2-user/zipball/a908ab3652668c6f2755052098dac09a8c6de6f4", + "reference": "a908ab3652668c6f2755052098dac09a8c6de6f4", + "shasum": "" + }, + "require": { + "yiisoft/yii2": "^2.0.0", + "yiisoft/yii2-authclient": "^2.1.0", + "yiisoft/yii2-bootstrap": "^2.0.0", + "yiisoft/yii2-swiftmailer": "^2.0.0" + }, + "require-dev": { + "codeception/specify": "^0.4.3", + "codeception/verify": "^0.3.1", + "yiisoft/yii2-codeception": "^2.0.0" + }, + "type": "yii2-extension", + "extra": { + "bootstrap": "dektrium\\user\\Bootstrap", + "branch-alias": { + "dev-master": "0.9.x-dev", + "dev-develop": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "dektrium\\user\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dmitry Erofeev", + "email": "dmeroff@gmail.com", + "homepage": "http://dmeroff.ru" + } + ], + "description": "Flexible user registration and authentication module for Yii2", + "keywords": [ + "User management", + "dektrium", + "yii2", + "yii2-user" + ], + "time": "2016-09-22 15:04:36" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.8.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "time": "2016-07-16 12:58:58" + }, + { + "name": "kartik-v/yii2-krajee-base", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-krajee-base.git", + "reference": "52e623e54d06b853fda01a6529ccca93ed2a7f66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/52e623e54d06b853fda01a6529ccca93ed2a7f66", + "reference": "52e623e54d06b853fda01a6529ccca93ed2a7f66", + "shasum": "" + }, + "require": { + "yiisoft/yii2-bootstrap": "@dev" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "kartik\\base\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Base library and foundation components for all Yii2 Krajee extensions.", + "homepage": "https://github.com/kartik-v/yii2-krajee-base", + "keywords": [ + "base", + "extension", + "foundation", + "krajee", + "widget", + "yii2" + ], + "time": "2016-11-26 09:53:44" + }, + { + "name": "kartik-v/yii2-widget-select2", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/kartik-v/yii2-widget-select2.git", + "reference": "7deb625a37f7f13a77a697a8367e2e44e2462d7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kartik-v/yii2-widget-select2/zipball/7deb625a37f7f13a77a697a8367e2e44e2462d7e", + "reference": "7deb625a37f7f13a77a697a8367e2e44e2462d7e", + "shasum": "" + }, + "require": { + "kartik-v/yii2-krajee-base": "~1.7" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "kartik\\select2\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kartik Visweswaran", + "email": "kartikv2@gmail.com", + "homepage": "http://www.krajee.com/" + } + ], + "description": "Enhanced Yii2 wrapper for the Select2 jQuery plugin (sub repo split from yii2-widgets).", + "homepage": "https://github.com/kartik-v/yii2-widget-select2", + "keywords": [ + "dropdown", + "extension", + "form", + "jquery", + "plugin", + "select2", + "widget", + "yii2" + ], + "time": "2016-11-17 09:07:14" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "a6d30977565081bc9b177b627bff2e2ba905224c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/a6d30977565081bc9b177b627bff2e2ba905224c", + "reference": "a6d30977565081bc9b177b627bff2e2ba905224c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2016-10-09 11:45:02" + }, + { + "name": "yiisoft/yii2", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-framework.git", + "reference": "f05cec0516032d8e01073b605a38630b68fd6c09" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/f05cec0516032d8e01073b605a38630b68fd6c09", + "reference": "f05cec0516032d8e01073b605a38630b68fd6c09", + "shasum": "" + }, + "require": { + "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", + "bower-asset/jquery.inputmask": "~3.2.2", + "bower-asset/punycode": "1.3.*", + "bower-asset/yii2-pjax": "~2.0.1", + "cebe/markdown": "~1.0.0 | ~1.1.0", + "ext-ctype": "*", + "ext-mbstring": "*", + "ezyang/htmlpurifier": "~4.6", + "lib-pcre": "*", + "php": ">=5.4.0", + "yiisoft/yii2-composer": "~2.0.4" + }, + "bin": [ + "yii" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com", + "homepage": "http://www.yiiframework.com/", + "role": "Founder and project lead" + }, + { + "name": "Alexander Makarov", + "email": "sam@rmcreative.ru", + "homepage": "http://rmcreative.ru/", + "role": "Core framework development" + }, + { + "name": "Maurizio Domba", + "homepage": "http://mdomba.info/", + "role": "Core framework development" + }, + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc", + "homepage": "http://cebe.cc/", + "role": "Core framework development" + }, + { + "name": "Timur Ruziev", + "email": "resurtm@gmail.com", + "homepage": "http://resurtm.com/", + "role": "Core framework development" + }, + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com", + "role": "Core framework development" + }, + { + "name": "Dmitry Naumenko", + "email": "d.naumenko.a@gmail.com", + "role": "Core framework development" + } + ], + "description": "Yii PHP Framework Version 2", + "homepage": "http://www.yiiframework.com/", + "keywords": [ + "framework", + "yii2" + ], + "time": "2016-11-03 10:45:53" + }, + { + "name": "yiisoft/yii2-authclient", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-authclient.git", + "reference": "5ed7ebfda270d87197f7640b2a9c046297080cac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-authclient/zipball/5ed7ebfda270d87197f7640b2a9c046297080cac", + "reference": "5ed7ebfda270d87197f7640b2a9c046297080cac", + "shasum": "" + }, + "require": { + "yiisoft/yii2-httpclient": "~2.0.1" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\authclient\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com" + } + ], + "description": "External authentication via OAuth and OpenID for the Yii framework", + "keywords": [ + "OpenId", + "api", + "auth", + "oauth", + "yii2" + ], + "time": "2016-08-29 09:21:09" + }, + { + "name": "yiisoft/yii2-bootstrap", + "version": "2.1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-bootstrap.git", + "reference": "c048258180f6e8ac1149957585a2cddcf124d4c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/c048258180f6e8ac1149957585a2cddcf124d4c0", + "reference": "c048258180f6e8ac1149957585a2cddcf124d4c0", + "shasum": "" + }, + "require": { + "bower-asset/bootstrap": "~4.0.0@alpha", + "bower-asset/tether": "1.2.*", + "yiisoft/yii2": ">=2.0.6" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + }, + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" + } + }, + "autoload": { + "psr-4": { + "yii\\bootstrap\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The Twitter Bootstrap extension for the Yii framework", + "keywords": [ + "bootstrap", + "yii2" + ], + "time": "2016-08-09 21:17:28" + }, + { + "name": "yiisoft/yii2-composer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-composer.git", + "reference": "e882cc327a6935a41f2e8665b9ef0317f6852d4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/e882cc327a6935a41f2e8665b9ef0317f6852d4d", + "reference": "e882cc327a6935a41f2e8665b9ef0317f6852d4d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "yii\\composer\\Plugin", + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\composer\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The composer plugin for Yii extension installer", + "keywords": [ + "composer", + "extension installer", + "yii2" + ], + "time": "2016-06-05 20:34:32" + }, + { + "name": "yiisoft/yii2-httpclient", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-httpclient.git", + "reference": "a8b8e1895fbc6f40a7ff87adcc9801aee4437361" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-httpclient/zipball/a8b8e1895fbc6f40a7ff87adcc9801aee4437361", + "reference": "a8b8e1895fbc6f40a7ff87adcc9801aee4437361", + "shasum": "" + }, + "require": { + "yiisoft/yii2": "~2.0.0" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\httpclient\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com" + } + ], + "description": "HTTP client extension for the Yii framework", + "keywords": [ + "curl", + "http", + "httpclient", + "yii2" + ], + "time": "2016-10-31 11:29:28" + }, + { + "name": "yiisoft/yii2-swiftmailer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-swiftmailer.git", + "reference": "8e3e92f032e7400c2593fe26e1832c4d0a832b65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/8e3e92f032e7400c2593fe26e1832c4d0a832b65", + "reference": "8e3e92f032e7400c2593fe26e1832c4d0a832b65", + "shasum": "" + }, + "require": { + "swiftmailer/swiftmailer": "~5.0", + "yiisoft/yii2": "~2.0.4" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\swiftmailer\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com" + } + ], + "description": "The SwiftMailer integration for the Yii framework", + "keywords": [ + "email", + "mail", + "mailer", + "swift", + "swiftmailer", + "yii2" + ], + "time": "2016-09-09 11:48:36" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/lib/User/Bootstrap.php b/lib/User/Bootstrap.php new file mode 100644 index 0000000..286186a --- /dev/null +++ b/lib/User/Bootstrap.php @@ -0,0 +1,43 @@ + + */ +class Bootstrap implements BootstrapInterface +{ + public function bootstrap($app) + { + if($app->hasModule('user') && $app->getModule('user') instanceof Module) { + + // configure yii's container + $this->setContainer(); + } + } + + protected function setContainer() + { + // helpers + Yii::$container->set(AuthHelper::class); + + // active query classes + Yii::$container->set(AccountQuery::class); + Yii::$container->set(ProfileQuery::class); + Yii::$container->set(TokenQuery::class); + Yii::$container->set(UserQuery::class); + } +} diff --git a/lib/User/Helper/AuthHelper.php b/lib/User/Helper/AuthHelper.php new file mode 100644 index 0000000..0506329 --- /dev/null +++ b/lib/User/Helper/AuthHelper.php @@ -0,0 +1,33 @@ + + */ +class AuthHelper +{ + /** + * Checks whether + * + * @param $role + * + * @return bool + */ + public function hasRole($userId, $role) + { + if (Yii::$app->authManager) { + $roles = array_keys(Yii::$app->authManager->getRolesByUser($userId)); + + return in_array($role, $roles, true); + } + + return false; + } +} diff --git a/lib/User/Model/User.php b/lib/User/Model/User.php new file mode 100644 index 0000000..7bd889d --- /dev/null +++ b/lib/User/Model/User.php @@ -0,0 +1,53 @@ +blocked_at !== null; + } + + public function getIsAdmin() + { + + } + + public function hasRole($role) + { + + } +} diff --git a/lib/User/Module.php b/lib/User/Module.php new file mode 100644 index 0000000..c711f98 --- /dev/null +++ b/lib/User/Module.php @@ -0,0 +1,50 @@ + + */ +class Module extends \yii\base\Module +{ + public $token + /** + * @var int the time before a recovery token is invalid. Defaults to 6 hours. + */ + public $tokenRecoveryWithin = 21600; + /** + * @var array a list of admin usernames + */ + public $administrators = []; + /** + * @var string the administrator permission name + */ + public $administratorPermissionName; + /** + * @var array the class map used by the module. + * + * @see Bootstrap + */ + public $classmap = []; + /** + * @var string the route prefix + */ + public $prefix = 'user'; + + /** + * @var array the url rules (routes) + */ + public $routes = [ + '' => 'profile/show', + '' => 'security/', + '' => 'registration/', + 'confirm//' => 'registration/confirm', + 'forgot' => 'recovery/request', + 'recover//' => 'recovery/reset', + 'settings/' => 'settings/' + ]; +} diff --git a/lib/User/Query/AccountQuery.php b/lib/User/Query/AccountQuery.php new file mode 100644 index 0000000..130c105 --- /dev/null +++ b/lib/User/Query/AccountQuery.php @@ -0,0 +1,15 @@ + + */ +class AccountQuery +{ + +} diff --git a/lib/User/Query/ProfileQuery.php b/lib/User/Query/ProfileQuery.php new file mode 100644 index 0000000..4755055 --- /dev/null +++ b/lib/User/Query/ProfileQuery.php @@ -0,0 +1,15 @@ + + */ +class ProfileQuery +{ + +} diff --git a/lib/User/Query/TokenQuery.php b/lib/User/Query/TokenQuery.php new file mode 100644 index 0000000..54b2ac8 --- /dev/null +++ b/lib/User/Query/TokenQuery.php @@ -0,0 +1,15 @@ + + */ +class TokenQuery +{ + +} diff --git a/lib/User/Query/UserQuery.php b/lib/User/Query/UserQuery.php new file mode 100644 index 0000000..e21015b --- /dev/null +++ b/lib/User/Query/UserQuery.php @@ -0,0 +1,15 @@ + + */ +class UserQuery +{ + +}