diff --git a/src/Annotation/AuraSql.php b/src/Annotation/AuraSql.php index 9b8138d..e922db0 100644 --- a/src/Annotation/AuraSql.php +++ b/src/Annotation/AuraSql.php @@ -6,6 +6,12 @@ use Attribute; +/** + * Sets the `pdo` property to the read or write connection for the methods + * listed in the read and write method lists of AuraSqlLocatorModule + * + * @see \Ray\AuraSqlModule\AuraSqlConnectionInterceptor + */ #[Attribute(Attribute::TARGET_CLASS)] final class AuraSql { diff --git a/src/Annotation/AuraSqlQueryConfig.php b/src/Annotation/AuraSqlQueryConfig.php index d2daf63..a83d052 100644 --- a/src/Annotation/AuraSqlQueryConfig.php +++ b/src/Annotation/AuraSqlQueryConfig.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the database type that the Aura.SqlQuery builders are created for + */ #[Attribute(Attribute::TARGET_PARAMETER), Qualifier] final class AuraSqlQueryConfig { diff --git a/src/Annotation/PagerViewOption.php b/src/Annotation/PagerViewOption.php index cddb0ad..4193cfb 100644 --- a/src/Annotation/PagerViewOption.php +++ b/src/Annotation/PagerViewOption.php @@ -7,6 +7,11 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the options passed to the Pagerfanta view that renders the pager HTML + * + * @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#pagination + */ #[Attribute(Attribute::TARGET_PARAMETER), Qualifier] final class PagerViewOption { diff --git a/src/Annotation/Read.php b/src/Annotation/Read.php index 96c9195..6a58ebf 100644 --- a/src/Annotation/Read.php +++ b/src/Annotation/Read.php @@ -7,6 +7,9 @@ use Attribute; use Ray\Di\Di\Qualifier; +/** + * Qualifies the names of the methods that use the read connection in an #[AuraSql] class + */ #[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER), Qualifier] final class Read { diff --git a/src/Annotation/ReadOnlyConnection.php b/src/Annotation/ReadOnlyConnection.php index ce65605..14d05c5 100644 --- a/src/Annotation/ReadOnlyConnection.php +++ b/src/Annotation/ReadOnlyConnection.php @@ -6,6 +6,13 @@ use Attribute; +/** + * Sets the `pdo` property to the read (slave) connection before the method runs + * when replication is configured (AuraSqlModule without a slave ignores it) + * + * @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#replication + * @see \Ray\AuraSqlModule\AuraSqlSlaveDbInterceptor + */ #[Attribute(Attribute::TARGET_METHOD)] final class ReadOnlyConnection { diff --git a/src/Annotation/Transactional.php b/src/Annotation/Transactional.php index a31b3b0..13b252c 100644 --- a/src/Annotation/Transactional.php +++ b/src/Annotation/Transactional.php @@ -6,6 +6,12 @@ use Attribute; +/** + * Runs the method in a database transaction and rolls back when a PDOException is thrown + * + * @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#transactions + * @see \Ray\AuraSqlModule\TransactionalInterceptor + */ #[Attribute(Attribute::TARGET_METHOD)] final class Transactional { diff --git a/src/Annotation/WriteConnection.php b/src/Annotation/WriteConnection.php index 269c5e7..4c40664 100644 --- a/src/Annotation/WriteConnection.php +++ b/src/Annotation/WriteConnection.php @@ -6,6 +6,13 @@ use Attribute; +/** + * Sets the `pdo` property to the write (master) connection before the method runs + * when replication is configured (AuraSqlModule without a slave ignores it) + * + * @see https://bearsunday.github.io/manuals/1.0/en/database_aura.html#replication + * @see \Ray\AuraSqlModule\AuraSqlMasterDbInterceptor + */ #[Attribute(Attribute::TARGET_METHOD)] final class WriteConnection {