You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2020. It is now read-only.
Copy file name to clipboardexpand all lines: guide/about.install.md
+2
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ There are a few things you'll want to do with your application before moving int
32
32
3. Turn on APC or some kind of opcode caching.
33
33
This is the single easiest performance boost you can make to PHP itself. The more complex your application, the bigger the benefit of using opcode caching.
34
34
35
+
[!!] Note: The default bootstrap will set Kohana::$environment = $_ENV['KOHANA_ENV'] if set. Docs on how to supply this variable are available in your web server's documentation (e.g. [Apache](http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv), [Lighttpd](http://redmine.lighttpd.net/wiki/1/Docs:ModSetEnv#Options), [Nginx](http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_param)). This is considered better practice than many alternative methods to set Kohana::$enviroment.
36
+
35
37
/**
36
38
* Set the environment string by the domain (defaults to Kohana::DEVELOPMENT).
Copy file name to clipboardexpand all lines: guide/nl/about.install.md
+2
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ Er zijn enkele dingen dat je best doet met je applicatie vooraleer je deze in pr
31
31
Zie onderstaand voorbeeld van Shadowhand's [wingsc.com broncode](http://github.com/shadowhand/wingsc).
32
32
3. Zet APC of een andere soort opcode caching aan. Dit is het enige en eenvoudigste manier om de performantie te verbeteren dat je kunt doen in PHP zelf. Hoe complexer je applicatie, hoe groter het voordeel van opcode caching.
33
33
34
+
[!!] Opmerking: De standaard bootstrap zal Kohana::$environment = $_ENV['KOHANA_ENV'] instellen indien ingesteld. Documentatie hoe je deze variable moet invullen kan je vinden in je webservers documentatie (e.g. [Apache](http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv), [Lighttpd](http://redmine.lighttpd.net/wiki/1/Docs:ModSetEnv#Options), [Nginx](http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_param))). Deze manier wordt als beste beschouwd in vergelijking met de alternatieve manieren om Kohana::$environment in te stellen.
35
+
34
36
/**
35
37
* Stel de omgeving in aan de hand van het domein (standaard Kohana::DEVELOPMENT).
Copy file name to clipboardexpand all lines: guide/nl/about.kohana.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,6 @@ Alles kan worden uitgebreid door het unieke design van het [filesystem](about.fi
10
10
11
11
Om je te helpen je applicatie te beveiligen zijn er tools voor [XSS te verwijderen](security.xss), [input validatie](security.validation), [gesigneerde cookies](security.cookies), [formulieren](security.forms) en [HTML](security.html) generators toegevoegd aan het systeem. De [database](security.database) layer voorkomt [SQL injectie](http://wikipedia.org/wiki/SQL_Injection). En natuurlijk, alle officiële code is met zorg geschreven en herbekeken inzake veiligheid.
12
12
13
-
## Deze documentatie trekt nergens op!
13
+
## Vul mee deze documentatie aan
14
14
15
-
We zijn keihard en volop bezig om je van een complete documentatie te voorzien. Indien je problemen ondervindt bij het zoeken van een antwoord, bekijk dan de [onofficiële wiki (en)](http://kerkness.ca/wiki/doku.php). Als je iets wilt toevoegen of wijzigen in de documentatie, gelieve dan [de gebruiksaanwijzing te forken](http://github.com/kohana/userguide), uw veranderingen te maken, en een pull request zenden. Als je nog geen ervaring hebt met git kan je altijd een [feature request](http://dev.kohanaframework.org/projects/kohana3/issues) aanmaken (vereist registratie).
15
+
We zijn keihard en volop bezig om je van een complete documentatie te voorzien. Om deze documentatie te helpen verbeteren, gelieve dan de userguide te [forken](http://github.com/kohana/userguide), uw aanpassingen te doen en een pull request te sturen. Als je nog geen ervaring hebt met git kan je altijd een [feature request](http://dev.kohanaframework.org/projects/kohana3/issues) aanmaken (vereist registratie).
Copy file name to clipboardexpand all lines: guide/nl/tutorials.orm.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ ORM ondersteunt de meeste krachtige [Database] methoden voor het doorzoeken van
70
70
71
71
// Dit zal alle gebruikers nemen met de naam Bob
72
72
$users = ORM::factory('user')
73
-
...
73
+
->where('name', '=', 'Bob')
74
74
->find_all();
75
75
76
76
Wanneer je een lijst van modellen ontvangt met behulp van [ORM::find_all], kan je deze doorlopen zoals je doet met database resultaten:
@@ -83,7 +83,7 @@ Wanneer je een lijst van modellen ontvangt met behulp van [ORM::find_all], kan j
83
83
Een zeer handige functie van ORM is de [ORM::as_array] methode die het record zal teruggeven als een array. Indien je dit gebruikt met [ORM::find_all], zal een array van alle records worden teruggegeven. Een goed voorbeeld van wanneer dit nuttig is, is voor select in het HTML formulier:
84
84
85
85
// Toon een dropdown/select met daarin alle gebruikersnamen (id als value van de options)
@@ -156,19 +156,19 @@ Je kan meerdere records tegelijk veranderen met de [ORM::save_all] methode:
156
156
157
157
De `_updated_column` en `_created_column` members staan ter beschikking om automatisch aangepast te worden wanneer een model wordt gecreëerd of aangepast. Ze worden standaard niet gebruikt. Om ze te gebruiken:
158
158
159
-
// date_created is de kolom die wordt gebruikt om de aanmaak datum op te slaan. Gebruik TRUE om een timestamp op te slaan
// date_modified is de kolom die wordt gebruikt om de datum op te slaan wanneer het item is aangepast. In dit geval wordt een string gebruikt om een date() formaat te specificeren
Records worden verwijderd met [ORM::delete] en [ORM::delete_all]. Deze methoden werken op dezelfde manier als het opslaan van records zoals hierboven beschreven, met de uitzondering dat [ORM::delete] nog een optionele parameter heeft, het `id` van het record om te verwijderen. Anders wordt het huidig ingeladen record verwijderd.
168
168
169
169
### Relaties
170
170
171
-
ORM ondersteunt zeer goed relateies. Ruby heeft een goede tutorial omtrent relaties op [http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html](http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html)
171
+
ORM ondersteunt zeer goed relateies. Ruby heeft een [goede tutorial omtrent relaties](http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html).
Copy file name to clipboardexpand all lines: guide/nl/using.sessions.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Het verwijderen van sessie- of cookie-gegevens wordt gedaan met behulp van de `d
78
78
79
79
Zowel cookies als sessies hebben verschillende configuratie-instellingen die van invloed zijn hoe gegevens worden opgeslagen. Controleer altijd deze instellingen voordat u uw applicatie live zet, omdat veel van die instellingen een rechtstreeks effect zal hebben op de veiligheid van uw applicatie.
80
80
81
-
## Cookie Instellingen
81
+
## Cookie Instellingen {#cookie-settings}
82
82
83
83
Al de cookie instellingen worden verandert met behulp van statische properties. Je kan deze instellingen veranderen in `bootstrap.php` of door een [class extension](using.autoloading#class-extension) te gebruiken.
Copy file name to clipboardexpand all lines: guide/tutorials.orm.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ ORM supports most of the [Database] methods for powerful searching of your model
72
72
$users = ORM::factory('user')
73
73
->where('name', '=', 'Bob')
74
74
->find_all();
75
-
75
+
76
76
When you are retrieving a list of models using [ORM::find_all], you can iterate through them as you do with database results:
77
77
78
78
foreach ($users as $user)
@@ -104,10 +104,10 @@ If you wish to count the total number of users for a given query, while only ret
104
104
105
105
### Accessing Model Properties
106
106
107
-
All model properties are accessible using the `__get` and `__set` magic methods.
107
+
All model properties are accessible using the `__get` and `__set` magic methods.
108
108
109
109
$user = ORM::factory('user', 5);
110
-
110
+
111
111
// Output user name
112
112
echo $user->name;
113
113
@@ -157,10 +157,10 @@ You can update multiple records by using the [ORM::save_all] method:
157
157
The `_updated_column` and `_created_column` members are provided to automatically be updated when a model is updated and created. These are not used by default. To use them:
158
158
159
159
// date_created is the column used for storing the creation date. Use format => TRUE to store a timestamp.
The foreign key should be overridden in both the student and school models.
200
200
201
201
#### Has-One
@@ -239,7 +239,7 @@ To access the related objects, use:
239
239
$class->students->find_all();
240
240
241
241
### Validation
242
-
242
+
243
243
ORM is integrated tightly with the [Validate] library. The ORM provides the following members for validation:
244
244
245
245
*_rules
@@ -248,7 +248,7 @@ ORM is integrated tightly with the [Validate] library. The ORM provides the foll
248
248
*_labels
249
249
250
250
#### `_rules`
251
-
251
+
252
252
protected $_rules = array
253
253
(
254
254
'username' => array('not_empty' => array()),
@@ -258,7 +258,7 @@ ORM is integrated tightly with the [Validate] library. The ORM provides the foll
258
258
`username` will be checked to make sure it's not empty. `email` will be checked to also ensure it is a valid email address. The empty arrays passed as values can be used to provide optional additional parameters to these validate method calls.
259
259
260
260
#### `_callbacks`
261
-
261
+
262
262
protected $_callbacks = array
263
263
(
264
264
'username' => array('username_unique'),
@@ -281,7 +281,7 @@ ORM is integrated tightly with the [Validate] library. The ORM provides the foll
281
281
);
282
282
283
283
`TRUE` indicates that the `trim` filter is to be used on all fields. `username` will be filtered through `stripslashes` before it is validated. The empty arrays passed as values can be used to provide additional parameters to these filter method calls.
284
-
284
+
285
285
#### Checking if the Object is Valid
286
286
287
287
Use [ORM::check] to see if the object is currently valid.
Copy file name to clipboardexpand all lines: guide/using.messages.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Message Basics
2
2
3
-
Kohana messages are human friendly strings represented by a shorter word or phrase, called a "key". Messages are accessed using the [Kohana::message] method, which an return either an entire group of messages, or a single message.
3
+
Kohana messages are human friendly strings represented by a shorter word or phrase, called a "key". Messages are accessed using the [Kohana::message] method, which returns either an entire group of messages, or a single message.
4
4
5
5
As an example, when a user is not logged in and attempts to access a page that requires authentication, an error such as "You must be logged in to access this page" might be displayed. This message could be stored in the `auth` file with a `must_login` key:
0 commit comments