public static function parse($varLine)
    {
        $parts = explode('=', $varLine, 2);
        if (!$parts || count($parts) !== 2) {
            throw new \InvalidArgumentException("Line does not appear to contain a variable");
        }

        $variable = new Variable();
        $variable->setName(trim(array_shift($parts)))
            ->setValue(trim(array_shift($parts)));

        return $variable;
    }
public static function parse($varLine)
    {
        $parts = explode('=', $varLine, 2);
        if (!$parts || count($parts) !== 2) {
            throw new \InvalidArgumentException("Line does not appear to contain a variable");
        }

        $variable = new Variable();
        $variable->setName(trim(array_shift($parts)))
            ->setValue(trim(array_shift($parts)));

        return $variable;
    }
public static function parse ( $ varLine ) { $ parts = explode ( '=' , $ varLine , 2 ) ; if ( ! $ parts || count ( $ parts ) !== 2 ) { throw new \ InvalidArgumentException ( "Line does not appear to contain a variable" ) ; } $ variable = new Variable ( ) ; $ variable -> setName ( trim ( array_shift ( $ parts ) ) ) -> setValue ( trim ( array_shift ( $ parts ) ) ) ; return $ variable ; }
Parse a variable line

@param string $varLine
@return Variable
Parse a variable line