src/Payloads/IndexPayload.php
public function useAlias($alias)
    {
        $aliasGetter = 'get'.ucfirst($alias).'Alias';

        if (! method_exists($this->indexConfigurator, $aliasGetter)) {
            throw new Exception(sprintf(
                'The index configurator %s doesn\'t have getter for the %s alias.',
                get_class($this->indexConfigurator),
                $alias
            ));
        }

        $this->payload['index'] = call_user_func([$this->indexConfigurator, $aliasGetter]);

        return $this;
    }
public function useAlias($alias)
    {
        $aliasGetter = 'get'.ucfirst($alias).'Alias';

        if (! method_exists($this->indexConfigurator, $aliasGetter)) {
            throw new Exception(sprintf(
                'The index configurator %s doesn\'t have getter for the %s alias.',
                get_class($this->indexConfigurator),
                $alias
            ));
        }

        $this->payload['index'] = call_user_func([$this->indexConfigurator, $aliasGetter]);

        return $this;
    }
public function useAlias ( $ alias ) { $ aliasGetter = 'get' . ucfirst ( $ alias ) . 'Alias' ; if ( ! method_exists ( $ this -> indexConfigurator , $ aliasGetter ) ) { throw new Exception ( sprintf ( 'The index configurator %s doesn\'t have getter for the %s alias.' , get_class ( $ this -> indexConfigurator ) , $ alias ) ) ; } $ this -> payload [ 'index' ] = call_user_func ( [ $ this -> indexConfigurator , $ aliasGetter ] ) ; return $ this ; }
Use an alias.

@param string $alias
@return $this
@throws \Exception
Use an alias .