diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..71e9844 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: php +php: + - 5.3 + +script: + - php code-checker/src/code-checker.php + +before_script: + - travis_retry composer create-project nette/code-checker code-checker ~2.5 --no-interaction + +sudo: false + +cache: + directories: + - $HOME/.composer/cache diff --git a/CD-collection/app/bootstrap.php b/CD-collection/app/bootstrap.php index f2e9527..9565943 100644 --- a/CD-collection/app/bootstrap.php +++ b/CD-collection/app/bootstrap.php @@ -1,7 +1,7 @@ setDebugMode(TRUE); $configurator->enableDebugger(__DIR__ . '/../log'); // Enable RobotLoader - this will load all classes automatically diff --git a/CD-collection/app/config.neon b/CD-collection/app/config.neon index e1db780..4320380 100644 --- a/CD-collection/app/config.neon +++ b/CD-collection/app/config.neon @@ -1,6 +1,6 @@ # # SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! -# http://nette.org/security-warning +# https://nette.org/security-warning # php: date.timezone: Europe/Prague @@ -10,8 +10,8 @@ nette: mapping: *: App\*Module\Presenters\*Presenter - database: - dsn: "sqlite:%appDir%/model/demo.db3" +database: + dsn: "sqlite:%appDir%/model/demo.db3" services: - App\Model\Authenticator diff --git a/CD-collection/app/model/Authenticator.php b/CD-collection/app/model/Authenticator.php index 7a7c994..b332696 100644 --- a/CD-collection/app/model/Authenticator.php +++ b/CD-collection/app/model/Authenticator.php @@ -2,8 +2,8 @@ namespace App\Model; -use Nette, - Nette\Security; +use Nette; +use Nette\Security; /** diff --git a/CD-collection/app/presenters/DashboardPresenter.php b/CD-collection/app/presenters/DashboardPresenter.php index b8afdb4..b79e987 100644 --- a/CD-collection/app/presenters/DashboardPresenter.php +++ b/CD-collection/app/presenters/DashboardPresenter.php @@ -2,9 +2,9 @@ namespace App\Presenters; -use App\Model, - Nette, - Nette\Application\UI\Form; +use App\Model; +use Nette; +use Nette\Application\UI\Form; class DashboardPresenter extends Nette\Application\UI\Presenter @@ -23,8 +23,8 @@ protected function startup() { parent::startup(); - if (!$this->user->isLoggedIn()) { - if ($this->user->logoutReason === Nette\Security\IUserStorage::INACTIVITY) { + if (!$this->getUser()->isLoggedIn()) { + if ($this->getUser()->getLogoutReason() === Nette\Security\IUserStorage::INACTIVITY) { $this->flashMessage('You have been signed out due to inactivity. Please sign in again.'); } $this->redirect('Sign:in', array('backlink' => $this->storeRequest())); @@ -93,11 +93,11 @@ protected function createComponentAlbumForm() $form->addSubmit('save', 'Save') ->setAttribute('class', 'default') - ->onClick[] = $this->albumFormSucceeded; + ->onClick[] = array($this, 'albumFormSucceeded'); $form->addSubmit('cancel', 'Cancel') - ->setValidationScope(NULL) - ->onClick[] = $this->formCancelled; + ->setValidationScope(array()) + ->onClick[] = array($this, 'formCancelled'); $form->addProtection(); return $form; @@ -127,11 +127,11 @@ protected function createComponentDeleteForm() { $form = new Form; $form->addSubmit('cancel', 'Cancel') - ->onClick[] = $this->formCancelled; + ->onClick[] = array($this, 'formCancelled'); $form->addSubmit('delete', 'Delete') ->setAttribute('class', 'default') - ->onClick[] = $this->deleteFormSucceeded; + ->onClick[] = array($this, 'deleteFormSucceeded'); $form->addProtection(); return $form; diff --git a/CD-collection/app/presenters/SignPresenter.php b/CD-collection/app/presenters/SignPresenter.php index 2eac2de..10d2a21 100644 --- a/CD-collection/app/presenters/SignPresenter.php +++ b/CD-collection/app/presenters/SignPresenter.php @@ -2,8 +2,8 @@ namespace App\Presenters; -use Nette, - Nette\Application\UI; +use Nette; +use Nette\Application\UI; class SignPresenter extends Nette\Application\UI\Presenter @@ -27,7 +27,7 @@ protected function createComponentSignInForm() $form->addSubmit('send', 'Sign in'); - $form->onSuccess[] = $this->signInFormSucceeded; + $form->onSuccess[] = array($this, 'signInFormSucceeded'); return $form; } diff --git a/CD-collection/app/templates/@layout.latte b/CD-collection/app/presenters/templates/@layout.latte similarity index 91% rename from CD-collection/app/templates/@layout.latte rename to CD-collection/app/presenters/templates/@layout.latte index d6baf03..5162179 100644 --- a/CD-collection/app/templates/@layout.latte +++ b/CD-collection/app/presenters/templates/@layout.latte @@ -27,6 +27,6 @@

Signed in as {$user->identity->realname}. Sign out

- +

AltStyle によって変換されたページ (->オリジナル) /

diff --git a/CD-collection/app/templates/Dashboard/add.latte b/CD-collection/app/presenters/templates/Dashboard/add.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/add.latte rename to CD-collection/app/presenters/templates/Dashboard/add.latte diff --git a/CD-collection/app/templates/Dashboard/default.latte b/CD-collection/app/presenters/templates/Dashboard/default.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/default.latte rename to CD-collection/app/presenters/templates/Dashboard/default.latte diff --git a/CD-collection/app/templates/Dashboard/delete.latte b/CD-collection/app/presenters/templates/Dashboard/delete.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/delete.latte rename to CD-collection/app/presenters/templates/Dashboard/delete.latte diff --git a/CD-collection/app/templates/Dashboard/edit.latte b/CD-collection/app/presenters/templates/Dashboard/edit.latte similarity index 100% rename from CD-collection/app/templates/Dashboard/edit.latte rename to CD-collection/app/presenters/templates/Dashboard/edit.latte diff --git a/CD-collection/app/templates/Sign/in.latte b/CD-collection/app/presenters/templates/Sign/in.latte similarity index 100% rename from CD-collection/app/templates/Sign/in.latte rename to CD-collection/app/presenters/templates/Sign/in.latte diff --git a/CD-collection/composer.json b/CD-collection/composer.json index 66a939f..2c3aa8b 100644 --- a/CD-collection/composer.json +++ b/CD-collection/composer.json @@ -1,21 +1,20 @@ { "name": "nette-examples/cd-collection", - "type": "nette-example", + "type": "project", "description": "Classic Zend Framework Tutorial from Akrabat rewritten for Nette Framework.", "license": "BSD-3-Clause", "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { "php": ">=5.3.7", - "nette/nette": "dev-master" - }, - "minimum-stability": "dev" + "nette/nette": "~2.2.0" + } } diff --git a/CD-collection/readme.md b/CD-collection/readme.md index 02ca26c..517d836 100644 --- a/CD-collection/readme.md +++ b/CD-collection/readme.md @@ -10,7 +10,7 @@ responsibility of the router and can be changed anytime. The target of a link is always a combination "Presenter:action" or "Presenter:signal!". -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -24,7 +24,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Fifteen/app/bootstrap.php b/Fifteen/app/bootstrap.php index e074640..f7134a5 100644 --- a/Fifteen/app/bootstrap.php +++ b/Fifteen/app/bootstrap.php @@ -12,7 +12,6 @@ $configurator = new Nette\Configurator; // Enable Nette Debugger for error visualisation & logging -//$configurator->setDebugMode(TRUE); $configurator->enableDebugger(__DIR__ . '/../log'); // Enable RobotLoader - this will load all classes automatically diff --git a/Fifteen/app/components/FifteenControl.php b/Fifteen/app/components/FifteenControl.php index 25a010d..77fddfc 100644 --- a/Fifteen/app/components/FifteenControl.php +++ b/Fifteen/app/components/FifteenControl.php @@ -10,10 +10,10 @@ class FifteenControl extends UI\Control /** @var int */ public $width = 4; - /** @var array of function ($sender) */ + /** @var callable[] function ($sender) */ public $onAfterClick; - /** @var array of function ($sender, $round) */ + /** @var callable[] function ($sender, $round) */ public $onGameOver; /** @persistent array */ diff --git a/Fifteen/app/presenters/DefaultPresenter.php b/Fifteen/app/presenters/DefaultPresenter.php index f1d451f..ddf23a1 100644 --- a/Fifteen/app/presenters/DefaultPresenter.php +++ b/Fifteen/app/presenters/DefaultPresenter.php @@ -18,7 +18,7 @@ public function renderDefault() protected function createComponentFifteen() { $fifteen = new FifteenControl; - $fifteen->onGameOver[] = $this->gameOver; + $fifteen->onGameOver[] = array($this, 'gameOver'); $fifteen->redrawControl(); return $fifteen; } diff --git a/Fifteen/app/templates/Default.default.latte b/Fifteen/app/presenters/templates/Default.default.latte similarity index 84% rename from Fifteen/app/templates/Default.default.latte rename to Fifteen/app/presenters/templates/Default.default.latte index a4d84d8..6dadfd2 100644 --- a/Fifteen/app/templates/Default.default.latte +++ b/Fifteen/app/presenters/templates/Default.default.latte @@ -15,7 +15,7 @@ {control fifteen} - + diff --git a/Fifteen/composer.json b/Fifteen/composer.json index b337f5c..60d1beb 100644 --- a/Fifteen/composer.json +++ b/Fifteen/composer.json @@ -1,21 +1,20 @@ { "name": "nette-examples/cd-collection", - "type": "nette-example", + "type": "project", "description": "A simple example showing components as the reusable stand-alone units.", "license": "BSD-3-Clause", "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { "php": ">=5.3.0", - "nette/nette": "dev-master" - }, - "minimum-stability": "dev" + "nette/nette": "~2.2.0" + } } diff --git a/Fifteen/readme.md b/Fifteen/readme.md index cecee74..aaccafc 100644 --- a/Fifteen/readme.md +++ b/Fifteen/readme.md @@ -7,7 +7,7 @@ will be working stand-alone. The communication between components and presenter is arranged by events (event-driven model). -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -21,7 +21,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Fifteen/www/css/style.css b/Fifteen/www/css/style.css index e62798e..4fc565f 100644 --- a/Fifteen/www/css/style.css +++ b/Fifteen/www/css/style.css @@ -13,7 +13,7 @@ body { h1 { font-size: 1.9em; margin: .5em 0 1.5em; - background: url(http://files.nette.org/icons/logo-e1.png) right center no-repeat; + background: url(https://files.nette.org/icons/logo-e1.png) right center no-repeat; color: #7A7772; text-shadow: 1px 1px 0 white; } diff --git a/Fifteen/www/js/jquery.nette.js b/Fifteen/www/js/jquery.nette.js index bc6a0a8..7d3d4cd 100644 --- a/Fifteen/www/js/jquery.nette.js +++ b/Fifteen/www/js/jquery.nette.js @@ -4,7 +4,7 @@ * @copyright Copyright (c) 2009, 2010 Jan Marek * @copyright Copyright (c) 2009, 2010 David Grudl * @license MIT - * @link http://nette.org/cs/extras/jquery-ajax + * @link https://addons.nette.org/honza-marek/jquery-ajax */ /* @@ -85,7 +85,7 @@ jQuery(function($) { $.nette.createSpinner(); // apply AJAX unobtrusive way - $('a.ajax').live('click', function(event) { + $('body').on('click', 'a.ajax', function(event) { event.preventDefault(); if ($.active) return; diff --git a/Micro-blog/composer.json b/Micro-blog/composer.json index 30e9ae1..563097d 100644 --- a/Micro-blog/composer.json +++ b/Micro-blog/composer.json @@ -1,23 +1,22 @@ { "name": "nette-examples/micro-blog", - "type": "nette-example", + "type": "project", "description": "A simple example showing how to use Nette Framework as a micro-framework.", "license": "BSD-3-Clause", "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { "php": ">=5.3.0", - "nette/nette": "dev-master" + "nette/nette": "~2.2.0" }, - "minimum-stability": "dev", "config": { "vendor-dir": "www/data/vendor" } diff --git a/Micro-blog/readme.md b/Micro-blog/readme.md index ba06668..b787a14 100644 --- a/Micro-blog/readme.md +++ b/Micro-blog/readme.md @@ -1,10 +1,10 @@ Micro-blog (Nette Framework example) ------------------------------------ -A simple example showing how to use [Nette Framework](http://nette.org) as a micro-framework. +A simple example showing how to use [Nette Framework](https://nette.org) as a micro-framework. -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -18,7 +18,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Micro-blog/www/config.neon b/Micro-blog/www/config.neon index 78460c7..efcdc3a 100644 --- a/Micro-blog/www/config.neon +++ b/Micro-blog/www/config.neon @@ -1,11 +1,10 @@ # # SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! -# http://nette.org/security-warning +# https://nette.org/security-warning # php: date.timezone: Europe/Prague -nette: - database: - dsn: 'sqlite:%appDir%/data/blog.db3' - reflection: conventional +database: + dsn: 'sqlite:%appDir%/data/blog.db3' + reflection: conventional diff --git a/Micro-blog/www/data/TemplateRouter.php b/Micro-blog/www/data/TemplateRouter.php index cf6f2ed..566a390 100644 --- a/Micro-blog/www/data/TemplateRouter.php +++ b/Micro-blog/www/data/TemplateRouter.php @@ -19,12 +19,12 @@ public function __construct($path, $cachePath) } foreach ($routes as $mask => $file) { - $this[] = new Routers\Route($mask, function($presenter) use ($file, $cachePath) { - return $presenter->createTemplate(NULL, function() use ($cachePath) { + $this[] = new Routers\Route($mask, function ($presenter) use ($file, $cachePath) { + return $presenter->createTemplate(NULL, function () use ($cachePath) { $latte = new Latte\Engine; $latte->setTempDirectory($cachePath . '/cache'); $macroSet = new Latte\Macros\MacroSet($latte->getCompiler()); - $macroSet->addMacro('url', function(){}); // ignore + $macroSet->addMacro('url', function () {}); // ignore return $latte; })->setFile($file); }); @@ -37,7 +37,7 @@ public function scanRoutes($path) $routes = array(); $latte = new Latte\Engine; $macroSet = new Latte\Macros\MacroSet($latte->getCompiler()); - $macroSet->addMacro('url', function($node) use (&$routes, &$file) { + $macroSet->addMacro('url', function ($node) use (&$routes, &$file) { $routes[$node->args] = (string) $file; }); foreach (Nette\Utils\Finder::findFiles('*.latte')->from($path) as $file) { diff --git a/Micro-blog/www/data/templates/@layout.latte b/Micro-blog/www/data/templates/@layout.latte index 1092eea..ef116da 100644 --- a/Micro-blog/www/data/templates/@layout.latte +++ b/Micro-blog/www/data/templates/@layout.latte @@ -11,6 +11,6 @@ {include content} -

This is a Nette Framework example.

+

This is a Nette Framework example.

diff --git a/Modules-Usage/app/AdminModule/templates/@layout.latte b/Modules-Usage/app/AdminModule/presenters/templates/@layout.latte similarity index 100% rename from Modules-Usage/app/AdminModule/templates/@layout.latte rename to Modules-Usage/app/AdminModule/presenters/templates/@layout.latte diff --git a/Modules-Usage/app/AdminModule/templates/Default.default.latte b/Modules-Usage/app/AdminModule/presenters/templates/Default.default.latte similarity index 100% rename from Modules-Usage/app/AdminModule/templates/Default.default.latte rename to Modules-Usage/app/AdminModule/presenters/templates/Default.default.latte diff --git a/Modules-Usage/app/FrontModule/ExportModule/templates/Default.xml.latte b/Modules-Usage/app/FrontModule/ExportModule/presenters/templates/Default.xml.latte similarity index 100% rename from Modules-Usage/app/FrontModule/ExportModule/templates/Default.xml.latte rename to Modules-Usage/app/FrontModule/ExportModule/presenters/templates/Default.xml.latte diff --git a/Modules-Usage/app/FrontModule/templates/@layout.latte b/Modules-Usage/app/FrontModule/presenters/templates/@layout.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/@layout.latte rename to Modules-Usage/app/FrontModule/presenters/templates/@layout.latte diff --git a/Modules-Usage/app/FrontModule/templates/CatalogList/default.latte b/Modules-Usage/app/FrontModule/presenters/templates/CatalogList/default.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/CatalogList/default.latte rename to Modules-Usage/app/FrontModule/presenters/templates/CatalogList/default.latte diff --git a/Modules-Usage/app/FrontModule/templates/Default/addItem.latte b/Modules-Usage/app/FrontModule/presenters/templates/Default/addItem.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/Default/addItem.latte rename to Modules-Usage/app/FrontModule/presenters/templates/Default/addItem.latte diff --git a/Modules-Usage/app/FrontModule/templates/Default/default.latte b/Modules-Usage/app/FrontModule/presenters/templates/Default/default.latte similarity index 100% rename from Modules-Usage/app/FrontModule/templates/Default/default.latte rename to Modules-Usage/app/FrontModule/presenters/templates/Default/default.latte diff --git a/Modules-Usage/app/bootstrap.php b/Modules-Usage/app/bootstrap.php index 9e24ee1..f8a05a2 100644 --- a/Modules-Usage/app/bootstrap.php +++ b/Modules-Usage/app/bootstrap.php @@ -1,8 +1,8 @@ setDebugMode(TRUE); $configurator->enableDebugger(__DIR__ . '/../log'); // Enable RobotLoader - this will load all classes automatically diff --git a/Modules-Usage/app/config.neon b/Modules-Usage/app/config.neon index d93b9a3..5d8797a 100644 --- a/Modules-Usage/app/config.neon +++ b/Modules-Usage/app/config.neon @@ -1,6 +1,6 @@ # # SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser! -# http://nette.org/security-warning +# https://nette.org/security-warning # php: date.timezone: Europe/Prague diff --git a/Modules-Usage/app/presenters/BasePresenter.php b/Modules-Usage/app/presenters/BasePresenter.php index dfe079c..5fc74b5 100644 --- a/Modules-Usage/app/presenters/BasePresenter.php +++ b/Modules-Usage/app/presenters/BasePresenter.php @@ -10,16 +10,16 @@ abstract class BasePresenter extends Nette\Application\UI\Presenter protected function beforeRender() { - $this->template->viewName = $this->view; + $this->template->viewName = $this->getView(); $this->template->root = isset($_SERVER['SCRIPT_FILENAME']) ? realpath(dirname(dirname($_SERVER['SCRIPT_FILENAME']))) : NULL; - $a = strrpos($this->name, ':'); + $a = strrpos($this->getName(), ':'); if ($a === FALSE) { $this->template->moduleName = ''; - $this->template->presenterName = $this->name; + $this->template->presenterName = $this->getName(); } else { - $this->template->moduleName = substr($this->name, 0, $a + 1); - $this->template->presenterName = substr($this->name, $a + 1); + $this->template->moduleName = substr($this->getName(), 0, $a + 1); + $this->template->presenterName = substr($this->getName(), $a + 1); } } diff --git a/Modules-Usage/composer.json b/Modules-Usage/composer.json index a7301d5..8552c37 100644 --- a/Modules-Usage/composer.json +++ b/Modules-Usage/composer.json @@ -1,21 +1,20 @@ { "name": "nette-examples/modules-usage", - "type": "nette-example", + "type": "project", "description": "The example demonstrates the usage of modules and submodules.", "license": "BSD-3-Clause", "authors": [ { "name": "David Grudl", - "homepage": "http://davidgrudl.com" + "homepage": "https://davidgrudl.com" }, { "name": "Nette Community", - "homepage": "http://nette.org/contributors" + "homepage": "https://nette.org/contributors" } ], "require": { "php": ">=5.3.0", - "nette/nette": "dev-master" - }, - "minimum-stability": "dev" + "nette/nette": "~2.2.0" + } } diff --git a/Modules-Usage/readme.md b/Modules-Usage/readme.md index 69a563b..1cd4230 100644 --- a/Modules-Usage/readme.md +++ b/Modules-Usage/readme.md @@ -1,12 +1,12 @@ Modules (Nette Framework example) --------------------------------- -The example demonstrates the usage of modules and submodules in [Nette Framework](http://nette.org). +The example demonstrates the usage of modules and submodules in [Nette Framework](https://nette.org). Presenters (and then templates) are separated on two main modules Front and Admin. Furthermore, the Front module contains the Export submodule. -What is [Nette Framework](http://nette.org)? +What is [Nette Framework](https://nette.org)? -------------------------------------------- Nette Framework is a popular tool for PHP web development. It is designed to be @@ -20,7 +20,7 @@ Installing ---------- The best way to install Nette Framework is to download latest package -from http://nette.org/download or using [Composer](http://doc.nette.org/composer): +from https://nette.org/download or using [Composer](https://doc.nette.org/composer): curl -s http://getcomposer.org/installer | php php composer.phar update diff --git a/Modules-Usage/www/css/site.css b/Modules-Usage/www/css/site.css index 0cb4f1f..a167c1e 100644 --- a/Modules-Usage/www/css/site.css +++ b/Modules-Usage/www/css/site.css @@ -13,7 +13,7 @@ body { h1 { font: 1.9em/1.5 sans-serif; margin: .5em 0 1.5em; - background: url(http://files.nette.org/icons/logo-e1.png) right center no-repeat; + background: url(https://files.nette.org/icons/logo-e1.png) right center no-repeat; color: #7A7772; text-shadow: 1px 1px 0 white; } diff --git a/license.md b/license.md index 68c9109..3fdd7c2 100644 --- a/license.md +++ b/license.md @@ -22,7 +22,7 @@ If your stuff is good, it will not take long to establish a reputation for yours New BSD License --------------- -Copyright (c) 2004, 2013 David Grudl (http://davidgrudl.com) +Copyright (c) 2004, 2013 David Grudl (https://davidgrudl.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification,