forked from marcelog/Ding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.1.3.x
84 lines (75 loc) · 3.13 KB
/
README.1.3.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Changes
-------
* More mature code. Lots of internal code & interface cleanups :)
* The drivers are all beans now (yeeey!).
* Initial work on web application bookstore for example.
* Xml, Yaml, and Annotation are now "providers" instead of "drivers".
* ErrorHandler, ShutdownHandler, and SignalHandler are now run by default, but
you dont need any other configurations. You can hook in them by listening for
events: "dingError", "dingShutdown", "dingSignal". See the updated examples.
Note: The signal handler will only be enabled if sapi is cli or cgi.
* Properties can now be used to declare bean classes.
* BeforeDefinition in the lifecycle is gone.
* BeforeConfig in the lifecycle is gone.
* IBeanDefinitionProvider now replaces IBeforeDefinition.
* IBeanFactory is gone.
* ReflectionFactory and Proxy factory have instance methods and variables instead of static ones.
* New IReflectionFactoryAware.
* All beans that implement IBeanDefinitionProvider are automatically registered
in the container.
* New IContainer::registerBeanDefinitionProvider.
* IContainer::getLogger() is gone.
* IContainer::setBeanDefinition() is gone.
* IContainer::setBean() is gone.
* All beans that implement IAspectProvider and IPointcutProvider are automatically
registered in the AspectManager.
* New BeanDefinitionProvider: Core, that provides all basic core beans for bootstrap.
* Implemented FileCache::flush().
* HttpDispatcher will now call the actions with their arguments, as passed from the
request.
* PropertiesHelper is now stripped from all logic. PropertiesDriver will do the job now.
* The container is the one responsible for replacing properties with format ${..}.
* Integrated drivers into core:
* LoggerAware
* AspectManagerAware
* ResourceLoaderAware
* ResourceDriver
* ContainerAware
* LifecycleAware
* BeanNameAware
* DependsOn
* ReflectionFactoryAware
* The lifecycle is now:
* beforeConfig
* afterConfig
* afterDefinition
* beforeCreate
* beforeAssemble
* afterCreate
* MVCException changed to MvcException.
* Namespace Ding\MVC changed to Ding\Mvc
* Namespace Ding\Helpers\TCP changed to Ding\Helpers\Tcp
* Namespace Ding\Helpers\PAGI changed to Ding\Helpers\Pagi
* Namespace Ding\Helpers\PAMI changed to Ding\Helpers\Pami
* The TimerHelper was removed.
Migrating Mvc from 1.1.x to > 1.3.x
-----------------------------------
If you are using the Mvc from versions < 1.3.x, your actions should look like:
public function someAction(array $arguments = array())
{
}
Since version 1.3.x, the HttpDispatcher included will no longer send an array as
the argument for actions, but will try to map request variables according to the
signature of the method for the selected action.
Suppose you're interested in $arguments having arguments 'arg1', and 'arg2', then
your action's signature should now be changed to:
public function someAction($arg1, $arg2)
{
}
You can also have optional arguments:
public function someAction($arg1, $arg2, $arg3 = 'default')
{
}
Ding will populate the arguments according to the argument names used
in $_GET and $_POST. A Ding\MVC\Exception\MVCException will be thrown
if a non optional argument is not supplied in the request.