Skip to content

Commit 7f1b73e

Browse files
committed
RST docs
1 parent 4e0125f commit 7f1b73e

34 files changed

+615
-1027
lines changed

docs/blameable.md

-113
This file was deleted.

docs/blameable.rst

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
=========
2+
Blameable
3+
=========
4+
5+
Blameable behavior will automate the update of username or user reference
6+
fields on your Entities. It works through annotations and can
7+
update fields on creation, update, property subset update, or even on
8+
specific property value change.
9+
10+
* Automatic predefined user field update on creation, update, property
11+
subset update, and even on record property changes.
12+
* Specific annotations for properties, and no interface required.
13+
* Can react to specific property or relation changes to specific value.
14+
* Can be nested with other behaviors.
15+
* Annotation, Yaml and Xml mapping support for extensions.
16+
17+
18+
Installation
19+
============
20+
21+
Add ``LaravelDoctrine\Extensions\Blameable\BlameableExtension``
22+
to ``doctrine.extensions`` config in ``config/doctrine.php``.
23+
24+
25+
Further Reading
26+
===============
27+
28+
See the `official documentation <https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/blameable.md>`_
29+
for use of this behavior.
30+
31+
32+
.. role:: raw-html(raw)
33+
:format: html
34+
35+
.. include:: footer.rst

docs/conf.py

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import sys, os
2+
from sphinx.highlighting import lexers
3+
from pygments.lexers.web import PhpLexer
4+
5+
lexers['php'] = PhpLexer(startinline=True, linenos=0)
6+
lexers['php-annotations'] = PhpLexer(startinline=True, linenos=0)
7+
primary_domain = 'php'
8+
9+
extensions = []
10+
templates_path = ['_templates']
11+
source_suffix = '.rst'
12+
master_doc = 'index'
13+
project = u'Laravel Doctrine ORM Extensions'
14+
copyright = u'2024 laraveldoctrine.org'
15+
version = '9'
16+
html_title = "Extensions for Laravel and Doctrine ORM"
17+
html_short_title = "Laravel Doctrine ORM Extensions"
18+
html_favicon = 'favicon.ico'
19+
20+
exclude_patterns = ['_build']
21+
html_static_path = ['_static']
22+
23+
##### Guzzle sphinx theme
24+
25+
import guzzle_sphinx_theme
26+
html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator'
27+
html_theme_path = guzzle_sphinx_theme.html_theme_path()
28+
html_theme = 'guzzle_sphinx_theme'
29+
30+
# Custom sidebar templates, maps document names to template names.
31+
html_sidebars = {
32+
'**': ['logo-text.html', 'globaltoc.html', 'searchbox.html']
33+
}
34+
35+
# Register the theme as an extension to generate a sitemap.xml
36+
extensions.append("guzzle_sphinx_theme")
37+
38+
# Guzzle theme options (see theme.conf for more information)
39+
html_theme_options = {
40+
41+
# Set the path to a special layout to include for the homepage
42+
# "index_template": "homepage.html",
43+
44+
# Allow a separate homepage from the master_doc
45+
# homepage = index
46+
47+
# Set the name of the project to appear in the nav menu
48+
# "project_nav_name": "Guzzle",
49+
50+
# Set your Disqus short name to enable comments
51+
# "disqus_comments_shortname": "my_disqus_comments_short_name",
52+
53+
# Set you GA account ID to enable tracking
54+
# "google_analytics_account": "my_ga_account",
55+
56+
# Path to a touch icon
57+
# "touch_icon": "",
58+
59+
# Specify a base_url used to generate sitemap.xml links. If not
60+
# specified, then no sitemap will be built.
61+
"base_url": "https://extensions.docs.laraveldoctrine.org"
62+
63+
# Allow the "Table of Contents" page to be defined separately from "master_doc"
64+
# tocpage = Contents
65+
66+
# Allow the project link to be overriden to a custom URL.
67+
# projectlink = http://myproject.url
68+
}

docs/custom-functions.md

-74
This file was deleted.

docs/custom-functions.rst

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
=========================
2+
Custom Database Functions
3+
=========================
4+
5+
A set of extensions to Doctrine that add support for additional
6+
queryfunctions available in MySQL, Oracle, and SQLite.
7+
8+
When ``LaravelDoctrine\Extensions\BeberleiExtensionsServiceProvider::class``
9+
is included, the following functions will be automatically registered:
10+
11+
.. list-table:: Query/Type Extensions
12+
:widths: 25 75
13+
:header-rows: 1
14+
15+
* - Database
16+
- Functions
17+
* - MySQL
18+
- ``ACOS, ASCII, ASIN, ATAN, ATAN2, BINARY, CEIL, CHAR_LENGTH, CONCAT_WS, COS, COT, COUNTIF, CRC32, DATE, DATE_FORMAT, DATEADD, DATEDIFF, DATESUB, DAY, DAYNAME, DEGREES, FIELD, FIND_IN_SET, FLOOR, FROM_UNIXTIME, GROUP_CONCAT, HOUR, IFELSE, IFNULL, LAST_DAY, MATCH_AGAINST, MD5, MINUTE, MONTH, MONTHNAME, NULLIF, PI, POWER, QUARTER, RADIANS, RAND, REGEXP, REPLACE, ROUND, SECOND, SHA1, SHA2, SIN, SOUNDEX, STD, STRTODATE, SUBSTRING_INDEX, TAN, TIME, TIMESTAMPADD, TIMESTAMPDIFF, UUID_SHORT, WEEK, WEEKDAY, YEAR``
19+
* - Oracle
20+
- ``DAY, MONTH, NVL, TODATE, TRUNC, YEAR``
21+
* - Sqlite
22+
- ``DATE, MINUTE, HOUR, DAY, WEEK, WEEKDAY, MONTH, YEAR, STRFTIME*``
23+
24+
25+
Alternativly you can include the separate classes inside `config/doctrine` config file. Example:
26+
27+
.. code-block:: php
28+
29+
return [
30+
31+
...
32+
33+
/*
34+
|--------------------------------------------------------------------------
35+
| Doctrine custom types
36+
|--------------------------------------------------------------------------
37+
*/
38+
'custom_types' => [
39+
'carbondate' => DoctrineExtensions\Types\CarbonDateType::class,
40+
'carbondatetime' => DoctrineExtensions\Types\CarbonDateTimeType::class,
41+
'carbondatetimetz' => DoctrineExtensions\Types\CarbonDateTimeTzType::class,
42+
'carbontime' => DoctrineExtensions\Types\CarbonTimeType::class
43+
],
44+
/*
45+
|--------------------------------------------------------------------------
46+
| Doctrine custom datetime functions
47+
|--------------------------------------------------------------------------
48+
*/
49+
'custom_datetime_functions' => [
50+
'DATEADD' => DoctrineExtensions\Query\Mysql\DateAdd::class,
51+
'DATEDIFF' => DoctrineExtensions\Query\Mysql\DateDiff::class
52+
],
53+
/*
54+
|--------------------------------------------------------------------------
55+
| Doctrine custom numeric functions
56+
|--------------------------------------------------------------------------
57+
*/
58+
'custom_numeric_functions' => [
59+
'ACOS' => DoctrineExtensions\Query\Mysql\Acos::class,
60+
'ASIN' => DoctrineExtensions\Query\Mysql\Asin::class,
61+
'ATAN' => DoctrineExtensions\Query\Mysql\Atan::class,
62+
'ATAN2' => DoctrineExtensions\Query\Mysql\Atan2::class,
63+
'COS' => DoctrineExtensions\Query\Mysql\Cos::class,
64+
'COT' => DoctrineExtensions\Query\Mysql\Cot::class,
65+
'DEGREES' => DoctrineExtensions\Query\Mysql\Degrees::class,
66+
'RADIANS' => DoctrineExtensions\Query\Mysql\Radians::class,
67+
'SIN' => DoctrineExtensions\Query\Mysql\Sin::class,
68+
'TAN' => DoctrineExtensions\Query\Mysql\Ta::class
69+
],
70+
/*
71+
|--------------------------------------------------------------------------
72+
| Doctrine custom string functions
73+
|--------------------------------------------------------------------------
74+
*/
75+
'custom_string_functions' => [
76+
'CHAR_LENGTH' => DoctrineExtensions\Query\Mysql\CharLength::class,
77+
'CONCAT_WS' => DoctrineExtensions\Query\Mysql\ConcatWs::class,
78+
'FIELD' => DoctrineExtensions\Query\Mysql\Field::class,
79+
'FIND_IN_SET' => DoctrineExtensions\Query\Mysql\FindInSet::class,
80+
'REPLACE' => DoctrineExtensions\Query\Mysql\Replace::class,
81+
'SOUNDEX' => DoctrineExtensions\Query\Mysql\Soundex::class,
82+
'STR_TO_DATE' => DoctrineExtensions\Query\Mysql\StrToDate::class
83+
],
84+
85+
];
86+
87+
88+
.. role:: raw-html(raw)
89+
:format: html
90+
91+
.. include:: footer.rst

docs/favicon.ico

4.19 KB
Binary file not shown.

docs/footer.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
----------
3+
4+
This is documentation for
5+
`laravel-doctrine/extensions <https://github.com/laravel-doctrine/extensions>`_.
6+
Please add your ★ star to the project.

0 commit comments

Comments
 (0)