@@ -46,7 +46,7 @@ |
||
46 | 46 | * |
47 | 47 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
48 | 48 | * |
49 | - * @return mixed - A string containing the view name associated with this |
|
49 | + * @return string - A string containing the view name associated with this |
|
50 | 50 | * action, or... |
51 | 51 | * - An array with two indices: |
52 | 52 | * 0. The parent module of the view that will be executed. |
@@ -2,61 +2,61 @@ |
||
2 | 2 | |
3 | 3 | class Confidential_SecretAction extends SampleAppConfidentialBaseAction |
4 | 4 | { |
5 | - /** |
|
6 | - * This Action does not yet serve any Request methods. |
|
7 | - * When a request comes in and this Action is used, execution will be skipped |
|
8 | - * and the View returned by getDefaultViewName() will be used. |
|
9 | - * |
|
10 | - * If an Action has an execute() method, this means it serves all methods. |
|
11 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
12 | - * because "read" and "write" are the default names for Web Request methods. |
|
13 | - * Other request methods may be explicitly served via executeReqmethname(). |
|
14 | - * |
|
15 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
16 | - * performed prior to execution. |
|
17 | - * |
|
18 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
19 | - * when a POST request comes in, which is mapped to the "write" method by |
|
20 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
21 | - * add the new product to the database there, while for GET (o.e. "read") |
|
22 | - * requests, execution would be skipped, and the View name would be determined |
|
23 | - * using getDefaultViewName(). |
|
24 | - * |
|
25 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
26 | - * "catchall" execute(). |
|
27 | - * |
|
28 | - * Besides execute() and execute*(), there are other methods that might either |
|
29 | - * be generic or specific to a request method. These are: |
|
30 | - * registerValidators() and register*Validators() |
|
31 | - * validate() and validate*() |
|
32 | - * handleError() and handle*Error() |
|
33 | - * |
|
34 | - * The execution of these methods is not dependent on the respective specific |
|
35 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
36 | - * be run even if there is no executeWrite() method. |
|
37 | - */ |
|
5 | + /** |
|
6 | + * This Action does not yet serve any Request methods. |
|
7 | + * When a request comes in and this Action is used, execution will be skipped |
|
8 | + * and the View returned by getDefaultViewName() will be used. |
|
9 | + * |
|
10 | + * If an Action has an execute() method, this means it serves all methods. |
|
11 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
12 | + * because "read" and "write" are the default names for Web Request methods. |
|
13 | + * Other request methods may be explicitly served via executeReqmethname(). |
|
14 | + * |
|
15 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
16 | + * performed prior to execution. |
|
17 | + * |
|
18 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
19 | + * when a POST request comes in, which is mapped to the "write" method by |
|
20 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
21 | + * add the new product to the database there, while for GET (o.e. "read") |
|
22 | + * requests, execution would be skipped, and the View name would be determined |
|
23 | + * using getDefaultViewName(). |
|
24 | + * |
|
25 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
26 | + * "catchall" execute(). |
|
27 | + * |
|
28 | + * Besides execute() and execute*(), there are other methods that might either |
|
29 | + * be generic or specific to a request method. These are: |
|
30 | + * registerValidators() and register*Validators() |
|
31 | + * validate() and validate*() |
|
32 | + * handleError() and handle*Error() |
|
33 | + * |
|
34 | + * The execution of these methods is not dependent on the respective specific |
|
35 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
36 | + * be run even if there is no executeWrite() method. |
|
37 | + */ |
|
38 | 38 | // public function execute(RequestDataHolder $rd) |
39 | 39 | // { |
40 | 40 | // return 'Success'; |
41 | 41 | // } |
42 | 42 | |
43 | - /** |
|
44 | - * This method returns the View name in case the Action doesn't serve the |
|
45 | - * current Request method. |
|
46 | - * |
|
47 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
48 | - * |
|
49 | - * @return mixed - A string containing the view name associated with this |
|
50 | - * action, or... |
|
51 | - * - An array with two indices: |
|
52 | - * 0. The parent module of the view that will be executed. |
|
53 | - * 1. The view that will be executed. |
|
54 | - * |
|
55 | - */ |
|
56 | - public function getDefaultViewName() |
|
57 | - { |
|
58 | - return 'Success'; |
|
59 | - } |
|
43 | + /** |
|
44 | + * This method returns the View name in case the Action doesn't serve the |
|
45 | + * current Request method. |
|
46 | + * |
|
47 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
48 | + * |
|
49 | + * @return mixed - A string containing the view name associated with this |
|
50 | + * action, or... |
|
51 | + * - An array with two indices: |
|
52 | + * 0. The parent module of the view that will be executed. |
|
53 | + * 1. The view that will be executed. |
|
54 | + * |
|
55 | + */ |
|
56 | + public function getDefaultViewName() |
|
57 | + { |
|
58 | + return 'Success'; |
|
59 | + } |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | ?> |
63 | 63 | \ No newline at end of file |
@@ -46,7 +46,7 @@ |
||
46 | 46 | * |
47 | 47 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
48 | 48 | * |
49 | - * @return mixed - A string containing the view name associated with this |
|
49 | + * @return string - A string containing the view name associated with this |
|
50 | 50 | * action, or... |
51 | 51 | * - An array with two indices: |
52 | 52 | * 0. The parent module of the view that will be executed. |
@@ -2,68 +2,68 @@ |
||
2 | 2 | |
3 | 3 | class Confidential_TopSecretAction extends SampleAppConfidentialBaseAction |
4 | 4 | { |
5 | - /** |
|
6 | - * This Action does not yet serve any Request methods. |
|
7 | - * When a request comes in and this Action is used, execution will be skipped |
|
8 | - * and the View returned by getDefaultViewName() will be used. |
|
9 | - * |
|
10 | - * If an Action has an execute() method, this means it serves all methods. |
|
11 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
12 | - * because "read" and "write" are the default names for Web Request methods. |
|
13 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
14 | - * |
|
15 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
16 | - * performed prior to execution. |
|
17 | - * |
|
18 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
19 | - * when a POST request comes in, which is mapped to the "write" method by |
|
20 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
21 | - * add the new product to the database there, while for GET (o.e. "read") |
|
22 | - * requests, execution would be skipped, and the View name would be determined |
|
23 | - * using getDefaultViewName(). |
|
24 | - * |
|
25 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
26 | - * "catchall" execute(). |
|
27 | - * |
|
28 | - * Besides execute() and execute*(), there are other methods that might either |
|
29 | - * be generic or specific to a request method. These are: |
|
30 | - * registerValidators() and register*Validators() |
|
31 | - * validate() and validate*() |
|
32 | - * handleError() and handle*Error() |
|
33 | - * |
|
34 | - * The execution of these methods is not dependent on the respective specific |
|
35 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
36 | - * be run even if there is no executeWrite() method. |
|
37 | - */ |
|
5 | + /** |
|
6 | + * This Action does not yet serve any Request methods. |
|
7 | + * When a request comes in and this Action is used, execution will be skipped |
|
8 | + * and the View returned by getDefaultViewName() will be used. |
|
9 | + * |
|
10 | + * If an Action has an execute() method, this means it serves all methods. |
|
11 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
12 | + * because "read" and "write" are the default names for Web Request methods. |
|
13 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
14 | + * |
|
15 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
16 | + * performed prior to execution. |
|
17 | + * |
|
18 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
19 | + * when a POST request comes in, which is mapped to the "write" method by |
|
20 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
21 | + * add the new product to the database there, while for GET (o.e. "read") |
|
22 | + * requests, execution would be skipped, and the View name would be determined |
|
23 | + * using getDefaultViewName(). |
|
24 | + * |
|
25 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
26 | + * "catchall" execute(). |
|
27 | + * |
|
28 | + * Besides execute() and execute*(), there are other methods that might either |
|
29 | + * be generic or specific to a request method. These are: |
|
30 | + * registerValidators() and register*Validators() |
|
31 | + * validate() and validate*() |
|
32 | + * handleError() and handle*Error() |
|
33 | + * |
|
34 | + * The execution of these methods is not dependent on the respective specific |
|
35 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
36 | + * be run even if there is no executeWrite() method. |
|
37 | + */ |
|
38 | 38 | // public function execute(AgaviRequestDataHolder $rd) |
39 | 39 | // { |
40 | 40 | // return 'Success'; |
41 | 41 | // } |
42 | 42 | |
43 | - /** |
|
44 | - * This method returns the View name in case the Action doesn't serve the |
|
45 | - * current Request method. |
|
46 | - * |
|
47 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
48 | - * |
|
49 | - * @return mixed - A string containing the view name associated with this |
|
50 | - * action, or... |
|
51 | - * - An array with two indices: |
|
52 | - * 0. The parent module of the view that will be executed. |
|
53 | - * 1. The view that will be executed. |
|
54 | - * |
|
55 | - */ |
|
56 | - public function getDefaultViewName() |
|
57 | - { |
|
58 | - return 'Success'; |
|
59 | - } |
|
43 | + /** |
|
44 | + * This method returns the View name in case the Action doesn't serve the |
|
45 | + * current Request method. |
|
46 | + * |
|
47 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
48 | + * |
|
49 | + * @return mixed - A string containing the view name associated with this |
|
50 | + * action, or... |
|
51 | + * - An array with two indices: |
|
52 | + * 0. The parent module of the view that will be executed. |
|
53 | + * 1. The view that will be executed. |
|
54 | + * |
|
55 | + */ |
|
56 | + public function getDefaultViewName() |
|
57 | + { |
|
58 | + return 'Success'; |
|
59 | + } |
|
60 | 60 | |
61 | - public function getCredentials() |
|
62 | - { |
|
63 | - return array( |
|
64 | - 'photos.edit' |
|
65 | - ); |
|
66 | - } |
|
61 | + public function getCredentials() |
|
62 | + { |
|
63 | + return array( |
|
64 | + 'photos.edit' |
|
65 | + ); |
|
66 | + } |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | ?> |
70 | 70 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
61 | 61 | * |
62 | - * @return mixed - A string containing the view name associated with this |
|
62 | + * @return string - A string containing the view name associated with this |
|
63 | 63 | * action, or... |
64 | 64 | * - An array with two indices: |
65 | 65 | * 0. The parent module of the view that will be executed. |
@@ -15,61 +15,61 @@ |
||
15 | 15 | |
16 | 16 | class Default_Error404Action extends SampleAppDefaultBaseAction |
17 | 17 | { |
18 | - /** |
|
19 | - * This Action does not yet serve any Request methods. |
|
20 | - * When a request comes in and this Action is used, execution will be skipped |
|
21 | - * and the View returned by getDefaultViewName() will be used. |
|
22 | - * |
|
23 | - * If an Action has an execute() method, this means it serves all methods. |
|
24 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | - * because "read" and "write" are the default names for Web Request methods. |
|
26 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | - * |
|
28 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | - * performed prior to execution. |
|
30 | - * |
|
31 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | - * when a POST request comes in, which is mapped to the "write" method by |
|
33 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | - * add the new product to the database there, while for GET (o.e. "read") |
|
35 | - * requests, execution would be skipped, and the View name would be determined |
|
36 | - * using getDefaultViewName(). |
|
37 | - * |
|
38 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | - * "catchall" execute(). |
|
40 | - * |
|
41 | - * Besides execute() and execute*(), there are other methods that might either |
|
42 | - * be generic or specific to a request method. These are: |
|
43 | - * registerValidators() and register*Validators() |
|
44 | - * validate() and validate*() |
|
45 | - * handleError() and handle*Error() |
|
46 | - * |
|
47 | - * The execution of these methods is not dependent on the respective specific |
|
48 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | - * be run even if there is no executeWrite() method. |
|
50 | - */ |
|
18 | + /** |
|
19 | + * This Action does not yet serve any Request methods. |
|
20 | + * When a request comes in and this Action is used, execution will be skipped |
|
21 | + * and the View returned by getDefaultViewName() will be used. |
|
22 | + * |
|
23 | + * If an Action has an execute() method, this means it serves all methods. |
|
24 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | + * because "read" and "write" are the default names for Web Request methods. |
|
26 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | + * |
|
28 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | + * performed prior to execution. |
|
30 | + * |
|
31 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | + * when a POST request comes in, which is mapped to the "write" method by |
|
33 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | + * add the new product to the database there, while for GET (o.e. "read") |
|
35 | + * requests, execution would be skipped, and the View name would be determined |
|
36 | + * using getDefaultViewName(). |
|
37 | + * |
|
38 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | + * "catchall" execute(). |
|
40 | + * |
|
41 | + * Besides execute() and execute*(), there are other methods that might either |
|
42 | + * be generic or specific to a request method. These are: |
|
43 | + * registerValidators() and register*Validators() |
|
44 | + * validate() and validate*() |
|
45 | + * handleError() and handle*Error() |
|
46 | + * |
|
47 | + * The execution of these methods is not dependent on the respective specific |
|
48 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | + * be run even if there is no executeWrite() method. |
|
50 | + */ |
|
51 | 51 | // public function execute(AgaviRequestDataHolder $rd) |
52 | 52 | // { |
53 | 53 | // return 'Success'; |
54 | 54 | // } |
55 | 55 | |
56 | - /** |
|
57 | - * This method returns the View name in case the Action doesn't serve the |
|
58 | - * current Request method. |
|
59 | - * |
|
60 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | - * |
|
62 | - * @return mixed - A string containing the view name associated with this |
|
63 | - * action, or... |
|
64 | - * - An array with two indices: |
|
65 | - * 0. The parent module of the view that will be executed. |
|
66 | - * 1. The view that will be executed. |
|
67 | - * |
|
68 | - */ |
|
69 | - public function getDefaultViewName() |
|
70 | - { |
|
71 | - return 'Success'; |
|
72 | - } |
|
56 | + /** |
|
57 | + * This method returns the View name in case the Action doesn't serve the |
|
58 | + * current Request method. |
|
59 | + * |
|
60 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | + * |
|
62 | + * @return mixed - A string containing the view name associated with this |
|
63 | + * action, or... |
|
64 | + * - An array with two indices: |
|
65 | + * 0. The parent module of the view that will be executed. |
|
66 | + * 1. The view that will be executed. |
|
67 | + * |
|
68 | + */ |
|
69 | + public function getDefaultViewName() |
|
70 | + { |
|
71 | + return 'Success'; |
|
72 | + } |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | ?> |
76 | 76 | \ No newline at end of file |
@@ -72,7 +72,7 @@ |
||
72 | 72 | * |
73 | 73 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
74 | 74 | * |
75 | - * @return mixed - A string containing the view name associated with this |
|
75 | + * @return string - A string containing the view name associated with this |
|
76 | 76 | * action, or... |
77 | 77 | * - An array with two indices: |
78 | 78 | * 0. The parent module of the view that will be executed. |
@@ -17,72 +17,72 @@ |
||
17 | 17 | |
18 | 18 | class Default_LoginAction extends SampleAppDefaultBaseAction |
19 | 19 | { |
20 | - /** |
|
21 | - * This Action does not yet serve any Request methods. |
|
22 | - * When a request comes in and this Action is used, execution will be skipped |
|
23 | - * and the View returned by getDefaultViewName() will be used. |
|
24 | - * |
|
25 | - * If an Action has an execute() method, this means it serves all methods. |
|
26 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
27 | - * because "read" and "write" are the default names for Web Request methods. |
|
28 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
29 | - * |
|
30 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
31 | - * performed prior to execution. |
|
32 | - * |
|
33 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
34 | - * when a POST request comes in, which is mapped to the "write" method by |
|
35 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
36 | - * add the new product to the database there, while for GET (o.e. "read") |
|
37 | - * requests, execution would be skipped, and the View name would be determined |
|
38 | - * using getDefaultViewName(). |
|
39 | - * |
|
40 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
41 | - * "catchall" execute(). |
|
42 | - * |
|
43 | - * Besides execute() and execute*(), there are other methods that might either |
|
44 | - * be generic or specific to a request method. These are: |
|
45 | - * registerValidators() and register*Validators() |
|
46 | - * validate() and validate*() |
|
47 | - * handleError() and handle*Error() |
|
48 | - * |
|
49 | - * The execution of these methods is not dependent on the respective specific |
|
50 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
51 | - * be run even if there is no executeWrite() method. |
|
52 | - */ |
|
53 | - public function executeWrite(RequestDataHolder $rd) |
|
54 | - { |
|
55 | - try { |
|
56 | - $this->getContext()->getUser()->login($rd->getParameter('username'), $rd->getParameter('password')); |
|
57 | - return 'Success'; |
|
58 | - } catch(\Agavi\Exception\SecurityException $e) { |
|
59 | - $this->setAttribute('error', $e->getMessage()); |
|
60 | - return 'Error'; |
|
61 | - } |
|
62 | - } |
|
20 | + /** |
|
21 | + * This Action does not yet serve any Request methods. |
|
22 | + * When a request comes in and this Action is used, execution will be skipped |
|
23 | + * and the View returned by getDefaultViewName() will be used. |
|
24 | + * |
|
25 | + * If an Action has an execute() method, this means it serves all methods. |
|
26 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
27 | + * because "read" and "write" are the default names for Web Request methods. |
|
28 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
29 | + * |
|
30 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
31 | + * performed prior to execution. |
|
32 | + * |
|
33 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
34 | + * when a POST request comes in, which is mapped to the "write" method by |
|
35 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
36 | + * add the new product to the database there, while for GET (o.e. "read") |
|
37 | + * requests, execution would be skipped, and the View name would be determined |
|
38 | + * using getDefaultViewName(). |
|
39 | + * |
|
40 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
41 | + * "catchall" execute(). |
|
42 | + * |
|
43 | + * Besides execute() and execute*(), there are other methods that might either |
|
44 | + * be generic or specific to a request method. These are: |
|
45 | + * registerValidators() and register*Validators() |
|
46 | + * validate() and validate*() |
|
47 | + * handleError() and handle*Error() |
|
48 | + * |
|
49 | + * The execution of these methods is not dependent on the respective specific |
|
50 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
51 | + * be run even if there is no executeWrite() method. |
|
52 | + */ |
|
53 | + public function executeWrite(RequestDataHolder $rd) |
|
54 | + { |
|
55 | + try { |
|
56 | + $this->getContext()->getUser()->login($rd->getParameter('username'), $rd->getParameter('password')); |
|
57 | + return 'Success'; |
|
58 | + } catch(\Agavi\Exception\SecurityException $e) { |
|
59 | + $this->setAttribute('error', $e->getMessage()); |
|
60 | + return 'Error'; |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | - public function handleError(RequestDataHolder $rd) |
|
65 | - { |
|
66 | - return 'Error'; |
|
67 | - } |
|
64 | + public function handleError(RequestDataHolder $rd) |
|
65 | + { |
|
66 | + return 'Error'; |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * This method returns the View name in case the Action doesn't serve the |
|
71 | - * current Request method. |
|
72 | - * |
|
73 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
74 | - * |
|
75 | - * @return mixed - A string containing the view name associated with this |
|
76 | - * action, or... |
|
77 | - * - An array with two indices: |
|
78 | - * 0. The parent module of the view that will be executed. |
|
79 | - * 1. The view that will be executed. |
|
80 | - * |
|
81 | - */ |
|
82 | - public function getDefaultViewName() |
|
83 | - { |
|
84 | - return 'Input'; |
|
85 | - } |
|
69 | + /** |
|
70 | + * This method returns the View name in case the Action doesn't serve the |
|
71 | + * current Request method. |
|
72 | + * |
|
73 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
74 | + * |
|
75 | + * @return mixed - A string containing the view name associated with this |
|
76 | + * action, or... |
|
77 | + * - An array with two indices: |
|
78 | + * 0. The parent module of the view that will be executed. |
|
79 | + * 1. The view that will be executed. |
|
80 | + * |
|
81 | + */ |
|
82 | + public function getDefaultViewName() |
|
83 | + { |
|
84 | + return 'Input'; |
|
85 | + } |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | ?> |
89 | 89 | \ No newline at end of file |
@@ -55,7 +55,7 @@ |
||
55 | 55 | try { |
56 | 56 | $this->getContext()->getUser()->login($rd->getParameter('username'), $rd->getParameter('password')); |
57 | 57 | return 'Success'; |
58 | - } catch(\Agavi\Exception\SecurityException $e) { |
|
58 | + } catch (\Agavi\Exception\SecurityException $e) { |
|
59 | 59 | $this->setAttribute('error', $e->getMessage()); |
60 | 60 | return 'Error'; |
61 | 61 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
61 | 61 | * |
62 | - * @return mixed - A string containing the view name associated with this |
|
62 | + * @return string - A string containing the view name associated with this |
|
63 | 63 | * action, or... |
64 | 64 | * - An array with two indices: |
65 | 65 | * 0. The parent module of the view that will be executed. |
@@ -15,61 +15,61 @@ |
||
15 | 15 | |
16 | 16 | class Default_ModuleDisabledAction extends SampleAppDefaultBaseAction |
17 | 17 | { |
18 | - /** |
|
19 | - * This Action does not yet serve any Request methods. |
|
20 | - * When a request comes in and this Action is used, execution will be skipped |
|
21 | - * and the View returned by getDefaultViewName() will be used. |
|
22 | - * |
|
23 | - * If an Action has an execute() method, this means it serves all methods. |
|
24 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | - * because "read" and "write" are the default names for Web Request methods. |
|
26 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | - * |
|
28 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | - * performed prior to execution. |
|
30 | - * |
|
31 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | - * when a POST request comes in, which is mapped to the "write" method by |
|
33 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | - * add the new product to the database there, while for GET (o.e. "read") |
|
35 | - * requests, execution would be skipped, and the View name would be determined |
|
36 | - * using getDefaultViewName(). |
|
37 | - * |
|
38 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | - * "catchall" execute(). |
|
40 | - * |
|
41 | - * Besides execute() and execute*(), there are other methods that might either |
|
42 | - * be generic or specific to a request method. These are: |
|
43 | - * registerValidators() and register*Validators() |
|
44 | - * validate() and validate*() |
|
45 | - * handleError() and handle*Error() |
|
46 | - * |
|
47 | - * The execution of these methods is not dependent on the respective specific |
|
48 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | - * be run even if there is no executeWrite() method. |
|
50 | - */ |
|
18 | + /** |
|
19 | + * This Action does not yet serve any Request methods. |
|
20 | + * When a request comes in and this Action is used, execution will be skipped |
|
21 | + * and the View returned by getDefaultViewName() will be used. |
|
22 | + * |
|
23 | + * If an Action has an execute() method, this means it serves all methods. |
|
24 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | + * because "read" and "write" are the default names for Web Request methods. |
|
26 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | + * |
|
28 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | + * performed prior to execution. |
|
30 | + * |
|
31 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | + * when a POST request comes in, which is mapped to the "write" method by |
|
33 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | + * add the new product to the database there, while for GET (o.e. "read") |
|
35 | + * requests, execution would be skipped, and the View name would be determined |
|
36 | + * using getDefaultViewName(). |
|
37 | + * |
|
38 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | + * "catchall" execute(). |
|
40 | + * |
|
41 | + * Besides execute() and execute*(), there are other methods that might either |
|
42 | + * be generic or specific to a request method. These are: |
|
43 | + * registerValidators() and register*Validators() |
|
44 | + * validate() and validate*() |
|
45 | + * handleError() and handle*Error() |
|
46 | + * |
|
47 | + * The execution of these methods is not dependent on the respective specific |
|
48 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | + * be run even if there is no executeWrite() method. |
|
50 | + */ |
|
51 | 51 | // public function execute(AgaviRequestDataHolder $rd) |
52 | 52 | // { |
53 | 53 | // return 'Success'; |
54 | 54 | // } |
55 | 55 | |
56 | - /** |
|
57 | - * This method returns the View name in case the Action doesn't serve the |
|
58 | - * current Request method. |
|
59 | - * |
|
60 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | - * |
|
62 | - * @return mixed - A string containing the view name associated with this |
|
63 | - * action, or... |
|
64 | - * - An array with two indices: |
|
65 | - * 0. The parent module of the view that will be executed. |
|
66 | - * 1. The view that will be executed. |
|
67 | - * |
|
68 | - */ |
|
69 | - public function getDefaultViewName() |
|
70 | - { |
|
71 | - return 'Success'; |
|
72 | - } |
|
56 | + /** |
|
57 | + * This method returns the View name in case the Action doesn't serve the |
|
58 | + * current Request method. |
|
59 | + * |
|
60 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | + * |
|
62 | + * @return mixed - A string containing the view name associated with this |
|
63 | + * action, or... |
|
64 | + * - An array with two indices: |
|
65 | + * 0. The parent module of the view that will be executed. |
|
66 | + * 1. The view that will be executed. |
|
67 | + * |
|
68 | + */ |
|
69 | + public function getDefaultViewName() |
|
70 | + { |
|
71 | + return 'Success'; |
|
72 | + } |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | ?> |
76 | 76 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
61 | 61 | * |
62 | - * @return mixed - A string containing the view name associated with this |
|
62 | + * @return string - A string containing the view name associated with this |
|
63 | 63 | * action, or... |
64 | 64 | * - An array with two indices: |
65 | 65 | * 0. The parent module of the view that will be executed. |
@@ -15,61 +15,61 @@ |
||
15 | 15 | |
16 | 16 | class Default_SecureAction extends SampleAppDefaultBaseAction |
17 | 17 | { |
18 | - /** |
|
19 | - * This Action does not yet serve any Request methods. |
|
20 | - * When a request comes in and this Action is used, execution will be skipped |
|
21 | - * and the View returned by getDefaultViewName() will be used. |
|
22 | - * |
|
23 | - * If an Action has an execute() method, this means it serves all methods. |
|
24 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | - * because "read" and "write" are the default names for Web Request methods. |
|
26 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | - * |
|
28 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | - * performed prior to execution. |
|
30 | - * |
|
31 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | - * when a POST request comes in, which is mapped to the "write" method by |
|
33 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | - * add the new product to the database there, while for GET (o.e. "read") |
|
35 | - * requests, execution would be skipped, and the View name would be determined |
|
36 | - * using getDefaultViewName(). |
|
37 | - * |
|
38 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | - * "catchall" execute(). |
|
40 | - * |
|
41 | - * Besides execute() and execute*(), there are other methods that might either |
|
42 | - * be generic or specific to a request method. These are: |
|
43 | - * registerValidators() and register*Validators() |
|
44 | - * validate() and validate*() |
|
45 | - * handleError() and handle*Error() |
|
46 | - * |
|
47 | - * The execution of these methods is not dependent on the respective specific |
|
48 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | - * be run even if there is no executeWrite() method. |
|
50 | - */ |
|
18 | + /** |
|
19 | + * This Action does not yet serve any Request methods. |
|
20 | + * When a request comes in and this Action is used, execution will be skipped |
|
21 | + * and the View returned by getDefaultViewName() will be used. |
|
22 | + * |
|
23 | + * If an Action has an execute() method, this means it serves all methods. |
|
24 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | + * because "read" and "write" are the default names for Web Request methods. |
|
26 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | + * |
|
28 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | + * performed prior to execution. |
|
30 | + * |
|
31 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | + * when a POST request comes in, which is mapped to the "write" method by |
|
33 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | + * add the new product to the database there, while for GET (o.e. "read") |
|
35 | + * requests, execution would be skipped, and the View name would be determined |
|
36 | + * using getDefaultViewName(). |
|
37 | + * |
|
38 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | + * "catchall" execute(). |
|
40 | + * |
|
41 | + * Besides execute() and execute*(), there are other methods that might either |
|
42 | + * be generic or specific to a request method. These are: |
|
43 | + * registerValidators() and register*Validators() |
|
44 | + * validate() and validate*() |
|
45 | + * handleError() and handle*Error() |
|
46 | + * |
|
47 | + * The execution of these methods is not dependent on the respective specific |
|
48 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | + * be run even if there is no executeWrite() method. |
|
50 | + */ |
|
51 | 51 | // public function execute(AgaviRequestDataHolder $rd) |
52 | 52 | // { |
53 | 53 | // return 'Success'; |
54 | 54 | // } |
55 | 55 | |
56 | - /** |
|
57 | - * This method returns the View name in case the Action doesn't serve the |
|
58 | - * current Request method. |
|
59 | - * |
|
60 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | - * |
|
62 | - * @return mixed - A string containing the view name associated with this |
|
63 | - * action, or... |
|
64 | - * - An array with two indices: |
|
65 | - * 0. The parent module of the view that will be executed. |
|
66 | - * 1. The view that will be executed. |
|
67 | - * |
|
68 | - */ |
|
69 | - public function getDefaultViewName() |
|
70 | - { |
|
71 | - return 'Success'; |
|
72 | - } |
|
56 | + /** |
|
57 | + * This method returns the View name in case the Action doesn't serve the |
|
58 | + * current Request method. |
|
59 | + * |
|
60 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | + * |
|
62 | + * @return mixed - A string containing the view name associated with this |
|
63 | + * action, or... |
|
64 | + * - An array with two indices: |
|
65 | + * 0. The parent module of the view that will be executed. |
|
66 | + * 1. The view that will be executed. |
|
67 | + * |
|
68 | + */ |
|
69 | + public function getDefaultViewName() |
|
70 | + { |
|
71 | + return 'Success'; |
|
72 | + } |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | ?> |
76 | 76 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
61 | 61 | * |
62 | - * @return mixed - A string containing the view name associated with this |
|
62 | + * @return string - A string containing the view name associated with this |
|
63 | 63 | * action, or... |
64 | 64 | * - An array with two indices: |
65 | 65 | * 0. The parent module of the view that will be executed. |
@@ -15,61 +15,61 @@ |
||
15 | 15 | |
16 | 16 | class Default_UnavailableAction extends SampleAppDefaultBaseAction |
17 | 17 | { |
18 | - /** |
|
19 | - * This Action does not yet serve any Request methods. |
|
20 | - * When a request comes in and this Action is used, execution will be skipped |
|
21 | - * and the View returned by getDefaultViewName() will be used. |
|
22 | - * |
|
23 | - * If an Action has an execute() method, this means it serves all methods. |
|
24 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | - * because "read" and "write" are the default names for Web Request methods. |
|
26 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | - * |
|
28 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | - * performed prior to execution. |
|
30 | - * |
|
31 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | - * when a POST request comes in, which is mapped to the "write" method by |
|
33 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | - * add the new product to the database there, while for GET (o.e. "read") |
|
35 | - * requests, execution would be skipped, and the View name would be determined |
|
36 | - * using getDefaultViewName(). |
|
37 | - * |
|
38 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | - * "catchall" execute(). |
|
40 | - * |
|
41 | - * Besides execute() and execute*(), there are other methods that might either |
|
42 | - * be generic or specific to a request method. These are: |
|
43 | - * registerValidators() and register*Validators() |
|
44 | - * validate() and validate*() |
|
45 | - * handleError() and handle*Error() |
|
46 | - * |
|
47 | - * The execution of these methods is not dependent on the respective specific |
|
48 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | - * be run even if there is no executeWrite() method. |
|
50 | - */ |
|
18 | + /** |
|
19 | + * This Action does not yet serve any Request methods. |
|
20 | + * When a request comes in and this Action is used, execution will be skipped |
|
21 | + * and the View returned by getDefaultViewName() will be used. |
|
22 | + * |
|
23 | + * If an Action has an execute() method, this means it serves all methods. |
|
24 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | + * because "read" and "write" are the default names for Web Request methods. |
|
26 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | + * |
|
28 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | + * performed prior to execution. |
|
30 | + * |
|
31 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | + * when a POST request comes in, which is mapped to the "write" method by |
|
33 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | + * add the new product to the database there, while for GET (o.e. "read") |
|
35 | + * requests, execution would be skipped, and the View name would be determined |
|
36 | + * using getDefaultViewName(). |
|
37 | + * |
|
38 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | + * "catchall" execute(). |
|
40 | + * |
|
41 | + * Besides execute() and execute*(), there are other methods that might either |
|
42 | + * be generic or specific to a request method. These are: |
|
43 | + * registerValidators() and register*Validators() |
|
44 | + * validate() and validate*() |
|
45 | + * handleError() and handle*Error() |
|
46 | + * |
|
47 | + * The execution of these methods is not dependent on the respective specific |
|
48 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | + * be run even if there is no executeWrite() method. |
|
50 | + */ |
|
51 | 51 | // public function execute(AgaviRequestDataHolder $rd) |
52 | 52 | // { |
53 | 53 | // return 'Success'; |
54 | 54 | // } |
55 | 55 | |
56 | - /** |
|
57 | - * This method returns the View name in case the Action doesn't serve the |
|
58 | - * current Request method. |
|
59 | - * |
|
60 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | - * |
|
62 | - * @return mixed - A string containing the view name associated with this |
|
63 | - * action, or... |
|
64 | - * - An array with two indices: |
|
65 | - * 0. The parent module of the view that will be executed. |
|
66 | - * 1. The view that will be executed. |
|
67 | - * |
|
68 | - */ |
|
69 | - public function getDefaultViewName() |
|
70 | - { |
|
71 | - return 'Success'; |
|
72 | - } |
|
56 | + /** |
|
57 | + * This method returns the View name in case the Action doesn't serve the |
|
58 | + * current Request method. |
|
59 | + * |
|
60 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | + * |
|
62 | + * @return mixed - A string containing the view name associated with this |
|
63 | + * action, or... |
|
64 | + * - An array with two indices: |
|
65 | + * 0. The parent module of the view that will be executed. |
|
66 | + * 1. The view that will be executed. |
|
67 | + * |
|
68 | + */ |
|
69 | + public function getDefaultViewName() |
|
70 | + { |
|
71 | + return 'Success'; |
|
72 | + } |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | ?> |
76 | 76 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
61 | 61 | * |
62 | - * @return mixed - A string containing the view name associated with this |
|
62 | + * @return string - A string containing the view name associated with this |
|
63 | 63 | * action, or... |
64 | 64 | * - An array with two indices: |
65 | 65 | * 0. The parent module of the view that will be executed. |
@@ -15,66 +15,66 @@ |
||
15 | 15 | |
16 | 16 | class Default_Widgets_FooterAction extends SampleAppDefaultBaseAction |
17 | 17 | { |
18 | - /** |
|
19 | - * This Action does not yet serve any Request methods. |
|
20 | - * When a request comes in and this Action is used, execution will be skipped |
|
21 | - * and the View returned by getDefaultViewName() will be used. |
|
22 | - * |
|
23 | - * If an Action has an execute() method, this means it serves all methods. |
|
24 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | - * because "read" and "write" are the default names for Web Request methods. |
|
26 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | - * |
|
28 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | - * performed prior to execution. |
|
30 | - * |
|
31 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | - * when a POST request comes in, which is mapped to the "write" method by |
|
33 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | - * add the new product to the database there, while for GET (o.e. "read") |
|
35 | - * requests, execution would be skipped, and the View name would be determined |
|
36 | - * using getDefaultViewName(). |
|
37 | - * |
|
38 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | - * "catchall" execute(). |
|
40 | - * |
|
41 | - * Besides execute() and execute*(), there are other methods that might either |
|
42 | - * be generic or specific to a request method. These are: |
|
43 | - * registerValidators() and register*Validators() |
|
44 | - * validate() and validate*() |
|
45 | - * handleError() and handle*Error() |
|
46 | - * |
|
47 | - * The execution of these methods is not dependent on the respective specific |
|
48 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | - * be run even if there is no executeWrite() method. |
|
50 | - */ |
|
18 | + /** |
|
19 | + * This Action does not yet serve any Request methods. |
|
20 | + * When a request comes in and this Action is used, execution will be skipped |
|
21 | + * and the View returned by getDefaultViewName() will be used. |
|
22 | + * |
|
23 | + * If an Action has an execute() method, this means it serves all methods. |
|
24 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | + * because "read" and "write" are the default names for Web Request methods. |
|
26 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | + * |
|
28 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | + * performed prior to execution. |
|
30 | + * |
|
31 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | + * when a POST request comes in, which is mapped to the "write" method by |
|
33 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | + * add the new product to the database there, while for GET (o.e. "read") |
|
35 | + * requests, execution would be skipped, and the View name would be determined |
|
36 | + * using getDefaultViewName(). |
|
37 | + * |
|
38 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | + * "catchall" execute(). |
|
40 | + * |
|
41 | + * Besides execute() and execute*(), there are other methods that might either |
|
42 | + * be generic or specific to a request method. These are: |
|
43 | + * registerValidators() and register*Validators() |
|
44 | + * validate() and validate*() |
|
45 | + * handleError() and handle*Error() |
|
46 | + * |
|
47 | + * The execution of these methods is not dependent on the respective specific |
|
48 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | + * be run even if there is no executeWrite() method. |
|
50 | + */ |
|
51 | 51 | // public function execute(AgaviRequestDataHolder $rd) |
52 | 52 | // { |
53 | 53 | // return 'Success'; |
54 | 54 | // } |
55 | 55 | |
56 | - /** |
|
57 | - * This method returns the View name in case the Action doesn't serve the |
|
58 | - * current Request method. |
|
59 | - * |
|
60 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | - * |
|
62 | - * @return mixed - A string containing the view name associated with this |
|
63 | - * action, or... |
|
64 | - * - An array with two indices: |
|
65 | - * 0. The parent module of the view that will be executed. |
|
66 | - * 1. The view that will be executed. |
|
67 | - * |
|
68 | - */ |
|
69 | - public function getDefaultViewName() |
|
70 | - { |
|
71 | - return 'Success'; |
|
72 | - } |
|
56 | + /** |
|
57 | + * This method returns the View name in case the Action doesn't serve the |
|
58 | + * current Request method. |
|
59 | + * |
|
60 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | + * |
|
62 | + * @return mixed - A string containing the view name associated with this |
|
63 | + * action, or... |
|
64 | + * - An array with two indices: |
|
65 | + * 0. The parent module of the view that will be executed. |
|
66 | + * 1. The view that will be executed. |
|
67 | + * |
|
68 | + */ |
|
69 | + public function getDefaultViewName() |
|
70 | + { |
|
71 | + return 'Success'; |
|
72 | + } |
|
73 | 73 | |
74 | - public function isSimple() |
|
75 | - { |
|
76 | - return true; |
|
77 | - } |
|
74 | + public function isSimple() |
|
75 | + { |
|
76 | + return true; |
|
77 | + } |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | ?> |
81 | 81 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
61 | 61 | * |
62 | - * @return mixed - A string containing the view name associated with this |
|
62 | + * @return string - A string containing the view name associated with this |
|
63 | 63 | * action, or... |
64 | 64 | * - An array with two indices: |
65 | 65 | * 0. The parent module of the view that will be executed. |
@@ -15,66 +15,66 @@ |
||
15 | 15 | |
16 | 16 | class Default_Widgets_HeaderAction extends SampleAppDefaultBaseAction |
17 | 17 | { |
18 | - /** |
|
19 | - * This Action does not yet serve any Request methods. |
|
20 | - * When a request comes in and this Action is used, execution will be skipped |
|
21 | - * and the View returned by getDefaultViewName() will be used. |
|
22 | - * |
|
23 | - * If an Action has an execute() method, this means it serves all methods. |
|
24 | - * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | - * because "read" and "write" are the default names for Web Request methods. |
|
26 | - * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | - * |
|
28 | - * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | - * performed prior to execution. |
|
30 | - * |
|
31 | - * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | - * when a POST request comes in, which is mapped to the "write" method by |
|
33 | - * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | - * add the new product to the database there, while for GET (o.e. "read") |
|
35 | - * requests, execution would be skipped, and the View name would be determined |
|
36 | - * using getDefaultViewName(). |
|
37 | - * |
|
38 | - * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | - * "catchall" execute(). |
|
40 | - * |
|
41 | - * Besides execute() and execute*(), there are other methods that might either |
|
42 | - * be generic or specific to a request method. These are: |
|
43 | - * registerValidators() and register*Validators() |
|
44 | - * validate() and validate*() |
|
45 | - * handleError() and handle*Error() |
|
46 | - * |
|
47 | - * The execution of these methods is not dependent on the respective specific |
|
48 | - * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | - * be run even if there is no executeWrite() method. |
|
50 | - */ |
|
18 | + /** |
|
19 | + * This Action does not yet serve any Request methods. |
|
20 | + * When a request comes in and this Action is used, execution will be skipped |
|
21 | + * and the View returned by getDefaultViewName() will be used. |
|
22 | + * |
|
23 | + * If an Action has an execute() method, this means it serves all methods. |
|
24 | + * Alternatively, you can implement executeRead() and executeWrite() methods, |
|
25 | + * because "read" and "write" are the default names for Web Request methods. |
|
26 | + * Other request methods may be explicitely served via execcuteReqmethname(). |
|
27 | + * |
|
28 | + * Keep in mind that if an Action serves a Request method, validation will be |
|
29 | + * performed prior to execution. |
|
30 | + * |
|
31 | + * Usually, for example for an AddProduct form, your Action should only be run |
|
32 | + * when a POST request comes in, which is mapped to the "write" method by |
|
33 | + * default. Therefor, you'd only implement executeWrite() and put the logic to |
|
34 | + * add the new product to the database there, while for GET (o.e. "read") |
|
35 | + * requests, execution would be skipped, and the View name would be determined |
|
36 | + * using getDefaultViewName(). |
|
37 | + * |
|
38 | + * We strongly recommend to prefer specific executeWhatever() methods over the |
|
39 | + * "catchall" execute(). |
|
40 | + * |
|
41 | + * Besides execute() and execute*(), there are other methods that might either |
|
42 | + * be generic or specific to a request method. These are: |
|
43 | + * registerValidators() and register*Validators() |
|
44 | + * validate() and validate*() |
|
45 | + * handleError() and handle*Error() |
|
46 | + * |
|
47 | + * The execution of these methods is not dependent on the respective specific |
|
48 | + * execute*() being present, e.g. for a "write" Request, validateWrite() will |
|
49 | + * be run even if there is no executeWrite() method. |
|
50 | + */ |
|
51 | 51 | // public function execute(AgaviRequestDataHolder $rd) |
52 | 52 | // { |
53 | 53 | // return 'Success'; |
54 | 54 | // } |
55 | 55 | |
56 | - /** |
|
57 | - * This method returns the View name in case the Action doesn't serve the |
|
58 | - * current Request method. |
|
59 | - * |
|
60 | - * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | - * |
|
62 | - * @return mixed - A string containing the view name associated with this |
|
63 | - * action, or... |
|
64 | - * - An array with two indices: |
|
65 | - * 0. The parent module of the view that will be executed. |
|
66 | - * 1. The view that will be executed. |
|
67 | - * |
|
68 | - */ |
|
69 | - public function getDefaultViewName() |
|
70 | - { |
|
71 | - return 'Success'; |
|
72 | - } |
|
56 | + /** |
|
57 | + * This method returns the View name in case the Action doesn't serve the |
|
58 | + * current Request method. |
|
59 | + * |
|
60 | + * !!!!!!!!!! DO NOT PUT ANY LOGIC INTO THIS METHOD !!!!!!!!!! |
|
61 | + * |
|
62 | + * @return mixed - A string containing the view name associated with this |
|
63 | + * action, or... |
|
64 | + * - An array with two indices: |
|
65 | + * 0. The parent module of the view that will be executed. |
|
66 | + * 1. The view that will be executed. |
|
67 | + * |
|
68 | + */ |
|
69 | + public function getDefaultViewName() |
|
70 | + { |
|
71 | + return 'Success'; |
|
72 | + } |
|
73 | 73 | |
74 | - public function isSimple() |
|
75 | - { |
|
76 | - return true; |
|
77 | - } |
|
74 | + public function isSimple() |
|
75 | + { |
|
76 | + return true; |
|
77 | + } |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | ?> |
81 | 81 | \ No newline at end of file |