public function getUsedFields()
    {
        if (empty($this->usedFields)) {
            $this->usedFields = [];
            foreach (AddressField::getAll() as $field) {
                if (strpos($this->format, '%' . $field) !== false) {
                    $this->usedFields[] = $field;
                }
            }
        }

        return $this->usedFields;
    }
public function getUsedFields()
    {
        if (empty($this->usedFields)) {
            $this->usedFields = [];
            foreach (AddressField::getAll() as $field) {
                if (strpos($this->format, '%' . $field) !== false) {
                    $this->usedFields[] = $field;
                }
            }
        }

        return $this->usedFields;
    }
public function getUsedFields ( ) { if ( empty ( $ this -> usedFields ) ) { $ this -> usedFields = [ ] ; foreach ( AddressField :: getAll ( ) as $ field ) { if ( strpos ( $ this -> format , '%' . $ field ) !== false ) { $ this -> usedFields [ ] = $ field ; } } } return $ this -> usedFields ; }
Gets the list of used fields.

@return array An array of address fields.
Gets the list of used fields .