Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
en:create:functions:urnstatus [14.12.2014 12:47] – created alexander.ritteren:create:functions:urnstatus [14.12.2014 13:04] – [Example] alexander.ritter
Line 1: Line 1:
 ====== urnStatus() ====== ====== urnStatus() ======
  
-''array **urnStatus**(string //UrnenKennung//)''+''array **urnStatus**(string //urnIDs//)''
  
-Die Funktion ''urnStatus()'' liefert Informationen zum aktuellen Füllstand der angegeben Urne.+The function ''urnStatus()'' returns information concerning the status of the specified urns.
  
-  * //UrnenKennung//\\ Die Kennung der Urne, deren Status abgefragt werden soll.+  * //urnIDs//\\ The urn IDs whose status are to be retrieved
  
-===== Rückgabewert =====+===== Return Value =====
  
-Im Fehlerfallz.B. wenn es keine Urne mit der angegebenen Kennung gibtgibt die Funktion ''false'' zurückAnsonten wird ein Array mit den folgenden Schlüsseln zurückgegeben:+When an error occursfor exampleif there is no urn with the ID specified, the function returns ''false''Otherwise, an array is returned with the following keys:
  
-^Index^Bedeutung+^Index^Meaning
-|elements|Anzahl der Zettel (Elemente) in der Urne+|elements|Number of ballots (elements) in the urn
-|drawn|Anzahl der bisher insgesamt entnommenen und abgelegten Zettel+|drawn|Number of overall ballots already drawn and stored
-|round|Angabe, zum wievielten Mal die Urne gerade geleert wird (beginnt mit 1), entsprechend dem Rückgabewert von ''urnDraw()''+|round|Number of time the urn has been emptied (begins with 1), corresponding to the return value of ''urnDraw()''
-|done|Anzahl der Zettel, die __in der aktuellen Runde__ bereits gezogen wurdenWenn alle Zettel aus der Urne gezogen wurdenbeginnt die nächste Runde und die Anzahl der gezogenen Zettel wird auf zurückgesetzt.+|done|Numer of ballots already drawn __in the current round__If all ballots have been drawn from the urnthe next round commences and the number of ballots drawn is reset to 0| 
-|togo|Anzahl der Zettel, die __in der aktuellen Runde__ noch zur Ziehung bereit stehenWenn diese Zahl den Wert erreichtbeginnt eine neue Runde und der Wert wird auf die Anzahl der Zettel zurückgesetzt|+|togo|Number of ballots __in the current round__ that can still be drawnIf this number reaches 0, a new round begins and the value is reset to the number of ballots|
  
-===== Beispiel =====+===== Example =====
  
 <code php> <code php>
-$info = urnStatus('urne1'); +$info = urnStatus('urn1'); 
-html('<p>Noch '.$info['togo'].' von '.$info['elements'].' Gewinncodes verfügbar.</p>');+html('<p>Still '.$info['togo'].' out of '.$info['elements'].' prize codes available.</p>');
 </code> </code>
en/create/functions/urnstatus.txt · Last modified: 15.12.2014 15:01 by alexander.ritter
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki