Download the PHP package daycry/doctrine without Composer
On this page you can find all versions of the php package daycry/doctrine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download daycry/doctrine
More information about daycry/doctrine
Files in daycry/doctrine
Package doctrine
Short Description Doctrine for Codeigniter 4
License MIT
Homepage https://github.com/daycry/doctrine
Informations about the package doctrine
Doctrine
Doctrine for Codeigniter 4
Installation via composer
Use the package with composer install
> composer require daycry/doctrine
Manual installation
Download this repo and then enable it by editing app/Config/Autoload.php and adding the Daycry\Doctrine namespace to the $psr4 array. For example, if you copied it into app/ThirdParty:
Configuration
Run command:
> php spark doctrine:publish
This command will copy a config file to your app namespace and "cli-config.php" file for doctrine cli.
Then you can adjust it to your needs. By default file will be present in app/Config/Doctrine.php
.
Usage Loading Library
Usage as a Service
Usage as a Helper
In your BaseController - $helpers array, add an element with your helper filename.
And then, you can use the helper
Cli Commands
If you receive the followrin error: [Semantical Error] The annotation "@JMS\Serializer\Annotation\ExclusionPolicy" in class App\Models\Entity\Secret was never imported. Did you maybe forget to add a "use" statement for this annotation?
You must execute the following command
Using DataTables
Usage with doctrine/orm:
If you receive an error: Not all identifier properties can be found in the ResultSetMapping you can use:
Example
Search
To search from datatables there are nine different search modes
Mode | Pattern | Desctiption |
---|---|---|
LIKE '…%' | [*%]searchTerm | This performs a LIKE '…%' search where the start of the search term must match a value in the given column. This can be archived with only providing the search term (because it's default) or by prefixing the search term with "[%]" ([%]searchTerm). |
LIKE '%…%' | [%%]searchTerm | This performs a LIKE '%…%' search where any part the search term must match a value in the given column. This can be archived by prefixing the search term with "[%%]" ([%%]searchTerm). |
Equality | [=]searchTerm | This performs a = … search. The search term must exactly match a value in the given column. This can be archived by prefixing the search term with "[=]" ([=]searchTerm). |
!= (No Equality) | [!=]searchTerm | This performs a != … search. The search term must not exactly match a value in the given column. This can be archived by prefixing the search term with "[!=]" ([!=]searchTerm). |
> (Greater Than) | [>]searchTerm | This performs a > … search. The search term must be smaller than a value in the given column. This can be archived by prefixing the search term with "[>]" ([>]searchTerm). |
< (Smaller Than) | [<]searchTerm | This performs a < … search. The search term must be greater than a value in the given column. This can be archived by prefixing the search term with "[<]" ([<]searchTerm). |
< (IN) | [IN]searchTerm,searchTerm,… | This performs an IN(…) search. One of the provided comma-separated search terms must exactly match a value in the given column. This can be archived by prefixing the search terms with "[IN]" ([IN]searchTerm,searchTerm,…). |
< (OR) | [OR]searchTerm,searchTerm,… | This performs multiple OR-connected LIKE('%…%') searches. One of the provided comma-separated search terms must match a fragment of a value in the given column. This can be archived by prefixing the search terms with "[OR]" ([OR]searchTerm,searchTerm,…). |
>< (Between) | [><]searchTerm,searchTerm | This performs a BETWEEN … AND … search. Both search terms must be separated with a comma. This operation can be archived by prefixing the comma-separated search terms with "[><]" ([><]searchTerm,searchTerm). |
Prefixes are case-insenstive (IN, in, OR, or). Provided search terms were trimmed.
Example
All versions of doctrine with dependencies
doctrine/orm Version ^3
doctrine/dbal Version ^4
symfony/cache Version ^7
symfony/yaml Version ^6.2
beberlei/doctrineextensions Version ^1.0
jms/serializer-bundle Version ^4