public static function fromNative()
    {
        $args = func_get_args();

        if (\count($args) < 2) {
            throw new \BadMethodCallException('You must provide from 2 to 4 arguments: 1) street name, 2) street number, 3) elements, 4) format (optional)');
        }

        $nameString     = $args[0];
        $numberString   = $args[1];
        $elementsString = isset($args[2]) ? $args[2] : null;
        $formatString   = isset($args[3]) ? $args[3] : null;

        $name     = new StringLiteral($nameString);
        $number   = new StringLiteral($numberString);
        $elements = $elementsString ? new StringLiteral($elementsString) : null;
        $format   = $formatString ? new StringLiteral($formatString) : null;

        return new self($name, $number, $elements, $format);
    }
public static function fromNative()
    {
        $args = func_get_args();

        if (\count($args) < 2) {
            throw new \BadMethodCallException('You must provide from 2 to 4 arguments: 1) street name, 2) street number, 3) elements, 4) format (optional)');
        }

        $nameString     = $args[0];
        $numberString   = $args[1];
        $elementsString = isset($args[2]) ? $args[2] : null;
        $formatString   = isset($args[3]) ? $args[3] : null;

        $name     = new StringLiteral($nameString);
        $number   = new StringLiteral($numberString);
        $elements = $elementsString ? new StringLiteral($elementsString) : null;
        $format   = $formatString ? new StringLiteral($formatString) : null;

        return new self($name, $number, $elements, $format);
    }
public static function fromNative ( ) { $ args = func_get_args ( ) ; if ( \ count ( $ args ) < 2 ) { throw new \ BadMethodCallException ( 'You must provide from 2 to 4 arguments: 1) street name, 2) street number, 3) elements, 4) format (optional)' ) ; } $ nameString = $ args [ 0 ] ; $ numberString = $ args [ 1 ] ; $ elementsString = isset ( $ args [ 2 ] ) ? $ args [ 2 ] : null ; $ formatString = isset ( $ args [ 3 ] ) ? $ args [ 3 ] : null ; $ name = new StringLiteral ( $ nameString ) ; $ number = new StringLiteral ( $ numberString ) ; $ elements = $ elementsString ? new StringLiteral ( $ elementsString ) : null ; $ format = $ formatString ? new StringLiteral ( $ formatString ) : null ; return new self ( $ name , $ number , $ elements , $ format ) ; }
Returns a new Street from native PHP string name and number.

@param string $name
@param string $number
@param string $elements
@return Street
@throws \BadFunctionCallException
Returns a new Street from native PHP string name and number .