-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added version as metadata field. (#715)
* Added version as metadata field. * Added proper annotations and fixed PSR2 style issues. * Changed the line ending character from CRLF to LF
- Loading branch information
1 parent
ca1dba0
commit b996c48
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the ONGR package. | ||
* | ||
* (c) NFQ Technologies UAB <info@nfq.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace ONGR\ElasticsearchBundle\Annotation; | ||
|
||
/** | ||
* Associates document property with _version meta-field. | ||
* | ||
* @Annotation | ||
* @Target("PROPERTY") | ||
*/ | ||
final class Version implements MetaField | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getName() | ||
{ | ||
return '_version'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getSettings() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters