Jyxo\Input\Chain::close PHP Method

close() public method

In case of a subchain returns its parent, the chain itself otherwise.
public close ( ) : self
return self
    public function close() : self
    {
        if (null === $this->getParent()) {
            return $this;
        }
        return $this->getParent();
    }

Usage Example

Exemplo n.º 1
0
Arquivo: Fluent.php Projeto: jyxo/php
 /**
  * Closes a chain.
  *
  * @return \Jyxo\Input\Fluent
  */
 public function close() : self
 {
     $this->chain = $this->chain->close();
     return $this;
 }