Zmiany pomiędzy wersją początkową i wersją 1 dla DeployerGuide/Others/eDokumentyApi/SetFeatureValue

Pokaż
Ignoruj:
Data i czas:
02/06/12 13:26:36 (12 years temu)
Autor:
TS (IP: 213.227.67.33)
Komentarz:

--

Legend:

Bez zmian
Dodane
Usunięte
Zmienione
  • DeployerGuide/Others/eDokumentyApi/SetFeatureValue

    v1 v1  
     1= [wiki:DeployerGuide Przewodnik wdrożeniowca] > Ustawienie cechy = 
     2 
     3 
     4''' Definicja parametrów: ''' 
     5{{{ 
     6#!php 
     7<?php 
     8 
     9/** 
     10 *  Ustawienie cechy 
     11 *    
     12 *  @param featid Int - Identyfikator cechy (features.featid) 
     13 *  @param tblnam String - Identyfikator tekstowy obiektu do jakiego jest przypisana cecha  
     14 *                          (contacts - Kontakty, types_of_documents_view - Dokumenty, processes - Sprawy, events - Zdarzenia,  
     15 *                          users - Pracownicy, devices - Urządzenia, depository - Produkty, resources - Zasoby) 
     16 *  @param tbl_id Int - Identyfikator obiektu, klucz główny wskazany w tblnam, gdzie tblnam to nazwa tabeli czyli dla contacts tbl_id = contid 
     17 *                          wyjątkiem są dokumenty tam tbl_id wskazuje na doc_id z tabeli documents 
     18 *  @param value Mixed - Wartość cechy. W przypadku cech wyboru definiowanych przez użytkownika (oznaczonych atrybutem multi_ w  
     19 *                          tabeli features_view) parametr ten musi być tablicą. 
     20 *                          Dodatkowo aby usunąć wartość z cechy value === NULL (nie pusty string a NULL) 
     21 *    
     22 *  @return int - 1 sukces, 0 w razie niepowodzenia 
     23 *    
     24 *  @throws Exception - SoapFault 
     25 */ 
     26Int setFeatureValue(Int featid, String tblnam, Int tbl_id, Mixed value) 
     27 
     28?> 
     29}}} 
     30 
     31''' Przykłady wywołań: ''' 
     32{{{ 
     33#!php 
     34 
     35// Plik MyService.php umieszczony w apps/edokumenty. 
     36// MyService.php 
     37<?php 
     38 
     39define('EDOK_API_LOGIN', 'developer'); 
     40define('EDOK_API_PASSWORD', 'developer'); 
     41define('DEFAULT_ENTITY_SYMBOL', 'demo'); 
     42 
     43require_once('./classes/eDokumentyApi/EDokApiClient.inc'); 
     44 
     45$options = array( 
     46    'location' => 'http://{host}:{port}/eDokumentyApi.php', 
     47    "uri" => "eDokumentyAPI", 
     48    'encoding'=>'UTF-8' 
     49); 
     50         
     51$client = new EDokApiClient(NULL, $options); 
     52$client->setUser(EDOK_API_LOGIN); 
     53$client->setPass(md5(EDOK_API_PASSWORD)); 
     54$header = new SoapHeader('eDokumentyAPI', 'entity_symbol', DEFAULT_ENTITY_SYMBOL); 
     55$client->__setSoapHeaders($header); 
     56 
     57 
     58 
     59?> 
     60}}}