Pluf Framework

Pluf Framework Commit Details


Date:2009-01-03 15:04:08 (16 years 4 months ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:5bd706559eb5989c50209a2c535b3c11bc905163
Parents: 6dfaa8c63a048e9f0c9371a3f62aedfcc718fc5b
Message:Added the ability to pass static parameters to a precondition function.

For example, you can now put:

public $view_precond = array(('Pluf_Precondition::hasPerm', 'MyApp.my-perm'));

This will run the hasPerm method with the request object as first
parameter and the string 'MyApp.my-perm' as second parameter.
Changes:

File differences

src/Pluf/Dispatcher.php
108108
109109
110110
111
111
112
113
114
115
116
112117
113118
114119
                            $preconds = array($preconds);
                        }
                        foreach ($preconds as $precond) {
                            $res = call_user_func(explode('::', $precond), $req);
                            if (!is_array($precond)) {
                                $res = call_user_func(explode('::', $precond), $req);
                            } else {
                                $res = call_user_func(explode('::', $precond[0]),
                                                      $req, array_slice($precond, 1));
                            }
                            if ($res !== true) {
                                return $res;
                            }

Archive Download the corresponding diff file

Branches

Tags

Number of commits:
Page rendered in 0.20938s using 13 queries.