Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Intercepting Filter
bela
post
Post #1


Administrator PHPedia.pl


Grupa: Developerzy
Postów: 1 102
Pomógł: 2
Dołączył: 14.09.2003

Ostrzeżenie: (0%)
-----


Powiedzcie mi czy dobrze myśle o tym wzorcu (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Mamy sobie FilterManager, i do niego ładujemy filtry (::addFilter, config xml, nie ważne jak). Filtry mogą się wykonywać przed lub po wykonaniu akcji. Przykład filtra : StartOutputBufferingFilter, AuthorizationFilter, CacheFilter. I na przyklad CacheFilter stwierdza, że mamy swieży cache i czy może on zaprzestać wywoływania akcji ? Albo AuthorizationFilter, wywoła akcje loginForm ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
bela
post
Post #2


Administrator PHPedia.pl


Grupa: Developerzy
Postów: 1 102
Pomógł: 2
Dołączył: 14.09.2003

Ostrzeżenie: (0%)
-----


  1. <?xml version="1.0" ?>
  2. <filters>
  3.    <pre>
  4.        <filter name="DupaFilter" mapping="pl.bela666.odin.filter.DupaFilter" />
  5.    </pre>
  6. </filters>


może tak ? (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 02:31