src/Util/Address.php
public function toArray()
    {
      $_address = [];

      if($this->hasCountry())
        $_address['country'] = $this->getCountry();

      if($this->hasState())
        $_address['state'] = $this->getState();

      if($this->hasMunicipality())
        $_address['municipality'] = $this->getMunicipality();

      if($this->hasCity())
        $_address['city'] = $this->getCity();

      if($this->hasDistrict())
        $_address['district'] = $this->getDistrict();

      if($this->hasNeighbourhood())
        $_address['neighbourhood'] = $this->getNeighbourhood();

      if($this->hasStreet())
        $_address['street'] = $this->getStreet();

      if($this->hasNumber())
        $_address['number'] = $this->getNumber();

      if($this->hasAddition())
        $_address['addition'] = $this->getAddition();

      if($this->hasZipcode())
        $_address['zipcode'] = $this->getZipcode();

      return $_address;
    }
public function toArray()
    {
      $_address = [];

      if($this->hasCountry())
        $_address['country'] = $this->getCountry();

      if($this->hasState())
        $_address['state'] = $this->getState();

      if($this->hasMunicipality())
        $_address['municipality'] = $this->getMunicipality();

      if($this->hasCity())
        $_address['city'] = $this->getCity();

      if($this->hasDistrict())
        $_address['district'] = $this->getDistrict();

      if($this->hasNeighbourhood())
        $_address['neighbourhood'] = $this->getNeighbourhood();

      if($this->hasStreet())
        $_address['street'] = $this->getStreet();

      if($this->hasNumber())
        $_address['number'] = $this->getNumber();

      if($this->hasAddition())
        $_address['addition'] = $this->getAddition();

      if($this->hasZipcode())
        $_address['zipcode'] = $this->getZipcode();

      return $_address;
    }
public function toArray ( ) { $ _address = [ ] ; if ( $ this -> hasCountry ( ) ) $ _address [ 'country' ] = $ this -> getCountry ( ) ; if ( $ this -> hasState ( ) ) $ _address [ 'state' ] = $ this -> getState ( ) ; if ( $ this -> hasMunicipality ( ) ) $ _address [ 'municipality' ] = $ this -> getMunicipality ( ) ; if ( $ this -> hasCity ( ) ) $ _address [ 'city' ] = $ this -> getCity ( ) ; if ( $ this -> hasDistrict ( ) ) $ _address [ 'district' ] = $ this -> getDistrict ( ) ; if ( $ this -> hasNeighbourhood ( ) ) $ _address [ 'neighbourhood' ] = $ this -> getNeighbourhood ( ) ; if ( $ this -> hasStreet ( ) ) $ _address [ 'street' ] = $ this -> getStreet ( ) ; if ( $ this -> hasNumber ( ) ) $ _address [ 'number' ] = $ this -> getNumber ( ) ; if ( $ this -> hasAddition ( ) ) $ _address [ 'addition' ] = $ this -> getAddition ( ) ; if ( $ this -> hasZipcode ( ) ) $ _address [ 'zipcode' ] = $ this -> getZipcode ( ) ; return $ _address ; }
Convert address to array

@param void
@return NULL[]
Convert address to array