src/Jaspersoft/Service/OrganizationService.php
public function getAttributes(Organization $organization, $attributeNames = null)
    {
        $result = array();
        $url = self::makeAttributeUrl($organization->id, $attributeNames);
        $data = $this->service->prepAndSend($url, array(200, 204), 'GET', null, true);
        $jsonObj = json_decode($data);
        if (!empty($jsonObj)) {
            $result = array();
            foreach ($jsonObj->attribute as $attr) {
                $result[] = Attribute::createFromJSON($attr);
            }
            return $result;
        } else {
            return array();
        }
    }
public function getAttributes(Organization $organization, $attributeNames = null)
    {
        $result = array();
        $url = self::makeAttributeUrl($organization->id, $attributeNames);
        $data = $this->service->prepAndSend($url, array(200, 204), 'GET', null, true);
        $jsonObj = json_decode($data);
        if (!empty($jsonObj)) {
            $result = array();
            foreach ($jsonObj->attribute as $attr) {
                $result[] = Attribute::createFromJSON($attr);
            }
            return $result;
        } else {
            return array();
        }
    }
public function getAttributes ( Organization $ organization , $ attributeNames = null ) { $ result = array ( ) ; $ url = self :: makeAttributeUrl ( $ organization -> id , $ attributeNames ) ; $ data = $ this -> service -> prepAndSend ( $ url , array ( 200 , 204 ) , 'GET' , null , true ) ; $ jsonObj = json_decode ( $ data ) ; if ( ! empty ( $ jsonObj ) ) { $ result = array ( ) ; foreach ( $ jsonObj -> attribute as $ attr ) { $ result [ ] = Attribute :: createFromJSON ( $ attr ) ; } return $ result ; } else { return array ( ) ; } }
Retrieve attributes of an organization.

@param Organization $organization
@param array $attributeNames
@return null|array
@throws \Exception
Retrieve attributes of an organization .