SimpleSoftwareIO\QrCode\DataTypes\Geo::create PHP Method

create() public method

Generates the DataType Object and sets all of its properties.
public create ( array $arguments )
$arguments array
    public function create(array $arguments)
    {
        $this->latitude = $arguments[0];
        $this->longitude = $arguments[1];
    }

Usage Example

Example #1
0
 public function test_it_generates_the_proper_format_for_a_geo_coordinate()
 {
     $geo = new Geo();
     $geo->create([10.254, -30.254]);
     $properFormat = 'geo:10.254,-30.254';
     $this->assertEquals($properFormat, strval($geo));
 }