protected function createLabel($label)
    {
        if (!is_string($label)) {
            throw new InvalidArgumentException(
                "Provided label is not a string or an ElementInterface ".
                "interface object."
            );
        }

        $element = class_exists($label)
            ? $this->createLabelFromClass($label)
            : new Label('', $label);

        return $element;
    }
protected function createLabel($label)
    {
        if (!is_string($label)) {
            throw new InvalidArgumentException(
                "Provided label is not a string or an ElementInterface ".
                "interface object."
            );
        }

        $element = class_exists($label)
            ? $this->createLabelFromClass($label)
            : new Label('', $label);

        return $element;
    }
protected function createLabel ( $ label ) { if ( ! is_string ( $ label ) ) { throw new InvalidArgumentException ( "Provided label is not a string or an ElementInterface " . "interface object." ) ; } $ element = class_exists ( $ label ) ? $ this -> createLabelFromClass ( $ label ) : new Label ( '' , $ label ) ; return $ element ; }
Creates label from string

@param string $label

@return ElementInterface|Label
Creates label from string