https://github.com/thecodingmachine/utils.action.action-interface
This package contains an interface used by many objects to say they can do stuff. Actually, they can perform one particular action and has been designed for that. The action performed is completely up to the implementer (sending a mail, storing a result in database, displaying something on the screen...) The concept is very simple, and very powerful at the same time.
https://github.com/thecodingmachine/utils.action.action-interface
Last synced: 3 months ago
JSON representation
This package contains an interface used by many objects to say they can do stuff. Actually, they can perform one particular action and has been designed for that. The action performed is completely up to the implementer (sending a mail, storing a result in database, displaying something on the screen...) The concept is very simple, and very powerful at the same time.
- Host: GitHub
- URL: https://github.com/thecodingmachine/utils.action.action-interface
- Owner: thecodingmachine
- License: mit
- Created: 2013-05-17T12:05:16.000Z (about 13 years ago)
- Default Branch: 1.0
- Last Pushed: 2014-06-04T16:10:07.000Z (about 12 years ago)
- Last Synced: 2025-02-16T12:30:30.578Z (over 1 year ago)
- Language: PHP
- Size: 133 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
What is this package
====================
This package contains an interface used by many objects to declare they can perform an action.
Objects implementing this interface can perform one particular action and have been designed for that.
The action performed is completely up to the implementer (sending a mail, storing a result in database, displaying something on the screen...) The concept is very simple, and very powerful at the same time.
This is a very simple and very powerful system.
```php
namespace Mouf\Utils\Action;
interface ActionInterface {
/**
* Executes the action the object has been designed for.
*
* @throws \Exception
*/
public function run();
}
```
Here are a few samples:
- a class that sends one mail
- a class that outputs some HTML
- a class that displays an error if the user does not have the correct right
- ...
Mouf package
------------
This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.