diff --git a/docs/bg/3.1/annotations.md b/docs/bg/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/bg/3.1/annotations.md
+++ b/docs/bg/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/bg/3.1/cache.md b/docs/bg/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/bg/3.1/cache.md
+++ b/docs/bg/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/bg/3.1/sidebar.md b/docs/bg/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/bg/3.1/sidebar.md
+++ b/docs/bg/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/bs/3.1/acl.md b/docs/bs/3.1/acl.md
index cf7330e90967..d58f9122fcee 100644
--- a/docs/bs/3.1/acl.md
+++ b/docs/bs/3.1/acl.md
@@ -1,39 +1,39 @@
-
- Erişim Kontrol Listeleri
@@ -42,17 +42,17 @@
-# Erişim Kontrol Listeleri (ACL)
+# Access Control Lists (ACL)
-`Phalcon\Acl` ACL ve bunlara bağlı izinleri kolay ve hafif bir şekilde yönetmenizi sağlar. [Erişim Kontrol Listeleri](http://en.wikipedia.org/wiki/Access_control_list) (ACL) bir uygulamanın kendi alanlarına ve temel alınan nesneleri isteklerden denetlemesine izin verir. ACL metodolojisi hakkında daha fazla bilgi edinmeniz ve böylece kavramlarıyla aşina olmanız önerilir.
+`Phalcon\Acl` provides an easy and lightweight management of ACLs as well as the permissions attached to them. [Access Control Lists](http://en.wikipedia.org/wiki/Access_control_list) (ACL) allow an application to control access to its areas and the underlying objects from requests. You are encouraged to read more about the ACL methodology so as to be familiar with its concepts.
-Özetlemek gerekirse, ACL'lerin rolleri ve kaynakları vardır. Kaynaklar, ACL'ler tarafından tanımlanan izinlere uyan nesnelerdir. Roller, kaynaklara erişim isteyen nesnelerdir ve ACL mekanizması tarafından erişime izin verilebilir veya erişim engellenebilir.
+In summary, ACLs have roles and resources. Resources are objects which abide by the permissions defined to them by the ACLs. Roles are objects that request access to resources and can be allowed or denied access by the ACL mechanism.
-## ACL Oluşturma
+## Creating an ACL
-Bu bileşen başlangıçta bellekte çalışmak üzere tasarlanmıştır. Bu, kullanım kolaylığı sağlar ve listenin her alanına erişirken hızlanır. `Phalcon\Acl` yapılandırıcı, ilk parametresi olarak kontrol listesiyle ilgili bilgileri almak için kullanılan bir bağdaştırıcı alır. Bellek adaptörünü kullanan bir örnek aşağıda verilmiştir:
+This component is designed to initially work in memory. This provides ease of use and speed in accessing every aspect of the list. The `Phalcon\Acl` constructor takes as its first parameter an adapter used to retrieve the information related to the control list. An example using the memory adapter is below:
```php
setDefaultAction(
Acl::DENY
);
@@ -77,44 +77,44 @@ $acl->setDefaultAction(
-## ACL'ye Rol Ekleme
+## Adding Roles to the ACL
-Bir rol, erişim listesindeki belirli kaynaklara erişebilen veya erişemeyen bir nesnedir. Örnek olarak, rolleri bir organizasyon içerisindeki gruplar olarak tanımlayacağız. `Phalcon\Acl\Role` sınıfı, daha yapılandırılmış bir şekilde roller oluşturmak için kullanılabilir. Yakın zamanda oluşturulmuş listemize bazı roller ekleyelim:
+A role is an object that can or cannot access certain resources in the access list. As an example, we will define roles as groups of people in an organization. The `Phalcon\Acl\Role` class is available to create roles in a more structured way. Let's add some roles to our recently created list:
```php
addRole($roleGuests);
-// ACL'ye Phalcon\Acl\Role kullanmadan 'Tasarımcılar' rolü ekle
-$acl->addRole('Tasarımcılar');
+// Add 'Designers' role to ACL without a Phalcon\Acl\Role
+$acl->addRole('Designers');
```
-Görebildiğiniz gibi, roller bir örnek kullanmadan doğrudan tanımlanır.
+As you can see, roles are defined directly without using an instance.
-## Kaynakları Ekleme
+## Adding Resources
-Kaynaklar, erişimin kontrol edildiği nesnelerdir. Normalde MVC uygulamalarında kaynaklar denetleyicileri gösterir. Bu zorunlu olmasa da, `Phalcon\Acl\Resource` sınıfı kaynakları tanımlamada kullanılabilir. ACL'nin kontrol etmesi gereken şeyi anlaması için bir kaynağa ilgili işlemler veya işlemler eklemek önemlidir.
+Resources are objects where access is controlled. Normally in MVC applications resources refer to controllers. Although this is not mandatory, the `Phalcon\Acl\Resource` class can be used in defining resources. It's important to add related actions or operations to a resource so that the ACL can understand what it should to control.
```php
addResource(
$customersResource,
@@ -132,79 +132,79 @@ $acl->addResource(
-## Erişim Kontrolleri Tanımlama
+## Defining Access Controls
-Artık roller ve kaynaklara sahibiz, şimdi ACL'yi tanımlama zamanı geldi (yani hangi rollerin hangi kaynaklara erişebileceğini). Bu bölüm, özellikle varsayılan erişim düzeyiniz `izin vermek` veya `reddetmek` olarak dikkate alırsak çok önemlidir.
+Now that we have roles and resources, it's time to define the ACL (i.e. which roles can access which resources). This part is very important especially taking into consideration your default access level `allow` or `deny`.
```php
allow('Ziyaretçiler', 'Müşteriler', 'search');
+$acl->allow('Guests', 'Customers', 'search');
-$acl->allow('Ziyaretçiler', 'Müşteriler', 'create');
+$acl->allow('Guests', 'Customers', 'create');
-$acl->deny('Ziyaretçiler', 'Müşteriler', 'update');
+$acl->deny('Guests', 'Customers', 'update');
```
-`allow()` yöntemi, belirli bir role belirli bir kaynağa erişim izni verdiğini belirtir. `deny()` yöntemi tersini yapar.
+The `allow()` method designates that a particular role has granted access to a particular resource. The `deny()` method does the opposite.
-## ACL Sorgulama
+## Querying an ACL
-Liste tamamen tanımlandıktan sonra bir role belirli bir izin verilip verilmediğini kontrol etmek için sorgulayabiliriz.
+Once the list has been completely defined. We can query it to check if a role has a given permission or not.
```php
isAllowed('Ziyaretçiler', 'Müşteriler', 'edit');
+// Returns 0
+$acl->isAllowed('Guests', 'Customers', 'edit');
-// Geriye 1 döner
-$acl->isAllowed('Ziyaretçiler', 'Müşteriler', 'search');
+// Returns 1
+$acl->isAllowed('Guests', 'Customers', 'search');
-// Geriye 1 döner
-$acl->isAllowed('Ziyaretçiler', 'Müşteriler', 'create');
+// Returns 1
+$acl->isAllowed('Guests', 'Customers', 'create');
```
-## Fonksiyona Dayalı Erişim
+## Function based access
-Ayrıca, 4'üncü parametre olarak boolean değerini döndüren özel işlevinizi ekleyebilirsiniz. `isAllowed()` yöntemini kullandığınızda çağrılır. Parametreleri ilişkisel dizi olarak `isAllowed()` yöntemine 4. argüman olarak aktarabilirsiniz, burada anahtar tanımlı işlevimizdeki parametre adıdır.
+Also you can add as 4th parameter your custom function which must return boolean value. It will be called when you use `isAllowed()` method. You can pass parameters as associative array to `isAllowed()` method as 4th argument where key is parameter name in our defined function.
```php
allow(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search',
function ($a) {
return $a % 2 === 0;
}
);
-// Rolün, özel fonksiyonla işleme erişimi olup olmadığını kontrol edin
+// Check whether role has access to the operation with custom function
-// Geriye true döner
+// Returns true
$acl->isAllowed(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search',
[
'a' => 4,
]
);
-// Geriye false döner
+// Returns false
$acl->isAllowed(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search',
[
'a' => 3,
@@ -212,58 +212,58 @@ $acl->isAllowed(
);
```
-Ayrıca `isAllowed()` yönteminde herhangi bir parametre sağlamazsanız, varsayılan davranış `Acl::ALLOW` olacaktır. Bunu `setNoArgumentsDefaultAction()` yöntemi kullanarak değiştirebilirsiniz.
+Also if you don't provide any parameters in `isAllowed()` method then default behaviour will be `Acl::ALLOW`. You can change it by using method `setNoArgumentsDefaultAction()`.
```php
use Phalcon\Acl;
allow(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search',
function ($a) {
return $a % 2 === 0;
}
);
-// Rolün, özel fonksiyonla işleme erişimi olup olmadığını kontrol edin
+// Check whether role has access to the operation with custom function
// Returns true
$acl->isAllowed(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search'
);
-// Argümanları değiştirme varsayılan eylem
+// Change no arguments default action
$acl->setNoArgumentsDefaultAction(
Acl::DENY
);
-// Geriye false döner
+// Returns false
$acl->isAllowed(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search'
);
```
-## Rol adı ve kaynak adı olan nesneler
+## Objects as role name and resource name
-Nesneleri `roleName` ve `resourceName` olarak geçirebilirsiniz. `roleName` için `Phalcon\Acl\RoleAware` sınıfı ve `resourceName` için `Phalcon\Acl\ResourceAware` sınıfları uygulanmalıdır.
+You can pass objects as `roleName` and `resourceName`. Your classes must implement `Phalcon\Acl\RoleAware` for `roleName` and `Phalcon\Acl\ResourceAware` for `resourceName`.
-`UserRole` sınıfımız
+Our `UserRole` class
```php
id;
}
- // RoleAware arabiriminden uygulanan fonksiyon
+ // Implemented function from RoleAware Interface
public function getRoleName()
{
return $this->roleName;
@@ -289,14 +289,14 @@ class UserRole implements RoleAware
}
```
-Ve bizim `ModelResource` sınıfımız
+And our `ModelResource` class
```php
userId;
}
- // ResourceAware Arabiriminden uygulanan fonksiyon
+ // Implemented function from ResourceAware Interface
public function getResourceName()
{
return $this->resourceName;
@@ -330,7 +330,7 @@ class ModelResource implements ResourceAware
}
```
-Sonra onları `isAllowed()` yönteminde kullanabilirsiniz.
+Then you can use them in `isAllowed()` method.
```php
allow('Ziyaretçiler', 'Müşteriler', 'search');
-$acl->allow('Ziyaretçiler', 'Müşteriler', 'create');
-$acl->deny('Ziyaretçiler', 'Müşteriler', 'update');
+// Set access level for role into resources
+$acl->allow('Guests', 'Customers', 'search');
+$acl->allow('Guests', 'Customers', 'create');
+$acl->deny('Guests', 'Customers', 'update');
-// roleName ve resourceName sağlayarak nesnelerimizi oluştur
+// Create our objects providing roleName and resourceName
$customer = new ModelResource(
1,
- 'Müşteriler',
+ 'Customers',
2
);
$designer = new UserRole(
1,
- 'Tasarımcılar'
+ 'Designers'
);
$guest = new UserRole(
2,
- 'Ziyaretçiler'
+ 'Guests'
);
$anotherGuest = new UserRole(
3,
- 'Ziyaretçiler'
+ 'Guests'
);
-// Kullanıcı nesnelerinizin model nesnesindeki işleme erişimi olup olmadığını kontrol edin
+// Check whether our user objects have access to the operation on model object
-// Geriye false döner
+// Returns false
$acl->isAllowed(
$designer,
$customer,
'search'
);
-// Geriye true döner
+// Returns true
$acl->isAllowed(
$guest,
$customer,
'search'
);
-// Geriye true döner
+// Returns true
$acl->isAllowed(
$anotherGuest,
$customer,
@@ -390,7 +390,7 @@ $acl->isAllowed(
);
```
-Ayrıca, bu nesnelere özel fonksiyonunuzdaki `allow()` veya `deny()` içinde erişebilirsiniz. Bunlar otomatik olarak fonksiyon türüne göre parametrelere bağlanırlar.
+Also you can access those objects in your custom function in `allow()` or `deny()`. They are automatically bind to parameters by type in function.
```php
allow(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'search',
- function (UserRole $user, ModelResource $model) { // Kullanıcı ve Model sınıfları gereklidir
+ function (UserRole $user, ModelResource $model) { // User and Model classes are necessary
return $user->getId == $model->getUserId();
}
);
$acl->allow(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'create'
);
$acl->deny(
- 'Ziyaretçiler',
- 'Müşteriler',
+ 'Guests',
+ 'Customers',
'update'
);
-// roleName ve resourceName sağlayarak nesnelerimizi oluştur
+// Create our objects providing roleName and resourceName
$customer = new ModelResource(
1,
- 'Müşteriler',
+ 'Customers',
2
);
$designer = new UserRole(
1,
- 'Tasarımcılar'
+ 'Designers'
);
$guest = new UserRole(
2,
- 'Ziyaretçiler'
+ 'Guests'
);
$anotherGuest = new UserRole(
3,
- 'Ziyaretçiler'
+ 'Guests'
);
-// Kullanıcı nesnelerinizin model nesnesindeki işleme erişimi olup olmadığını kontrol edin
+// Check whether our user objects have access to the operation on model object
-// Geriye false döner
+// Returns false
$acl->isAllowed(
$designer,
$customer,
'search'
);
-// Geriye true döner
+// Returns true
$acl->isAllowed(
$guest,
$customer,
'search'
);
-// Geriye false döner
+// Returns false
$acl->isAllowed(
$anotherGuest,
$customer,
@@ -467,13 +467,13 @@ $acl->isAllowed(
);
```
-Fonksiyon ve ilişkisel diziyi `isAllowed()` yönteminde geçirmek için herhangi bir özel parametre ekleyebilirsiniz. Ayrıca sırası önemli değil.
+You can still add any custom parameters to function and pass associative array in `isAllowed()` method. Also order doesn't matter.
-## Rollerin Kalıtımı
+## Roles Inheritance
-`Phalcon\Acl\Role` sınıfının sağladığı kalıtımı kullanarak karmaşık rol yapıları oluşturabilirsiniz. Roller diğer rollerden miras kalabilir, böylece üst sınıflara veya kaynak alt kümelerine erişime izin verebilir. Rol kalıtımını kullanmak için, devredilen rolü, listede bu rolü eklerken yöntem çağrısının ikinci parametresi olarak iletmeniz gerekir.
+You can build complex role structures using the inheritance that `Phalcon\Acl\Role` provides. Roles can inherit from other roles, thus allowing access to supersets or subsets of resources. To use role inheritance, you need to pass the inherited role as the second parameter of the method call, when adding that role in the list.
```php
addRole($roleGuests);
-// Erişimlere 'Misafirler' rolünden miras kalan 'Yöneticiler' rolünü ekleyin
+// Add 'Administrators' role inheriting from 'Guests' its accesses
$acl->addRole($roleAdmins, $roleGuests);
```
-## ACL Listelerini Seri Hale Getirme
+## Serializing ACL lists
-Performansı artırmak için `Phalcon\Acl` örnekleri APC, oturum, metin dosyaları veya bir veritabanı tablosunda serileştirilebilir ve saklanabilir, böylece tüm listeyi yeniden tanımlamanıza gerek kalmadan yüklenebilirler. Bunu şu şekilde yapabilirsiniz:
+To improve performance `Phalcon\Acl` instances can be serialized and stored in APC, session, text files or a database table so that they can be loaded at will without having to redefine the whole list. You can do that as follows:
```php
isAllowed('Ziyaretçiler', 'Müşteriler', 'edit')) {
- echo 'Erişim izni verildi!';
+// Use ACL list as needed
+if ($acl->isAllowed('Guests', 'Customers', 'edit')) {
+ echo 'Access granted!';
} else {
- echo 'Erişim reddedildi :(';
+ echo 'Access denied :(';
}
```
-Geliştirme sırasında Memory adaptörünü kullanmanız ve canlı ortamda diğer adaptörlerden birini kullanmanız önerilir.
+It's recommended to use the Memory adapter during development and use one of the other adapters in production.
-## Olaylar
+## Events
-`Phalcon\Acl` varsa olayları `EventsManager`'a gönderebilir. Olaylar 'acl' türünü kullanarak tetiklenir. Boolean false döndürürken bazı olaylar etkin işlemi durdurabilir. Aşağıdaki olaylar desteklenmektedir:
+`Phalcon\Acl` is able to send events to an `EventsManager` if it's present. Events are triggered using the type 'acl'. Some events when returning boolean false could stop the active operation. The following events are supported:
-| Olay Adı | Tetiklendi | İşlemi durdurabilir mi? |
-| ----------------- | ------------------------------------------------------------------------ |:-----------------------:|
-| beforeCheckAccess | Bir rol/kaynağa erişim olup olmadığını kontrol etmeden önce tetiklenir | Evet |
-| afterCheckAccess | Bir rol/kaynağa erişim olup olmadığını kontrol ettikten sonra tetiklenir | Hayır |
+| Event Name | Triggered | Can stop operation? |
+| ----------------- | ------------------------------------------------------- |:-------------------:|
+| beforeCheckAccess | Triggered before checking if a role/resource has access | Yes |
+| afterCheckAccess | Triggered after checking if a role/resource has access | No |
-Aşağıdaki örnek, dinleyicilerin bu bileşene nasıl ekleneceğini göstermektedir:
+The following example demonstrates how to attach listeners to this component:
```php
attach(
'acl:beforeCheckAccess',
function (Event $event, $acl) {
@@ -575,15 +575,15 @@ $eventsManager->attach(
$acl = new AclList();
-// $acl değişkenini ayarla
+// Setup the $acl
// ...
-// eventsManager öğesini ACL bileşenine bağlayın
+// Bind the eventsManager to the ACL component
$acl->setEventsManager($eventsManager);
```
-## Kendi Bağdaştırıcılarını Uygulama
+## Implementing your own adapters
-`Phalcon\Acl\AdapterInterface` arabirimi kendi ACL bağdaştırıcıları oluşturmak veya mevcut olanları genişletmek için uygulanması gerekir.
\ No newline at end of file
+The `Phalcon\Acl\AdapterInterface` interface must be implemented in order to create your own ACL adapters or extend the existing ones.
\ No newline at end of file
diff --git a/docs/bs/3.1/annotations.md b/docs/bs/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/bs/3.1/annotations.md
+++ b/docs/bs/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/bs/3.1/cache.md b/docs/bs/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/bs/3.1/cache.md
+++ b/docs/bs/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/bs/3.1/sidebar.md b/docs/bs/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/bs/3.1/sidebar.md
+++ b/docs/bs/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/cs/3.1/annotations.md b/docs/cs/3.1/annotations.md
index eb1a90e0d2bb..abca4c9db6c2 100644
--- a/docs/cs/3.1/annotations.md
+++ b/docs/cs/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Parser anotací
+ -
+ Factory
+
-
Čtení anotací
@@ -124,9 +127,44 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
-## Reading Annotations
+## Čtení anotací
A reflector is implemented to easily get the annotations defined on a class using an object-oriented interface:
@@ -162,7 +200,7 @@ The annotation reading process is very fast, however, for performance reasons it
-## Types of Annotations
+## Typy anotací
Annotations may have parameters or not. A parameter could be a simple literal (strings, number, boolean, null), an array, a hashed list or other annotation:
@@ -221,7 +259,7 @@ Annotations may have parameters or not. A parameter could be a simple literal (s
-## Practical Usage
+## Praktické využití
Next we will explain some practical examples of annotations in PHP applications:
@@ -406,7 +444,7 @@ class SecurityAnnotationsPlugin extends Plugin
-## Annotations Adapters
+## Anotační adaptéry
This component makes use of adapters to cache or no cache the parsed and processed annotations thus improving the performance or providing facilities to development/testing:
@@ -425,6 +463,6 @@ The `Phalcon\Annotations\AdapterInterface` interface must be implemented in orde
-## External Resources
+## Externí zdroje
- [Tutorial: Creating a custom model's initializer with Annotations](https://blog.phalconphp.com/post/tutorial-creating-a-custom-models-initializer)
\ No newline at end of file
diff --git a/docs/cs/3.1/cache.md b/docs/cs/3.1/cache.md
index 34a54a4a9815..24f1e7097696 100644
--- a/docs/cs/3.1/cache.md
+++ b/docs/cs/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/cs/3.1/sidebar.md b/docs/cs/3.1/sidebar.md
index 35c8aeb942b3..ddf5dcef3d14 100644
--- a/docs/cs/3.1/sidebar.md
+++ b/docs/cs/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relace](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validátory](/[[language]]/[[version]]/db-models-validators)
+ - [Validátory](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Frontend
diff --git a/docs/de/3.1/annotations.md b/docs/de/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/de/3.1/annotations.md
+++ b/docs/de/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/de/3.1/cache.md b/docs/de/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/de/3.1/cache.md
+++ b/docs/de/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/de/3.1/sidebar.md b/docs/de/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/de/3.1/sidebar.md
+++ b/docs/de/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/el/3.1/annotations.md b/docs/el/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/el/3.1/annotations.md
+++ b/docs/el/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/el/3.1/cache.md b/docs/el/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/el/3.1/cache.md
+++ b/docs/el/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/el/3.1/sidebar.md b/docs/el/3.1/sidebar.md
index a65e99bbe44c..61124fe3f039 100644
--- a/docs/el/3.1/sidebar.md
+++ b/docs/el/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Μεταδεδομένα](/[[language]]/[[version]]/db-models-metadata)
- [Σχέσεις](/[[language]]/[[version]]/db-models-relationships)
- [Συναλλαγές](/[[language]]/[[version]]/db-models-transactions)
- - [Επικυρωτές](/[[language]]/[[version]]/db-models-validators)
+ - [Επικυρωτές](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/es/3.1/annotations.md b/docs/es/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/es/3.1/annotations.md
+++ b/docs/es/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/es/3.1/cache.md b/docs/es/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/es/3.1/cache.md
+++ b/docs/es/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/es/3.1/sidebar.md b/docs/es/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/es/3.1/sidebar.md
+++ b/docs/es/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/fr/3.1/annotations.md b/docs/fr/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/fr/3.1/annotations.md
+++ b/docs/fr/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/fr/3.1/cache.md b/docs/fr/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/fr/3.1/cache.md
+++ b/docs/fr/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/fr/3.1/sidebar.md b/docs/fr/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/fr/3.1/sidebar.md
+++ b/docs/fr/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/hu/3.1/annotations.md b/docs/hu/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/hu/3.1/annotations.md
+++ b/docs/hu/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/hu/3.1/cache.md b/docs/hu/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/hu/3.1/cache.md
+++ b/docs/hu/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/hu/3.1/sidebar.md b/docs/hu/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/hu/3.1/sidebar.md
+++ b/docs/hu/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/id/3.1/acl.md b/docs/id/3.1/acl.md
index 26b0512a3f30..d58f9122fcee 100644
--- a/docs/id/3.1/acl.md
+++ b/docs/id/3.1/acl.md
@@ -1,12 +1,12 @@
-
- Listes de contrôle d'accès (Access Control Lists)
+ Access Control Lists
-
- Création d’une ACL
+ Creating an ACL
-
- Ajout de rôles à l’ACL
+ Adding Roles to the ACL
-
Adding Resources
@@ -15,7 +15,7 @@
Defining Access Controls
-
- Interroger une ACL
+ Querying an ACL
-
Function based access
@@ -42,15 +42,15 @@
-# Listes de contrôle d'accès (Access Control Lists)
+# Access Control Lists (ACL)
-`Phalcon\Acl` fournit une gestion simple et légère des ACLs ainsi que les autorisations qui leur sont associées. Les listes de contrôle d'accès [Access Control Lists](http://en.wikipedia.org/wiki/Access_control_list) (ACL) permettent à une application de contrôler l'accès à ses zones et aux objets sous-jacents à partir des requêtes. Nous vous encourageons à lire davantage sur la méthodologie ACL afin de connaître ses concepts.
+`Phalcon\Acl` provides an easy and lightweight management of ACLs as well as the permissions attached to them. [Access Control Lists](http://en.wikipedia.org/wiki/Access_control_list) (ACL) allow an application to control access to its areas and the underlying objects from requests. You are encouraged to read more about the ACL methodology so as to be familiar with its concepts.
In summary, ACLs have roles and resources. Resources are objects which abide by the permissions defined to them by the ACLs. Roles are objects that request access to resources and can be allowed or denied access by the ACL mechanism.
-## Création d’une ACL
+## Creating an ACL
This component is designed to initially work in memory. This provides ease of use and speed in accessing every aspect of the list. The `Phalcon\Acl` constructor takes as its first parameter an adapter used to retrieve the information related to the control list. An example using the memory adapter is below:
diff --git a/docs/id/3.1/annotations.md b/docs/id/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/id/3.1/annotations.md
+++ b/docs/id/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/id/3.1/cache.md b/docs/id/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/id/3.1/cache.md
+++ b/docs/id/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/id/3.1/sidebar.md b/docs/id/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/id/3.1/sidebar.md
+++ b/docs/id/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/ja/3.1/annotations.md b/docs/ja/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/ja/3.1/annotations.md
+++ b/docs/ja/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/ja/3.1/cache.md b/docs/ja/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/ja/3.1/cache.md
+++ b/docs/ja/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/ja/3.1/introduction.md b/docs/ja/3.1/introduction.md
index 64998e8da407..0633cb16b702 100644
--- a/docs/ja/3.1/introduction.md
+++ b/docs/ja/3.1/introduction.md
@@ -6,7 +6,7 @@ Welcome to the documentation for the Phalcon framework.
Our mission is to offer developers an advanced, feature rich tool, which they can use to develop powerful applications with low server consumption and high performance.
-## Qué es Phalcon
+## What is Phalcon
Phalcon is an open source full stack framework for PHP, written as a C-extension. Phalcon is optimized for high performance. Its unique architecture allows the framework to always be memory resident, offering its functionality whenever its needed, without expensive file stats and file reads that traditional PHP frameworks employ.
diff --git a/docs/ja/3.1/sidebar.md b/docs/ja/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/ja/3.1/sidebar.md
+++ b/docs/ja/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/pl/3.1/annotations.md b/docs/pl/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/pl/3.1/annotations.md
+++ b/docs/pl/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/pl/3.1/cache.md b/docs/pl/3.1/cache.md
index 4e4e197933d1..3f2317d94ce7 100644
--- a/docs/pl/3.1/cache.md
+++ b/docs/pl/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/pl/3.1/sidebar.md b/docs/pl/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/pl/3.1/sidebar.md
+++ b/docs/pl/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/pt/3.1/annotations.md b/docs/pt/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/pt/3.1/annotations.md
+++ b/docs/pt/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/pt/3.1/cache.md b/docs/pt/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/pt/3.1/cache.md
+++ b/docs/pt/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/pt/3.1/sidebar.md b/docs/pt/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/pt/3.1/sidebar.md
+++ b/docs/pt/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/ru/3.1/annotations.md b/docs/ru/3.1/annotations.md
index cfae33c9f8c5..42aa2b959043 100644
--- a/docs/ru/3.1/annotations.md
+++ b/docs/ru/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Парсер аннотаций
+ -
+ Factory
+
-
Чтение аннотаций
@@ -124,9 +127,44 @@ someParameter='the value', false
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
-## Reading Annotations
+## Чтение аннотаций
Для простого получения аннотаций класса с использованием объектно-ориентированного интерфейса, реализован рефлектор:
@@ -162,7 +200,7 @@ foreach ($annotations as $annotation) {
-## Types of Annotations
+## Типы аннотаций
Аннотации могут иметь или не иметь параметров. Параметры могут быть простыми литералам (строкой, числом, булевым типом, null), массивом, хешированным списком или другими аннотациями:
@@ -221,7 +259,7 @@ foreach ($annotations as $annotation) {
-## Practical Usage
+## Практическое использование
Далее мы разберем несколько примеров по использованию аннотаций в PHP приложениях:
@@ -407,7 +445,7 @@ class SecurityAnnotationsPlugin extends Plugin
-## Annotations Adapters
+## Адаптеры аннотаций
Компонент поддерживает адаптеры с возможностью кэширования проанализированных аннотаций. Это позволяет увеличивать производительность в боевом режиме и моментальное обновление данных при разработке и тестировании:
@@ -426,6 +464,6 @@ class SecurityAnnotationsPlugin extends Plugin
-## External Resources
+## Дополнительная информация
- [Урок: Создание собственного инициализатора моделей с использованием аннотаций](https://blog.phalconphp.com/post/tutorial-creating-a-custom-models-initializer)
\ No newline at end of file
diff --git a/docs/ru/3.1/cache.md b/docs/ru/3.1/cache.md
index fb0d3e3398c8..8d40d4953b33 100644
--- a/docs/ru/3.1/cache.md
+++ b/docs/ru/3.1/cache.md
@@ -8,6 +8,9 @@
-
Поведение системы кэширования
+ -
+ Factory
+
-
Кэширование выходных фрагментов
@@ -105,9 +108,68 @@ Phalcon предоставляет класс `Phalcon\Cache`, дающий бы
- **Frontend**: Эта часть отвечает за проверку времени жизни ключа и выполняет дополнительные преобразования над данными, до операции сохранения или извлечения их из backend
- **Backend**: Эта часть отвечает за коммуникацию, запись/чтение данных по запросу frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
-## Caching Output Fragments
+## Кэширование выходных фрагментов
Выходные фрагменты — это части HTML или текста, которые кэшируются “как есть” и возвращаются “как есть”. Выходные данные автоматически захватываются из `ob_*` функции или из выходного потока PHP и сохраняются в кэш. Следующий пример демонстрирует такое использование. Он получает сгенерированные выходные данные и сохраняет их в файл. Кэш обновляется каждые 172800 секунд (двое суток).
@@ -287,7 +349,7 @@ foreach ($robots as $robot) {
-## Querying the cache
+## Запрос данных из кэша
Все элементы добавляемые в кэш идентифицируются по ключам. В случае с файловым бэкэндом, ключом является название файла. Для получения данных из кэша нам необходимо выполнить запрос к кэшу с указанием уникального ключа. Если ключа не существует, метод вернет значение NULL.
@@ -318,7 +380,7 @@ $keys = $cache->queryKeys('my-prefix');
-## Deleting data from the cache
+## Удаление данных из кэша
Могут возникнуть ситуации, когда вам необходимо принудительно инвалидировать данные в кэше. Единственным требованием для этого является знание необходимого ключа по которому хранятся данные.
@@ -338,7 +400,7 @@ foreach ($keys as $key) {
-## Checking cache existence
+## Проверяем наличие кэша
Существует возможность проверить наличие данных в кэше:
@@ -354,7 +416,7 @@ if ($cache->exists('someKey')) {
-## Lifetime
+## Время жизни
`lifetime` — это время, исчисляемое в секундах, которое означает, сколько будут храниться данные в бэкэнде. По умолчанию все данные получают “время жизни”, которое было указано при создании фронтэнд компонента. Вы можете указать другое значение при сохранении или получении данных из кэша:
@@ -395,7 +457,7 @@ if ($robots === null) {
-## Multi-Level Cache
+## Многоуровневое кэширование
Эта возможность компонента кэширования позволяет разработчику осуществлять кэш в несколько уровней. Возможность будет полезна при сохранении кэша в нескольких системах кэширования, с разным временем жизни и последующим поочерёдным чтением из них, начиная с самого быстрого (в порядке регистрации) и заканчивая самым медленным, пока срок жизни во всех них не истечет:
@@ -459,7 +521,7 @@ $cache->save('my-key', $data);
-## Frontend Adapters
+## Фронтэнд адаптеры
Доступные фронтэнд адаптеры приведены в таблице:
@@ -480,7 +542,7 @@ $cache->save('my-key', $data);
-## Backend Adapters
+## Бэкэнд адаптеры
Доступные бэкэнд адаптеры приведены в таблице:
diff --git a/docs/ru/3.1/sidebar.md b/docs/ru/3.1/sidebar.md
index fe261ab1824f..74c4923a789c 100644
--- a/docs/ru/3.1/sidebar.md
+++ b/docs/ru/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Метаданные](/[[language]]/[[version]]/db-models-metadata)
- [Отношения](/[[language]]/[[version]]/db-models-relationships)
- [Транзакции](/[[language]]/[[version]]/db-models-transactions)
- - [Валидаторы](/[[language]]/[[version]]/db-models-validators)
+ - [Валидаторы](/[[language]]/[[version]]/db-models-validation)
- [Миграции](/[[language]]/[[version]]/db-migrations)
- [Разбивка на страницы](/[[language]]/[[version]]/db-pagination)
- Фронтенд
diff --git a/docs/tr/3.1/annotations.md b/docs/tr/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/tr/3.1/annotations.md
+++ b/docs/tr/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/tr/3.1/cache.md b/docs/tr/3.1/cache.md
index 86d193e40fd4..2e568cc6384b 100644
--- a/docs/tr/3.1/cache.md
+++ b/docs/tr/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/tr/3.1/sidebar.md b/docs/tr/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/tr/3.1/sidebar.md
+++ b/docs/tr/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/uk/3.1/annotations.md b/docs/uk/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/uk/3.1/annotations.md
+++ b/docs/uk/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/uk/3.1/cache.md b/docs/uk/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/uk/3.1/cache.md
+++ b/docs/uk/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/uk/3.1/sidebar.md b/docs/uk/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/uk/3.1/sidebar.md
+++ b/docs/uk/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/vi/3.1/annotations.md b/docs/vi/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/vi/3.1/annotations.md
+++ b/docs/vi/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/vi/3.1/cache.md b/docs/vi/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/vi/3.1/cache.md
+++ b/docs/vi/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/vi/3.1/sidebar.md b/docs/vi/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/vi/3.1/sidebar.md
+++ b/docs/vi/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End
diff --git a/docs/zh/3.1/annotations.md b/docs/zh/3.1/annotations.md
index 23203422f02c..0bdb7b4dfc89 100644
--- a/docs/zh/3.1/annotations.md
+++ b/docs/zh/3.1/annotations.md
@@ -2,6 +2,9 @@
-
Annotations Parser
+ -
+ Factory
+
-
Reading Annotations
@@ -124,6 +127,41 @@ However, to make the code more maintainable and understandable it is recommended
*/
```
+
+
+## Factory
+
+There are many annotations adapters available (see [Adapters](#adapters)). The one you use will depend on the needs of your application. The traditional way of instantiating such an addapter is as follows:
+
+```php
+ 'annotations',
+ 'lifetime' => '3600',
+ 'adapter' => 'memory', // Load the Memory adapter
+];
+
+$annotations = Factory::load($options);
+```
+
+The Factory loader provides more flexibility when dealing with instantiating annotations adapters from configuration files.
+
## Reading Annotations
diff --git a/docs/zh/3.1/cache.md b/docs/zh/3.1/cache.md
index 91f9ddff31bc..31c285a6ba1c 100644
--- a/docs/zh/3.1/cache.md
+++ b/docs/zh/3.1/cache.md
@@ -8,6 +8,9 @@
-
Caching Behavior
+ -
+ Factory
+
-
Caching Output Fragments
@@ -105,6 +108,65 @@ The caching process is divided into 2 parts:
- **Frontend**: This part is responsible for checking if a key has expired and perform additional transformations to the data before storing and after retrieving them from the backend-
- **Backend**: This part is responsible for communicating, writing/reading the data required by the frontend.
+
+
+## Factory
+
+Instantiating frontend or backend adapters can be achieved by two ways:
+
+- Traditional way
+
+```php
+ 172800,
+ ]
+);
+
+// Create the component that will cache from the 'Output' to a 'File' backend
+// Set the cache file directory - it's important to keep the '/' at the end of
+// the value for the folder
+$cache = new BackFile(
+ $frontCache,
+ [
+ 'cacheDir' => '../app/cache/',
+ ]
+);
+```
+
+or using the Factory object as follows:
+
+```php
+ 172800,
+ 'adapter' => 'data',
+ ];
+ $frontendCache = FFactory::load($options);
+
+
+$options = [
+ 'cacheDir' => '../app/cache/',
+ 'prefix' => 'app-data',
+ 'frontend' => $frontendCache,
+ 'adapter' => 'file',
+];
+
+$backendCache = BFactory::load($options);
+```
+
+If the options
+
## Caching Output Fragments
diff --git a/docs/zh/3.1/sidebar.md b/docs/zh/3.1/sidebar.md
index 2855914f376f..f87fdae88773 100644
--- a/docs/zh/3.1/sidebar.md
+++ b/docs/zh/3.1/sidebar.md
@@ -50,7 +50,7 @@
- [Metadata](/[[language]]/[[version]]/db-models-metadata)
- [Relationships](/[[language]]/[[version]]/db-models-relationships)
- [Transactions](/[[language]]/[[version]]/db-models-transactions)
- - [Validators](/[[language]]/[[version]]/db-models-validators)
+ - [Validators](/[[language]]/[[version]]/db-models-validation)
- [Migrations](/[[language]]/[[version]]/db-migrations)
- [Pagination](/[[language]]/[[version]]/db-pagination)
- Front End