public function getBusinessData()
    {
        $business = $this->getBusiness();

        if (!$business) {
            return array();
        }

        $data = array(
            'address' => array(
                'streetAddress' => $business->getAddress1(),
                'locality' => $business->getCity(),
                'postalCode' => $business->getPostCode(),
                'region' => $business->getState(),
            ),
            'dbaName' => $business->getDbaName(),
            'email' => $business->getEmail(),
            'legalName' => $business->getLegalName(),
            'taxId' => $business->getTaxId(),
        );

        // Remove null values
        $data = array_filter($data, function($value){
            return ! is_null($value);
        });

        if (empty($data)) {
            return $data;
        } else {
            return array('business' => $data);
        }
    }
public function getBusinessData()
    {
        $business = $this->getBusiness();

        if (!$business) {
            return array();
        }

        $data = array(
            'address' => array(
                'streetAddress' => $business->getAddress1(),
                'locality' => $business->getCity(),
                'postalCode' => $business->getPostCode(),
                'region' => $business->getState(),
            ),
            'dbaName' => $business->getDbaName(),
            'email' => $business->getEmail(),
            'legalName' => $business->getLegalName(),
            'taxId' => $business->getTaxId(),
        );

        // Remove null values
        $data = array_filter($data, function($value){
            return ! is_null($value);
        });

        if (empty($data)) {
            return $data;
        } else {
            return array('business' => $data);
        }
    }
public function getBusinessData ( ) { $ business = $ this -> getBusiness ( ) ; if ( ! $ business ) { return array ( ) ; } $ data = array ( 'address' => array ( 'streetAddress' => $ business -> getAddress1 ( ) , 'locality' => $ business -> getCity ( ) , 'postalCode' => $ business -> getPostCode ( ) , 'region' => $ business -> getState ( ) , ) , 'dbaName' => $ business -> getDbaName ( ) , 'email' => $ business -> getEmail ( ) , 'legalName' => $ business -> getLegalName ( ) , 'taxId' => $ business -> getTaxId ( ) , ) ; // Remove null values $ data = array_filter ( $ data , function ( $ value ) { return ! is_null ( $ value ) ; } ) ; if ( empty ( $ data ) ) { return $ data ; } else { return array ( 'business' => $ data ) ; } }
Get the business data.

@return array
Get the business data .