mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Added back the @package and @subpackage headers to /app and /config files.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@239 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
3f10d747b7
commit
f2f3d56e36
12 changed files with 86 additions and 30 deletions
|
@ -13,7 +13,10 @@
|
|||
* application-wide controller-related methods here.
|
||||
*
|
||||
* Add your application-wide methods in the class below, your controllers
|
||||
* will be inheriting them.
|
||||
* will inherit them.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
|
||||
class AppController extends Controller {
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
* application-wide model-related methods here.
|
||||
*
|
||||
* Add your application-wide methods in the class below, your models
|
||||
* will be inheriting them.
|
||||
* will inherit them.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
|
||||
class AppModel extends Model {
|
||||
|
|
|
@ -12,6 +12,9 @@ class PagesController extends PagesHelper {
|
|||
|
||||
/**
|
||||
* Displays a view
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
function display () {
|
||||
|
||||
|
|
|
@ -10,32 +10,38 @@
|
|||
|
||||
|
||||
/**
|
||||
* Description:
|
||||
*
|
||||
* The includes below are required for the TestsController to work.
|
||||
*/
|
||||
uses('test', 'folder', 'inflector');
|
||||
|
||||
class TestsController extends TestsHelper {
|
||||
|
||||
/**
|
||||
* Runs all library and application tests
|
||||
* Runs all library and application tests
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
function test_all () {
|
||||
|
||||
function test_all ()
|
||||
{
|
||||
$this->layout = 'test';
|
||||
|
||||
$tests_folder = new Folder('../tests');
|
||||
|
||||
$results = array();
|
||||
$total_errors = 0;
|
||||
foreach ($tests_folder->findRecursive('.*\.php') as $test) {
|
||||
if (preg_match('/^(.+)\.php/i', basename($test), $r)) {
|
||||
foreach ($tests_folder->findRecursive('.*\.php') as $test)
|
||||
{
|
||||
if (preg_match('/^(.+)\.php/i', basename($test), $r))
|
||||
{
|
||||
require_once($test);
|
||||
$test_name = Inflector::Camelize($r[1]);
|
||||
if (preg_match('/^(.+)Test$/i', $test_name, $r)) {
|
||||
if (preg_match('/^(.+)Test$/i', $test_name, $r))
|
||||
{
|
||||
$module_name = $r[1];
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
$module_name = $test_name;
|
||||
}
|
||||
$suite = new TestSuite($test_name);
|
||||
|
@ -43,7 +49,8 @@ class TestsController extends TestsHelper {
|
|||
|
||||
$total_errors += $result['errors'];
|
||||
|
||||
$results[] = array(
|
||||
$results[] = array
|
||||
(
|
||||
'name'=>$module_name,
|
||||
'result'=>$result,
|
||||
);
|
||||
|
@ -53,7 +60,6 @@ class TestsController extends TestsHelper {
|
|||
$this->set('success', !$total_errors);
|
||||
$this->set('results', $results);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
// + Licensed under The MIT License + //
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class PagesHelper extends AppController {
|
||||
/**
|
||||
* In this file you can extend the PagesController.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
|
||||
class PagesHelper extends AppController
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
|
@ -8,7 +8,15 @@
|
|||
// + Licensed under The MIT License + //
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class TestsHelper extends AppController {
|
||||
/**
|
||||
* In this file you can extend the TestsController.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
|
||||
class TestsHelper extends AppController
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
|
@ -11,6 +11,9 @@
|
|||
/**
|
||||
* This is core configuration file. Use it to configure core behaviour of
|
||||
* Cake.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
/**
|
||||
* In this file you set up your database connection details.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
/**
|
||||
* In this file you set paths to different directories used by Cake.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -45,19 +48,19 @@ define ('HELPERS', APP.'helpers'.DS);
|
|||
/**
|
||||
* Path to the application's views directory.
|
||||
*/
|
||||
define ('VIEWS', APP.'views'.DS);
|
||||
define ('VIEWS', APP.'views'.DS);
|
||||
|
||||
/**
|
||||
* Path to the application's view's layouts directory.
|
||||
*/
|
||||
define ('LAYOUTS', APP.'views'.DS.'layouts'.DS);
|
||||
define ('LAYOUTS', APP.'views'.DS.'layouts'.DS);
|
||||
|
||||
/**
|
||||
* Path to the application's view's elements directory.
|
||||
* It's supposed to hold pieces of PHP/HTML that are used on multiple pages
|
||||
* and are not linked to a particular layout (like polls, footers and so on).
|
||||
*/
|
||||
define ('ELEMENTS', APP.'views'.DS.'elements'.DS);
|
||||
define ('ELEMENTS', APP.'views'.DS.'elements'.DS);
|
||||
|
||||
/**
|
||||
* Path to the configuration files directory.
|
||||
|
@ -67,12 +70,12 @@ define ('CONFIGS', ROOT.'config'.DS);
|
|||
/**
|
||||
* Path to the libs directory.
|
||||
*/
|
||||
define ('LIBS', ROOT.'libs'.DS);
|
||||
define ('LIBS', ROOT.'libs'.DS);
|
||||
|
||||
/**
|
||||
* Path to the logs directory.
|
||||
*/
|
||||
define ('LOGS', ROOT.'logs'.DS);
|
||||
define ('LOGS', ROOT.'logs'.DS);
|
||||
|
||||
/**
|
||||
* Path to the modules directory.
|
||||
|
@ -82,17 +85,12 @@ define ('MODULES', ROOT.'modules'.DS);
|
|||
/**
|
||||
* Path to the public directory.
|
||||
*/
|
||||
define ('PUBLIC', ROOT.'public'.DS);
|
||||
define ('PUBLIC', ROOT.'public'.DS);
|
||||
|
||||
/**
|
||||
* Path to the tests directory.
|
||||
*/
|
||||
define ('TESTS', ROOT.'tests'.DS);
|
||||
|
||||
/**
|
||||
* Path to the vendors directory.
|
||||
*/
|
||||
define ('VENDORS', ROOT.'vendors'.DS);
|
||||
define ('TESTS', ROOT.'tests'.DS);
|
||||
|
||||
/**
|
||||
* Path to the controller test directory.
|
||||
|
@ -102,16 +100,28 @@ define ('CONTROLLER_TESTS',TESTS.'app'.DS.'controllers'.DS);
|
|||
/**
|
||||
* Path to the helpers test directory.
|
||||
*/
|
||||
define ('HELPER_TESTS', TESTS.'app'.DS.'helpers'.DS);
|
||||
define ('HELPER_TESTS', TESTS.'app'.DS.'helpers'.DS);
|
||||
|
||||
/**
|
||||
* Path to the models' test directory.
|
||||
*/
|
||||
define ('MODEL_TESTS', TESTS.'app'.DS.'models'.DS);
|
||||
define ('MODEL_TESTS', TESTS.'app'.DS.'models'.DS);
|
||||
|
||||
/**
|
||||
* Path to the lib test directory.
|
||||
*/
|
||||
define ('LIB_TESTS', TESTS.'libs'.DS);
|
||||
define ('LIB_TESTS', TESTS.'libs'.DS);
|
||||
|
||||
/**
|
||||
* Path to the vendors directory.
|
||||
*/
|
||||
define ('VENDORS', ROOT.'vendors'.DS);
|
||||
|
||||
/**
|
||||
* Path to the Pear directory
|
||||
* The purporse is to make it easy porting Pear libs into Cake
|
||||
* without setting the include_path PHP variable.
|
||||
*/
|
||||
define ('PEAR', VENDORS.'Pear'.DS);
|
||||
|
||||
?>
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
* In this file, you set up routes to your controllers and their actions.
|
||||
* Routes are very important mechanism that allows you to freely connect
|
||||
* different urls to chosen controllers and their actions (functions).
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
* In this file, you set up routes to your controllers and their actions.
|
||||
* Routes are very important mechanism that allows you to freely connect
|
||||
* different urls to chosen controllers and their actions (functions).
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
/**
|
||||
* In this file, you can set up 'templates' for every tag generated by the tag
|
||||
* generator.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.config
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue