Elastica\Type\Mapping::getParam PHP Method

getParam() public method

Get raw parameters.
See also: setParam
public getParam ( string $key ) : mixed
$key string Key name
return mixed $value Key value
    public function getParam($key)
    {
        return isset($this->_mapping[$key]) ? $this->_mapping[$key] : null;
    }

Usage Example

Example #1
0
 /**
  * @group functional
  */
 public function testGetters()
 {
     $index = $this->_createIndex();
     $type = $index->getType('test');
     $properties = array('firstname' => array('type' => 'string', 'store' => true), 'lastname' => array('type' => 'string'));
     $mapping = new Mapping($type, $properties);
     $all = array('enabled' => true, 'store' => true);
     $mapping->setParam('_all', $all);
     $get_all = $mapping->getParam('_all');
     $this->assertEquals($get_all, $all);
     $this->assertNull($mapping->getParam('_boost', $all));
     $this->assertEquals($properties, $mapping->getProperties());
     $index->delete();
 }