Permalink
Browse files

Merge branch '3.1/develop' into 3.2/develop

  • Loading branch information...
2 parents a7ee616 + 3120e8b commit c2581f32e20e4a26a538bfdaf56f354be98771a0 @Zeelot Zeelot committed Jun 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 guide/kohana/extension.md
@@ -54,7 +54,7 @@ Now calling `Cookie::encrypt('secret', $data)` will create an encrypted cookie w
## How it works
-To understand how this works, let's look at what happens normally. When you use the Cookie class, [Kohana::autoload] looks for `classes/cookie.php` in the [cascading filesystem](files). It looks in `application`, then each module, then `system`. The file is found in `system` and is included. Of coures, `system/classes/cookie.php` is just an empty class which extends `Kohana_Cookie`. Again, [Kohana::autoload] is called this time looking for `classes/kohana/cookie.php` which it finds in `system`.
+To understand how this works, let's look at what happens normally. When you use the Cookie class, [Kohana::autoload] looks for `classes/cookie.php` in the [cascading filesystem](files). It looks in `application`, then each module, then `system`. The file is found in `system` and is included. Of course, `system/classes/cookie.php` is just an empty class which extends `Kohana_Cookie`. Again, [Kohana::autoload] is called this time looking for `classes/kohana/cookie.php` which it finds in `system`.
When you add your transparently extended cookie class at `application/classes/cookie.php` this file essentially "replaces" the file at `system/classes/cookie.php` without actually touching it. This happens because this time when we use the Cookie class [Kohana::autoload] looks for `classes/cookie.php` and finds the file in `application` and includes that one, instead of the one in system.

0 comments on commit c2581f3

Please sign in to comment.