Skip to content

Commit 8d658b4

Browse files
mbabkerfranmomu
authored andcommitted
Update doc block comments and inline examples on marker interfaces
1 parent 0287e8d commit 8d658b4

File tree

11 files changed

+56
-76
lines changed

11 files changed

+56
-76
lines changed

src/Blameable/Blameable.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\Blameable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified as
15-
* Blameable
13+
* Marker interface for objects which can be identified as blamable.
1614
*
1715
* @author Gediminas Morkevicius <[email protected]>
1816
*/
@@ -21,35 +19,35 @@ interface Blameable
2119
// blameable expects annotations on properties
2220

2321
/*
24-
* @gedmo:Blameable(on="create")
22+
* @Gedmo\Blameable(on="create")
2523
* fields which should be updated on insert only
2624
*/
2725

2826
/*
29-
* @gedmo:Blameable(on="update")
27+
* @Gedmo\Blameable(on="update")
3028
* fields which should be updated on update and insert
3129
*/
3230

3331
/*
34-
* @gedmo:Blameable(on="change", field="field", value="value")
32+
* @Gedmo\Blameable(on="change", field="field", value="value")
3533
* fields which should be updated on changed "property"
3634
* value and become equal to given "value"
3735
*/
3836

3937
/*
40-
* @gedmo:Blameable(on="change", field="field")
38+
* @Gedmo\Blameable(on="change", field="field")
4139
* fields which should be updated on changed "property"
4240
*/
4341

4442
/*
45-
* @gedmo:Blameable(on="change", fields={"field1", "field2"})
43+
* @Gedmo\Blameable(on="change", fields={"field1", "field2"})
4644
* fields which should be updated if at least one of the given fields changed
4745
*/
4846

4947
/*
5048
* example
5149
*
52-
* @gedmo:Blameable(on="create")
50+
* @Gedmo\Blameable(on="create")
5351
* @Column(type="string")
5452
* $created
5553
*/

src/IpTraceable/IpTraceable.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\IpTraceable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified as
15-
* IpTraceable
13+
* Marker interface for objects which can be identified as IP traceable.
1614
*
1715
* @author Pierre-Charles Bertineau <[email protected]>
1816
*/
@@ -21,35 +19,35 @@ interface IpTraceable
2119
// ipTraceable expects annotations on properties
2220

2321
/*
24-
* @gedmo:IpTraceable(on="create")
22+
* @Gedmo\IpTraceable(on="create")
2523
* strings which should be updated on insert only
2624
*/
2725

2826
/*
29-
* @gedmo:IpTraceable(on="update")
27+
* @Gedmo\IpTraceable(on="update")
3028
* strings which should be updated on update and insert
3129
*/
3230

3331
/*
34-
* @gedmo:IpTraceable(on="change", field="field", value="value")
32+
* @Gedmo\IpTraceable(on="change", field="field", value="value")
3533
* strings which should be updated on changed "property"
3634
* value and become equal to given "value"
3735
*/
3836

3937
/*
40-
* @gedmo:IpTraceable(on="change", field="field")
38+
* @Gedmo\IpTraceable(on="change", field="field")
4139
* strings which should be updated on changed "property"
4240
*/
4341

4442
/*
45-
* @gedmo:IpTraceable(on="change", fields={"field1", "field2"})
43+
* @Gedmo\IpTraceable(on="change", fields={"field1", "field2"})
4644
* strings which should be updated if at least one of the given fields changed
4745
*/
4846

4947
/*
5048
* example
5149
*
52-
* @gedmo:IpTraceable(on="create")
50+
* @Gedmo\IpTraceable(on="create")
5351
* @Column(type="string")
5452
* $created
5553
*/

src/Loggable/Loggable.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\Loggable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Domain Objects which in some cases needs to be identified as
15-
* Loggable
13+
* Marker interface for objects which can be identified as loggable.
1614
*
1715
* @author Gediminas Morkevicius <[email protected]>
1816
*/
@@ -21,14 +19,14 @@ interface Loggable
2119
// this interface is not necessary to implement
2220

2321
/*
24-
* @gedmo:Loggable
25-
* to mark the class as loggable use class annotation @gedmo:Loggable
22+
* @Gedmo\Loggable
23+
* to mark the class as loggable use class annotation @Gedmo\Loggable
2624
* this object will contain now a history
2725
* available options:
2826
* logEntryClass="My\LogEntryObject" (optional) defaultly will use internal object class
2927
* example:
3028
*
31-
* @gedmo:Loggable(logEntryClass="My\LogEntryObject")
29+
* @Gedmo\Loggable(logEntryClass="My\LogEntryObject")
3230
* class MyEntity
3331
*/
3432
}

src/ReferenceIntegrity/ReferenceIntegrity.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\ReferenceIntegrity;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified te have
15-
* ReferenceIntegrity checks
13+
* Marker interface for objects which can be identified as requiring reference integrity checks.
1614
*
1715
* @author Evert Harmeling <[email protected]>
1816
*/

src/Sluggable/Sluggable.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\Sluggable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified as
15-
* Sluggable
13+
* Marker interface for objects which can be identified as sluggable.
1614
*
1715
* @author Gediminas Morkevicius <[email protected]>
1816
*/
@@ -21,13 +19,13 @@ interface Sluggable
2119
// use now annotations instead of predefined methods, this interface is not necessary
2220

2321
/*
24-
* @gedmo:Sluggable
25-
* to mark the field as sluggable use property annotation @gedmo:Sluggable
22+
* @Gedmo\Sluggable
23+
* to mark the field as sluggable use property annotation @Gedmo\Sluggable
2624
* this field value will be included in built slug
2725
*/
2826

2927
/*
30-
* @gedmo:Slug - to mark property which will hold slug use annotation @gedmo:Slug
28+
* @Gedmo\Slug - to mark property which will hold slug use annotation @Gedmo\Slug
3129
* available options:
3230
* updatable (optional, default=true) - true to update the slug on sluggable field changes, false - otherwise
3331
* unique (optional, default=true) - true if slug should be unique and if identical it will be prefixed, false - otherwise
@@ -40,7 +38,7 @@ interface Sluggable
4038
*
4139
* example:
4240
*
43-
* @gedmo:Slug(style="camel", separator="_", prefix="", suffix="", updatable=false, unique=false)
41+
* @Gedmo\Slug(style="camel", separator="_", prefix="", suffix="", updatable=false, unique=false)
4442
* @Column(type="string", length=64)
4543
* $property
4644
*/

src/SoftDeleteable/SoftDeleteable.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\SoftDeleteable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Domain Objects which in some cases needs to be identified as
15-
* SoftDeleteable
13+
* Marker interface for objects which can be identified as soft-deletable.
1614
*
1715
* @author Gustavo Falco <[email protected]>
1816
* @author Gediminas Morkevicius <[email protected]>
@@ -22,12 +20,12 @@ interface SoftDeleteable
2220
// this interface is not necessary to implement
2321

2422
/*
25-
* @gedmo:SoftDeleteable
26-
* to mark the class as SoftDeleteable use class annotation @gedmo:SoftDeleteable
23+
* @Gedmo\SoftDeleteable
24+
* to mark the class as SoftDeleteable use class annotation @Gedmo\SoftDeleteable
2725
* this object will be able to be soft deleted
2826
* example:
2927
*
30-
* @gedmo:SoftDeleteable
28+
* @Gedmo\SoftDeleteable
3129
* class MyEntity
3230
*/
3331
}

src/Sortable/Sortable.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\Sortable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified as
15-
* Sortable
13+
* Marker interface for objects which can be identified as sortable.
1614
*
1715
* @author Lukas Botsch <[email protected]>
1816
*/
@@ -21,27 +19,27 @@ interface Sortable
2119
// use now annotations instead of predefined methods, this interface is not necessary
2220

2321
/*
24-
* @gedmo:SortablePosition - to mark property which will hold the item position use annotation @gedmo:SortablePosition
22+
* @Gedmo\SortablePosition - to mark property which will hold the item position use annotation @Gedmo\SortablePosition
2523
* This property has to be numeric. The position index can be negative and will be counted from right to left.
2624
*
2725
* example:
2826
*
29-
* @gedmo:SortablePosition
27+
* @Gedmo\SortablePosition
3028
* @Column(type="int")
3129
* $position
3230
*
33-
* @gedmo:SortableGroup
31+
* @Gedmo\SortableGroup
3432
* @Column(type="string", length=64)
3533
* $category
3634
*
3735
*/
3836

3937
/*
40-
* @gedmo:SortableGroup - to group node sorting by a property use annotation @gedmo:SortableGroup on this property
38+
* @Gedmo\SortableGroup - to group node sorting by a property use annotation @Gedmo\SortableGroup on this property
4139
*
4240
* example:
4341
*
44-
* @gedmo:SortableGroup
42+
* @Gedmo\SortableGroup
4543
* @Column(type="string", length=64)
4644
* $category
4745
*/

src/Timestampable/Timestampable.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\Timestampable;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified as
15-
* Timestampable
13+
* Marker interface for objects which can be identified as timestampable.
1614
*
1715
* @author Gediminas Morkevicius <[email protected]>
1816
*/
@@ -21,35 +19,35 @@ interface Timestampable
2119
// timestampable expects annotations on properties
2220

2321
/*
24-
* @gedmo:Timestampable(on="create")
22+
* @Gedmo\Timestampable(on="create")
2523
* dates which should be updated on insert only
2624
*/
2725

2826
/*
29-
* @gedmo:Timestampable(on="update")
27+
* @Gedmo\Timestampable(on="update")
3028
* dates which should be updated on update and insert
3129
*/
3230

3331
/*
34-
* @gedmo:Timestampable(on="change", field="field", value="value")
32+
* @Gedmo\Timestampable(on="change", field="field", value="value")
3533
* dates which should be updated on changed "property"
3634
* value and become equal to given "value"
3735
*/
3836

3937
/*
40-
* @gedmo:Timestampable(on="change", field="field")
38+
* @Gedmo\Timestampable(on="change", field="field")
4139
* dates which should be updated on changed "property"
4240
*/
4341

4442
/*
45-
* @gedmo:Timestampable(on="change", fields={"field1", "field2"})
43+
* @Gedmo\Timestampable(on="change", fields={"field1", "field2"})
4644
* dates which should be updated if at least one of the given fields changed
4745
*/
4846

4947
/*
5048
* example
5149
*
52-
* @gedmo:Timestampable(on="create")
50+
* @Gedmo\Timestampable(on="create")
5351
* @Column(type="date")
5452
* $created
5553
*/

src/Translatable/Translatable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ interface Translatable
2121
// use now annotations instead of predefined methods, this interface is not necessary
2222

2323
/*
24-
* @gedmo:TranslationEntity
24+
* @Gedmo\TranslationEntity
2525
* to specify custom translation class use
26-
* class annotation @gedmo:TranslationEntity(class="your\class")
26+
* class annotation @Gedmo\TranslationEntity(class="your\class")
2727
*/
2828

2929
/*
30-
* @gedmo:Translatable
30+
* @Gedmo\Translatable
3131
* to mark the field as translatable,
3232
* these fields will be translated
3333
*/
3434

3535
/*
36-
* @gedmo:Locale OR @gedmo:Language
36+
* @Gedmo\Locale OR @Gedmo\Language
3737
* to mark the field as locale used to override global
3838
* locale settings from TranslatableListener
3939
*/

src/Tree/Node.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
namespace Gedmo\Tree;
1111

1212
/**
13-
* This interface is not necessary but can be implemented for
14-
* Entities which in some cases needs to be identified as
15-
* Tree Node
13+
* Marker interface for objects which can be identified as a tree node.
1614
*
1715
* @method void setSibling(self $node)
1816
* @method ?self getSibling()
@@ -24,25 +22,25 @@ interface Node
2422
// use now annotations instead of predefined methods, this interface is not necessary
2523

2624
/*
27-
* @gedmo:TreeLeft
28-
* to mark the field as "tree left" use property annotation @gedmo:TreeLeft
25+
* @Gedmo\TreeLeft
26+
* to mark the field as "tree left" use property annotation @Gedmo\TreeLeft
2927
* it will use this field to store tree left value
3028
*/
3129

3230
/*
33-
* @gedmo:TreeRight
34-
* to mark the field as "tree right" use property annotation @gedmo:TreeRight
31+
* @Gedmo\TreeRight
32+
* to mark the field as "tree right" use property annotation @Gedmo\TreeRight
3533
* it will use this field to store tree right value
3634
*/
3735

3836
/*
39-
* @gedmo:TreeParent
37+
* @Gedmo\TreeParent
4038
* in every tree there should be link to parent. To identify a relation
4139
* as parent relation to child use @Tree:Ancestor annotation on the related property
4240
*/
4341

4442
/*
45-
* @gedmo:TreeLevel
43+
* @Gedmo\TreeLevel
4644
* level of node.
4745
*/
4846

0 commit comments

Comments
 (0)