src/Util/Address.php
public static function fromStdClass($_address)
    {
      $address = new static();

      if(isset($_address->country))
        $address->setCountry($_address->country);

      if(isset($_address->state))
        $address->setState($_address->state);

      if(isset($_address->municipality))
        $address->setMunicipality($_address->municipality);

      if(isset($_address->city))
        $address->setCity($_address->city);

      if(isset($_address->district))
        $address->setDistrict($_address->district);

      if(isset($_address->neighbourhood))
        $address->setNeighbourhood($_address->neighbourhood);

      if(isset($_address->street))
        $address->setStreet($_address->street);

      if(isset($_address->number))
        $address->setNumber($_address->number);

      if(isset($_address->addition))
        $address->setAddition($_address->addition);

      if(isset($_address->zipcode))
        $address->setZipcode($_address->zipcode);

      return $address;
    }
public static function fromStdClass($_address)
    {
      $address = new static();

      if(isset($_address->country))
        $address->setCountry($_address->country);

      if(isset($_address->state))
        $address->setState($_address->state);

      if(isset($_address->municipality))
        $address->setMunicipality($_address->municipality);

      if(isset($_address->city))
        $address->setCity($_address->city);

      if(isset($_address->district))
        $address->setDistrict($_address->district);

      if(isset($_address->neighbourhood))
        $address->setNeighbourhood($_address->neighbourhood);

      if(isset($_address->street))
        $address->setStreet($_address->street);

      if(isset($_address->number))
        $address->setNumber($_address->number);

      if(isset($_address->addition))
        $address->setAddition($_address->addition);

      if(isset($_address->zipcode))
        $address->setZipcode($_address->zipcode);

      return $address;
    }
public static function fromStdClass ( $ _address ) { $ address = new static ( ) ; if ( isset ( $ _address -> country ) ) $ address -> setCountry ( $ _address -> country ) ; if ( isset ( $ _address -> state ) ) $ address -> setState ( $ _address -> state ) ; if ( isset ( $ _address -> municipality ) ) $ address -> setMunicipality ( $ _address -> municipality ) ; if ( isset ( $ _address -> city ) ) $ address -> setCity ( $ _address -> city ) ; if ( isset ( $ _address -> district ) ) $ address -> setDistrict ( $ _address -> district ) ; if ( isset ( $ _address -> neighbourhood ) ) $ address -> setNeighbourhood ( $ _address -> neighbourhood ) ; if ( isset ( $ _address -> street ) ) $ address -> setStreet ( $ _address -> street ) ; if ( isset ( $ _address -> number ) ) $ address -> setNumber ( $ _address -> number ) ; if ( isset ( $ _address -> addition ) ) $ address -> setAddition ( $ _address -> addition ) ; if ( isset ( $ _address -> zipcode ) ) $ address -> setZipcode ( $ _address -> zipcode ) ; return $ address ; }
Convert from StdClass

@param StdClass $_address
@return \LibX\Util\Address
Convert from StdClass