Elastica\Type\Mapping::setMeta PHP Метод

setMeta() публичный Метод

Sets the mapping _meta.
public setMeta ( array $meta )
$meta array metadata
    public function setMeta(array $meta)
    {
        return $this->setParam('_meta', $meta);
    }

Usage Example

Пример #1
0
 /**
  * @group functional
  */
 public function testSetMeta()
 {
     $index = $this->_createIndex();
     $type = $index->getType('test');
     $mapping = new Mapping($type, array('firstname' => array('type' => 'string', 'store' => true), 'lastname' => array('type' => 'string')));
     $mapping->setMeta(array('class' => 'test'));
     $type->setMapping($mapping);
     $mappingData = $type->getMapping();
     $this->assertEquals('test', $mappingData['test']['_meta']['class']);
     $index->delete();
 }
All Usage Examples Of Elastica\Type\Mapping::setMeta