dereuromark 9 years ago
parent
commit
3cd86bee9e
5 changed files with 8 additions and 97 deletions
  1. 3 2
      README.md
  2. 0 42
      docs/Auth/Auth.md
  3. 0 45
      docs/Component/Flash.md
  4. 2 8
      docs/README.md
  5. 3 0
      tests/bootstrap.php

+ 3 - 2
README.md

@@ -27,9 +27,10 @@ This master branch only works for **CakePHP3.x** - please use the 2.x branch for
 ### Additional features
 - Passwordable behavior allows easy to use password functionality for frontend and backend.
 - Slugged, Reset and other behaviors
-- Tree helper for working with (complex) trees and their output.
 - Text, Time, Number libs and helpers etc provide extended functionality if desired.
-- AuthUser, Timeline, Typography, etc provide additional helper functionality.
+- Tree helper for working with (complex) trees and their output.
+- QrCode, Gravatar and other useful small helpers
+- Timeline, Typography, etc provide additional helper functionality.
 - Email as a wrapper for core's Email adding some more usefulness and making debugging/testing easier.
 
 ### Providing 2.x shims

+ 0 - 42
docs/Auth/Auth.md

@@ -1,42 +0,0 @@
-# Auth functionality
-
-The Tools plugin contains some convenience wrappers to work with Auth user data.
-They have a trait in common that keeps the functionality DRY.
-
-## AuthUser Component
-Attach it to your controllers in `initialize()` like so:
-```php
-$this->loadComponent('Tools.AuthUser');
-```
-
-## AuthUser Helper
-Load your helper in your View class or use the controller property:
-```php
-$this->loadHelper('Tools.AuthUser');
-
-// or
-public $helpers = ['Tools.AuthUser'];
-```
-Don't forget that the component has to be included for the helper to function.
-
-
-## Usage
-Both component and helper function the same:
-
-```php
-// Read the id of the logged in user as shortcut method (Auth.User.id)
-$uid = $this->AuthUser->id();
-
-// Get the username (Auth.User.username)
-$username = $this->AuthUser->user('username');
-
-// Check for a specific role
-$roles = $this->AuthUser->roles();
-
-// Check for a specific role
-$hasRole = $this->AuthUser->hasRole(ROLE_XYZ);
-```
-
-## Notes
-The above example uses default settings and ROLE_{...} constants.
-Use your own settings if necessary to overwrite the default behavior.

+ 0 - 45
docs/Component/Flash.md

@@ -1,45 +0,0 @@
-# Flash Component
-
-An enhanced FlashComponent capable of
-- Stackable messages for each type
-- Persistent (across requests) and transient messages
-- Inject it into the headers, as `X-Flash` for example, for REST/AJAX requests
-
-## Configs
-- 'headerKey' => 'X-Flash', // Set to empty string to deactivate
-- 'sessionLimit' => 99 // Max message limit for Session to avoid session flooding (Configure uses 99 fixed)
-
-## Usage
-Attach it to your controllers in `initialize()` like so:
-```php
-$this->loadComponent('Tools.Flash');
-```
-
-Also add the helper for it:
-```php
-public $helpers = array('Tools.Flash');
-```
-
-In your layouts, you don't need to change the `$this->Flash->render()` call, as the syntax for this helper is the same.
-
-### Basic Example
-```php
-// Inside an action
-$this->Flash->message('Yeah it works.', 'success');
-$this->Flash->message('Careful.', 'warning');
-$this->Flash->message('O o.', 'error');
-```
-
-### You can also use the new syntactic sugar:
-```php
-// Inside an action
-$this->Flash->success('Yeah it works.');
-$this->Flash->warning('Careful.');
-$this->Flash->error('O o.');
-```
-
-## Notes
-It will also work with the AuthComponent, which internally uses FlashComponent::set(). This method has been provides as core hook internally.
-
-You can use any type (success, warning, error, info, ...) of message, except the two reserved ones `message` and `set`.
-At least if you plan on using the magic method invokation. But even if not, it would be good practice to not use those two.

+ 2 - 8
docs/README.md

@@ -17,9 +17,7 @@ This cake3 branch only works for **CakePHP3.x** - please use the master branch f
 * [Behavior/Passwordable](Behavior/Passwordable.md)
 * [Behavior/Slugged](Behavior/Slugged.md)
 * [Behavior/Reset](Behavior/Reset.md)
-* [Component/Flash](Component/Flash.md)
 * [View/Rss](View/Rss.md)
-* [Auth (Component/Helper)](Auth/Auth.md)
 * [Testing](TestSuite/Testing.md)
 
 ## Basic enhancements of the core
@@ -55,9 +53,9 @@ use Tools\Controller\Controller;
 
 class AppController extends Controller {
 
-	public $components = array('Tools.Common', 'Tools.Flash');
+	public $components = array('Tools.Common');
 
-	public $helpers = array('Tools.Common', 'Tools.Flash', 'Tools.Time', 'Tools.Number', 'Tools.Format');
+	public $helpers = array('Tools.Common', 'Tools.Time', 'Tools.Number', 'Tools.Format');
 
 }
 ```
@@ -66,14 +64,10 @@ Here we can also see some of the most useful components and helpers included rig
 The Common component for example will automatically provide:
 - Auto-trim on POST (to make - not only notEmpty - validation working properly).
 
-With the Flash component and it's message() method you can have colorful (success, warning, error, ...) flash messages.
-They also can stack up (multiple messages per type) which the core currently still doesn't support.
-
 The Tools plugin controller will allow you to:
 - Disable cache also works for older IE versions.
 
 
-
 ### BC shims for easier migration from 2.x
 It contains many shims to provide 2.x functionality when upgrading apps to 3.0.
 This eases migration as complete parts of the code, such as validation and other model property settings

+ 3 - 0
tests/bootstrap.php

@@ -75,6 +75,9 @@ Cake\Core\Plugin::load('Tools', ['path' => ROOT . DS, 'bootstrap' => true]);
 if (!getenv('db_class')) {
 	putenv('db_class=Cake\Database\Driver\Sqlite');
 	putenv('db_dsn=sqlite::memory:');
+
+	//putenv('db_class=Cake\Database\Driver\Postgres');
+	//putenv('db_dsn=postgres://postgres@127.0.0.1/test');
 }
 
 Cake\Datasource\ConnectionManager::config('test', [