public function open($name, array $args = [])
    {
        if (! is_string($name)) {
            throw new InvalidArgumentException('Foil block name must be in a string.');
        }
        if (! array_key_exists($name, $this->blocks)) {
            throw new InvalidArgumentException("{$name} is not a registered Foil block.");
        }
        /** @var \Foil\Blocks\Block $buffer */
        $buffer = $this->blocks[$name];
        $buffer->open($args);
        $this->buffers->push([$buffer, $name]);
    }
public function open($name, array $args = [])
    {
        if (! is_string($name)) {
            throw new InvalidArgumentException('Foil block name must be in a string.');
        }
        if (! array_key_exists($name, $this->blocks)) {
            throw new InvalidArgumentException("{$name} is not a registered Foil block.");
        }
        /** @var \Foil\Blocks\Block $buffer */
        $buffer = $this->blocks[$name];
        $buffer->open($args);
        $this->buffers->push([$buffer, $name]);
    }
public function open ( $ name , array $ args = [ ] ) { if ( ! is_string ( $ name ) ) { throw new InvalidArgumentException ( 'Foil block name must be in a string.' ) ; } if ( ! array_key_exists ( $ name , $ this -> blocks ) ) { throw new InvalidArgumentException ( "{$name} is not a registered Foil block." ) ; } /** @var \Foil\Blocks\Block $buffer */ $ buffer = $ this -> blocks [ $ name ] ; $ buffer -> open ( $ args ) ; $ this -> buffers -> push ( [ $ buffer , $ name ] ) ; }
Open given block if it is valid.

@param string $name
@param array  $args
Open given block if it is valid .