-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
317 additions
and
17 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,69 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the ONGR package. | ||
* | ||
* (c) NFQ Technologies UAB <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace ONGR\ElasticsearchBundle\Annotation; | ||
|
||
/** | ||
* Annotation for property which points to inner object. | ||
* | ||
* @Annotation | ||
* @Target("PROPERTY") | ||
*/ | ||
final class HashMap | ||
{ | ||
const NAME = 'hash_map'; | ||
|
||
/** | ||
* Name of the type field. Defaults to normalized property name. | ||
* | ||
* @var string | ||
*/ | ||
public $name; | ||
|
||
/** | ||
* Property type for nested structure values. | ||
* | ||
* @var mixed | ||
* @Enum({ | ||
* "text", "keyword", | ||
* "long", "integer", "short", "byte", "double", "float", | ||
* "date", | ||
* "boolean", | ||
* "binary", | ||
* "geo_point", "geo_shape", | ||
* "ip", "completion", "token_count", "murmur3", "attachments", "percolator" | ||
* }) | ||
*/ | ||
public $type; | ||
|
||
/** | ||
* In this field you can define options. | ||
* | ||
* @var array | ||
*/ | ||
public $options = []; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function dump(array $exclude = []) | ||
{ | ||
return array_diff_key( | ||
array_merge( | ||
[ | ||
'type' => $this->type | ||
], | ||
$this->options | ||
), | ||
$exclude | ||
); | ||
} | ||
} |
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
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
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
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
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
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
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
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
Oops, something went wrong.