Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch prefixes away from method prefixes to namespace prefixes. This has two benefits. One it keeps classes smaller, and more focused. Two prefix actions involved a lot of hackery that is now gone. * Update tests throughout the Routing package for the change. * Add tests for plugin + app prefix dispatching. * Fix a number of issues with generated route names that were disguised by the old prefix system.
- Loading branch information
Showing
10 changed files
with
288 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
lib/Cake/Test/TestApp/Controller/Admin/PostsController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* | ||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* @link http://cakephp.org CakePHP(tm) Project | ||
* @since CakePHP(tm) v 3.0.0 | ||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | ||
*/ | ||
namespace TestApp\Controller\Admin; | ||
|
||
use Cake\Controller\Controller; | ||
|
||
/** | ||
* Posts Controller class. | ||
* | ||
* For testing prefix routing. | ||
*/ | ||
class PostsController extends Controller { | ||
/** | ||
* components | ||
* | ||
* @var array | ||
*/ | ||
public $components = array(); | ||
|
||
/** | ||
* components | ||
* | ||
* @var array | ||
*/ | ||
public $uses = array(); | ||
|
||
/** | ||
* index action | ||
* | ||
* @return void | ||
*/ | ||
public function index() { | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
lib/Cake/Test/TestApp/Plugin/TestPlugin/Controller/Admin/CommentsController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* | ||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* @link http://cakephp.org CakePHP(tm) Project | ||
* @since CakePHP(tm) v 3.0.0 | ||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | ||
*/ | ||
namespace TestApp\Controller\Admin; | ||
|
||
use Cake\Controller\Controller; | ||
|
||
/** | ||
* Comments Controller class. | ||
* | ||
* For testing prefix routing. | ||
*/ | ||
class CommentsController extends Controller { | ||
/** | ||
* components | ||
* | ||
* @var array | ||
*/ | ||
public $components = array(); | ||
|
||
/** | ||
* components | ||
* | ||
* @var array | ||
*/ | ||
public $uses = array(); | ||
|
||
/** | ||
* index action | ||
* | ||
* @return void | ||
*/ | ||
public function index() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.