# php_manual

id: Ds\Map::last
type: function
doc:
<comment>Description:</comment>
  Returns the last pair of the map
  
  Returns the last pair of the map.

<comment>Return:</comment>
  <info>Ds\Pair</info>  The last pair of the map.


id: Ds\Map::map
type: function
doc:
<comment>Description:</comment>
  Returns the result of applying a callback to each value
  
  Returns the result of applying a <strong>$callback</strong> function to each value of the map.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>mixed</info>callback<info>mixed</info><strong>$key</strong><info>mixed</info><strong>$value</strong>
                       
                       A <info>callable</info> to apply to each value in the map.
                       
                       The callable should return what the key will be mapped to in the resulting
                       map.

<comment>Return:</comment>
  <info>Ds\Map</info>  The result of applying a <strong>$callback</strong> to each value in the map.
          
          The keys and values of the current instance won't be affected.


id: Ds\Map::merge
type: function
doc:
<comment>Description:</comment>
  Returns the result of adding all given associations
  
  Returns the result of associating all keys of a given <class>traversable</class> object or <info>array</info> with their
  corresponding values, combined with the current instance.
  
  Values of the current instance will be overwritten by those provided where keys are equal.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  A <class>traversable</class> object or an <info>array</info>.

<comment>Return:</comment>
  <info>Ds\Map</info>  The result of associating all keys of a given <class>traversable</class> object or <info>array</info> with their
          corresponding values, combined with the current instance.
          
          The current instance won't be affected.


id: Ds\Map::pairs
type: function
doc:
<comment>Description:</comment>
  Returns a sequence containing all the pairs of the map
  
  Returns a <class>Ds\Sequence</class> containing all the pairs of the map.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  <class>Ds\Sequence</class> containing all the pairs of the map.


id: Ds\Map::put
type: function
doc:
<comment>Description:</comment>
  Associates a key with a value
  
  Associates a <strong>$key</strong> with a <strong>$value</strong>, overwriting a previous association if one exists.
  
  Keys of type <info>object</info> are supported.
   If an object implements <class>Ds\Hashable</class>, equality will be determined by the object's equals function.
   If an object does not implement <class>Ds\Hashable</class>, objects must be references to the same instance to
  be considered equal.
  
  You can also use array syntax to associate values by key, eg. $map["key"] = $value.
  
  Be careful when using array syntax. Scalar keys will be coerced to integers by the engine. For
  example, $map["1"] will attempt to access int(1), while $map-&gt;get("1") will correctly look up
  the string key.
  
  See Arrays.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$key</strong>    The key to associate the value with.
  <info>mixed</info>  <strong>$value</strong>  The value to be associated with the key.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Map::putAll
type: function
doc:
<comment>Description:</comment>
  Associates all key-value pairs of a traversable object or array
  
  Associates all key-value <strong>$pairs</strong> of a <class>traversable</class> object or <info>array</info>.
  
  Keys of type <info>object</info> are supported.
   If an object implements <class>Ds\Hashable</class>, equality will be determined by the object's equals function.
   If an object does not implement <class>Ds\Hashable</class>, objects must be references to the same instance to
  be considered equal.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$pairs</strong>  <class>traversable</class> object or <info>array</info>.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Map::reduce
type: function
doc:
<comment>Description:</comment>
  Reduces the map to a single value using a callback function
  
  Reduces the map to a single value using a callback function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
                       
                       The key of the current iteration.
                       
                       The value of the current iteration.
  <info>mixed</info>     <strong>$carry</strong>     The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
  <info>mixed</info>     <strong>$key</strong>       The key of the current iteration.
  <info>mixed</info>     <strong>$value</strong>     The value of the current iteration.
  <info>mixed</info>     <strong>$initial</strong>   The initial value of the carry value. Can be <info>null</info>.

<comment>Return:</comment>
  <info>mixed</info>  The return value of the final callback.


id: Ds\Map::remove
type: function
doc:
<comment>Description:</comment>
  Removes and returns a value by key
  
  Removes and returns a value by key, or return an optional default value if the key could not be
  found.
  
  Keys of type <info>object</info> are supported.
   If an object implements <class>Ds\Hashable</class>, equality will be determined by the object's equals function.
   If an object does not implement <class>Ds\Hashable</class>, objects must be references to the same instance to
  be considered equal.
  
  You can also use array syntax to access values by key, eg. $map["key"].
  
  Be careful when using array syntax. Scalar keys will be coerced to integers by the engine. For
  example, $map["1"] will attempt to access int(1), while $map-&gt;get("1") will correctly look up
  the string key.
  
  See Arrays.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$key</strong>      The key to remove.
  <info>mixed</info>  <strong>$default</strong>  The optional default value, returned if the key could not be found.

<comment>Return:</comment>
  <info>mixed</info>  The value that was removed, or the <strong>$default</strong> value if provided and the <strong>$key</strong> could not be
         found in the map.


id: Ds\Map::reverse
type: function
doc:
<comment>Description:</comment>
  Reverses the map in-place
    
  
  Reverses the map in-place.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Map::reversed
type: function
doc:
<comment>Description:</comment>
  Returns a reversed copy
  
  Returns a reversed copy of the map.

<comment>Return:</comment>
  <info>Ds\Map</info>  A reversed copy of the map.
            The current instance is not affected. 
          
          The current instance is not affected.


id: Ds\Map::skip
type: function
doc:
<comment>Description:</comment>
  Returns the pair at a given positional index
  
  Returns the pair at a given zero-based <strong>$position</strong>.

<comment>Param:</comment>
  <info>int</info>  <strong>$position</strong>  The zero-based positional index to return.

<comment>Return:</comment>
  <info>Ds\Pair</info>  Returns the <class>Ds\Pair</class> at the given <strong>$position</strong>.


id: Ds\Map::slice
type: function
doc:
<comment>Description:</comment>
  Returns a subset of the map defined by a starting index and length
    
  
  Returns a subset of the map defined by a starting <strong>$index</strong> and <strong>$length</strong>.

<comment>Param:</comment>
  <info>int</info>  <strong>$index</strong>   The index at which the range starts.
                
                If positive, the range will start at that index in the map. If negative, the range
                will start that far from the end.
  <info>int</info>  <strong>$length</strong>  If a length is given and is positive, the resulting map will have up to that many
                pairs in it.
                 If a length is given and is negative, the range will stop that many pairs from the
                end.
                 If the length results in an overflow, only pairs up to the end of the map will be
                included.
                 If a length is not provided, the resulting map will contain all pairs between the
                index and the end of the map.

<comment>Return:</comment>
  <info>Ds\Map</info>  A subset of the map defined by a starting index and length.


id: Ds\Map::sort
type: function
doc:
<comment>Description:</comment>
  Sorts the map in-place by value
   
  
  Sorts the map in-place by value, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Map::sorted
type: function
doc:
<comment>Description:</comment>
  Returns a copy, sorted by value
  
  Returns a copy, sorted by value using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>Ds\Map</info>  Returns a copy of the map, sorted by value.


id: Ds\Map::sum
type: function
doc:
<comment>Description:</comment>
  Returns the sum of all values in the map
  
  Returns the sum of all values in the map.
  
  Arrays and objects are considered equal to zero when calculating the sum.

<comment>Return:</comment>
  <info>int|float</info>  The sum of all the values in the map as either a <info>float</info> or <info>int</info> depending on the values
             in the map.


id: Ds\Map::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the map to an array
    
  
  Converts the map to an <info>array</info>.
  
  Maps where non-scalar keys are can't be converted to an <info>array</info>.
  
  An <info>array</info> will treat all numeric keys as integers, eg. "1" and 1 as keys in the map will only
  result in 1 being included in the array.
  
  Casting to an <info>array</info> is not supported yet.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the map.


id: Ds\Map::union
type: function
doc:
<comment>Description:</comment>
  Creates a new map using values from the current instance and another map
  
  Creates a new map that contains the pairs of the current instance as well as the pairs of another
  <strong>$map</strong>.
  
  A ∪ B = {x: x ∈ A ∨ x ∈ B}
  
  Values of the current instance will be overwritten by those provided where keys are equal.

<comment>Param:</comment>
  <info>Ds\Map</info>  <strong>$map</strong>  The other map, to combine with the current instance.

<comment>Return:</comment>
  <info>Ds\Map</info>  A new map containing all the pairs of the current instance as well as another <strong>$map</strong>.

<comment>See Also:</comment>
   * Union on Wikipedia


id: Ds\Map::values
type: function
doc:
<comment>Description:</comment>
  Returns a sequence of the map's values
  
  Returns a sequence containing all the values of the map, in the same order.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  A <class>Ds\Sequence</class> containing all the values of the map.


id: Ds\Map::xor
type: function
doc:
<comment>Description:</comment>
  Creates a new map using keys of either the current instance or of another map, but not of both
  
  Creates a new map containing keys of the current instance as well as another <strong>$map</strong>, but not of
  both.
  
  A ⊖ B = {x : x ∈ (A \ B) ∪ (B \ A)}

<comment>Param:</comment>
  <info>Ds\Map</info>  <strong>$map</strong>  The other map.

<comment>Return:</comment>
  <info>Ds\Map</info>  A new map containing keys in the current instance as well as another <strong>$map</strong>, but not in
          both.

<comment>See Also:</comment>
   * Symmetric Difference on Wikipedia


id: Ds\Pair
type: class
doc:
<comment>Description:</comment>
  A pair is used by <class>Ds\Map</class> to pair keys with values.


id: Ds\Pair::__construct
type: function
doc:
<comment>Description:</comment>
  Creates a new instance
  
  Creates a new instance using a given <strong>$key</strong> and <strong>$value</strong>.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$key</strong>    The key.
  <info>mixed</info>  <strong>$value</strong>  The value.


id: Ds\Pair::clear
type: function
doc:
<comment>Description:</comment>
  Removes all values
  
  Removes all values from the pair.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Pair::copy
type: function
doc:
<comment>Description:</comment>
  Returns a shallow copy of the pair
  
  Returns a shallow copy of the pair.

<comment>Return:</comment>
  <info>Ds\Pair</info>  Returns a shallow copy of the pair.


id: Ds\Pair::isEmpty
type: function
doc:
<comment>Description:</comment>
  Returns whether the pair is empty
  
  Returns whether the pair is empty.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the pair is empty, <info>false</info> otherwise.


id: Ds\Pair::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the pair to an array
    
  
  Converts the pair to an <info>array</info>.
  
  Casting to an <info>array</info> is not supported yet.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the pair.


id: Ds\PriorityQueue
type: class
doc:
<comment>Description:</comment>
  A PriorityQueue is very similar to a Queue. Values are pushed into the queue with an assigned
  priority, and the value with the highest priority will always be at the front of the queue.
  
  Implemented using a max heap.
  
  "First in, first out" ordering is preserved for values with the same priority.
  
  Iterating over a PriorityQueue is destructive, equivalent to successive pop operations until the
  queue is empty.


id: Ds\PriorityQueue::clear
type: function
doc:
<comment>Description:</comment>
  Removes all values
  
  Removes all values from the queue.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\PriorityQueue::copy
type: function
doc:
<comment>Description:</comment>
  Returns a shallow copy of the queue
  
  Returns a shallow copy of the queue.

<comment>Return:</comment>
  <info>Ds\PriorityQueue</info>  Returns a shallow copy of the queue.


id: Ds\PriorityQueue::count
type: function
doc:
<comment>Description:</comment>
  Returns the number of values in the queue
  
  See <strong>Countable::count()</strong>


id: Ds\PriorityQueue::isEmpty
type: function
doc:
<comment>Description:</comment>
  Returns whether the queue is empty
  
  Returns whether the queue is empty.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the queue is empty, <info>false</info> otherwise.


id: Ds\PriorityQueue::peek
type: function
doc:
<comment>Description:</comment>
  Returns the value at the front of the queue
  
  Returns the value at the front of the queue, but does not remove it.

<comment>Return:</comment>
  <info>mixed</info>  The value at the front of the queue.


id: Ds\PriorityQueue::pop
type: function
doc:
<comment>Description:</comment>
  Removes and returns the value with the highest priority
  
  Removes and returns the value at the front of the queue, ie. the value with the highest priority.
  
  Values with equal priority fall back to FIFO (first in first out).

<comment>Return:</comment>
  <info>mixed</info>  The removed value which was at the front of the queue.


id: Ds\PriorityQueue::push
type: function
doc:
<comment>Description:</comment>
  Pushes values into the queue
  
  Pushes a <strong>$value</strong> with a given <strong>$priority</strong> into the queue.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$value</strong>     The value to push into the queue.
  <info>int</info>    <strong>$priority</strong>  The priority associated with the value.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\PriorityQueue::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the queue to an array
    
  
  Converts the queue to an <info>array</info>.
  
  This method is not destructive.
  
  Casting to an <info>array</info> is not supported yet.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the queue.


id: Ds\Queue
type: class
doc:
<comment>Description:</comment>
  A Queue is a “first in, first out” or “FIFO” collection that only allows access to the value at
  the front of the queue and iterates in that order, destructively.


id: Ds\Queue::allocate
type: function
doc:
<comment>Description:</comment>
  Allocates enough memory for a required capacity
  
  Ensures that enough memory is allocated for a required capacity. This removes the need to
  reallocate the internal as values are added.
  
  Capacity will always be rounded up to the nearest power of 2.

<comment>Param:</comment>
  <info>int</info>  <strong>$capacity</strong>  The number of values for which capacity should be allocated.
                  
                  Capacity will stay the same if this value is less than or equal to the current
                  capacity.
                  
                  Capacity will always be rounded up to the nearest power of 2.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Queue::copy
type: function
doc:
<comment>Description:</comment>
  Returns a shallow copy of the queue
  
  Returns a shallow copy of the queue.

<comment>Return:</comment>
  <info>Ds\Queue</info>  Returns a shallow copy of the queue.


id: Ds\Queue::pop
type: function
doc:
<comment>Description:</comment>
  Removes and returns the value at the front of the queue
  
  Removes and returns the value at the front of the queue.

<comment>Return:</comment>
  <info>mixed</info>  The removed value which was at the front of the queue.


id: Ds\Queue::push
type: function
doc:
<comment>Description:</comment>
  Pushes values into the queue
  
  Pushes <strong>$values</strong> into the queue.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to push into the queue.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Queue::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the queue to an array
    
  
  Converts the queue to an <info>array</info>.
  
  Casting to an <info>array</info> is not supported yet.
  
  This method is not destructive.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the queue.


id: Ds\Sequence
type: class
doc:
<comment>Description:</comment>
  A Sequence describes the behaviour of values arranged in a single, linear dimension. Some
  languages refer to this as a "List". It’s similar to an array that uses incremental integer keys,
  with the exception of a few characteristics: Values will always be indexed as [0, 1, 2, …, size -
  1].Only allowed to access values by index in the range [0, size - 1].
  
  Use cases: Wherever you would use an array as a list (not concerned with keys).A more efficient
  alternative to <class>SplDoublyLinkedList</class> and <class>SplFixedArray</class>.


id: Ds\Sequence::allocate
type: function
doc:
<comment>Description:</comment>
  Allocates enough memory for a required capacity
  
  Ensures that enough memory is allocated for a required capacity. This removes the need to
  reallocate the internal as values are added.

<comment>Param:</comment>
  <info>int</info>  <strong>$capacity</strong>  The number of values for which capacity should be allocated.
                  
                  Capacity will stay the same if this value is less than or equal to the current
                  capacity.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Sequence::apply
type: function
doc:
<comment>Description:</comment>
  Updates all values by applying a callback function to each value
  
  Updates all values by applying a <strong>$callback</strong> function to each value in the sequence.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>mixed</info>callback<info>mixed</info><strong>$value</strong>
                       
                       A <info>callable</info> to apply to each value in the sequence.
                       
                       The callback should return what the value should be replaced by.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Sequence::contains
type: function
doc:
<comment>Description:</comment>
  Determines if the sequence contains given values
  
  Determines if the sequence contains all values.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  Values to check.

<comment>Return:</comment>
  <info>bool</info>  <info>false</info> if any of the provided <strong>$values</strong> are not in the sequence, <info>true</info> otherwise.


id: Ds\Sequence::filter
type: function
doc:
<comment>Description:</comment>
  Creates a new sequence using a callable to
      determine which values to include
   
  
  Creates a new sequence using a <info>callable</info> to determine which values to include.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>bool</info>callback<info>mixed</info><strong>$value</strong>
                       
                       Optional <info>callable</info> which returns <info>true</info> if the value should be included, <info>false</info>
                       otherwise.
                       
                       If a callback is not provided, only values which are <info>true</info> (see converting to
                       boolean) will be included.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  A new sequence containing all the values for which either the <strong>$callback</strong> returned
               <info>true</info>, or all values that convert to <info>true</info> if a <strong>$callback</strong> was not provided.


id: Ds\Sequence::first
type: function
doc:
<comment>Description:</comment>
  Returns the first value in the sequence
  
  Returns the first value in the sequence.

<comment>Return:</comment>
  <info>mixed</info>  The first value in the sequence.


id: Ds\Sequence::insert
type: function
doc:
<comment>Description:</comment>
  Inserts values at a given index
  
  Inserts values into the sequence at a given index.

<comment>Param:</comment>
  <info>int</info>    <strong>$index</strong>   The index at which to insert. 0 \<= index \<= count
                  
                  You can insert at the index equal to the number of values.
  <info>mixed</info>  <strong>$values</strong>  The value or values to insert.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Sequence::join
type: function
doc:
<comment>Description:</comment>
  Joins all values together as a string
  
  Joins all values together as a string using an optional separator between each value.

<comment>Param:</comment>
  <info>string</info>  <strong>$glue</strong>  An optional string to separate each value.

<comment>Return:</comment>
  <info>string</info>  All values of the sequence joined together as a string.


id: Ds\Sequence::last
type: function
doc:
<comment>Description:</comment>
  Returns the last value
  
  Returns the last value in the sequence.

<comment>Return:</comment>
  <info>mixed</info>  The last value in the sequence.


id: Ds\Sequence::map
type: function
doc:
<comment>Description:</comment>
  Returns the result of applying a callback to each value
  
  Returns the result of applying a <strong>$callback</strong> function to each value in the sequence.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>mixed</info>callback<info>mixed</info><strong>$value</strong>
                       
                       A <info>callable</info> to apply to each value in the sequence.
                       
                       The callable should return what the new value will be in the new sequence.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  The result of applying a <strong>$callback</strong> to each value in the sequence.
               
               The values of the current instance won't be affected.


id: Ds\Sequence::merge
type: function
doc:
<comment>Description:</comment>
  Returns the result of adding all given values to the sequence
  
  Returns the result of adding all given values to the sequence.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  A <class>traversable</class> object or an <info>array</info>.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  The result of adding all given values to the sequence, effectively the same as adding
               the values to a copy, then returning that copy.
               
               The current instance won't be affected.


id: Ds\Sequence::push
type: function
doc:
<comment>Description:</comment>
  Adds values to the end of the sequence
  
  Adds values to the end of the sequence.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to add.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Sequence::reduce
type: function
doc:
<comment>Description:</comment>
  Reduces the sequence to a single value using a callback function
  
  Reduces the sequence to a single value using a callback function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
                       
                       The value of the current iteration.
  <info>mixed</info>     <strong>$carry</strong>     The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
  <info>mixed</info>     <strong>$value</strong>     The value of the current iteration.
  <info>mixed</info>     <strong>$initial</strong>   The initial value of the carry value. Can be <info>null</info>.

<comment>Return:</comment>
  <info>mixed</info>  The return value of the final callback.


id: Ds\Sequence::reverse
type: function
doc:
<comment>Description:</comment>
  Reverses the sequence in-place
    
  
  Reverses the sequence in-place.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Sequence::reversed
type: function
doc:
<comment>Description:</comment>
  Returns a reversed copy
  
  Returns a reversed copy of the sequence.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  A reversed copy of the sequence.
                 The current instance is not affected. 
               
               The current instance is not affected.


id: Ds\Sequence::rotate
type: function
doc:
<comment>Description:</comment>
  Rotates the sequence by a given number of rotations
  
  Rotates the sequence by a given number of rotations, which is equivalent to successively calling
  $sequence-&gt;push($sequence-&gt;shift()) if the number of rotations is positive, or
  $sequence-&gt;unshift($sequence-&gt;pop()) if negative.

<comment>Param:</comment>
  <info>int</info>  <strong>$rotations</strong>  The number of times the sequence should be rotated.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.. The sequence of the current instance will be rotated.


id: Ds\Sequence::slice
type: function
doc:
<comment>Description:</comment>
  Returns a sub-sequence of a given range
    
  
  Creates a sub-sequence of a given range.

<comment>Param:</comment>
  <info>int</info>  <strong>$index</strong>   The index at which the sub-sequence starts.
                
                If positive, the sequence will start at that index in the sequence. If negative, the
                sequence will start that far from the end.
  <info>int</info>  <strong>$length</strong>  If a length is given and is positive, the resulting sequence will have up to that
                many values in it.
                 If the length results in an overflow, only values up to the end of the sequence
                will be included.
                 If a length is given and is negative, the sequence will stop that many values from
                the end.
                 If a length is not provided, the resulting sequence will contain all values between
                the index and the end of the sequence.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  A sub-sequence of the given range.


id: Ds\Sequence::sort
type: function
doc:
<comment>Description:</comment>
  Sorts the sequence in-place
   
  
  Sorts the sequence in-place, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Sequence::sorted
type: function
doc:
<comment>Description:</comment>
  Returns a sorted copy
  
  Returns a sorted copy, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>Ds\Sequence</info>  Returns a sorted copy of the sequence.


id: Ds\Sequence::sum
type: function
doc:
<comment>Description:</comment>
  Returns the sum of all values in the sequence
  
  Returns the sum of all values in the sequence.
  
  Arrays and objects are considered equal to zero when calculating the sum.

<comment>Return:</comment>
  <info>int|float</info>  The sum of all the values in the sequence as either a <info>float</info> or <info>int</info> depending on the
             values in the sequence.


id: Ds\Sequence::unshift
type: function
doc:
<comment>Description:</comment>
  Adds values to the front of the sequence
  
  Adds values to the front of the sequence, moving all the current values forward to make room for
  the new values.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to add to the front of the sequence.  Multiple values will be added in
                  the same order that they are passed.
                  
                  Multiple values will be added in the same order that they are passed.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Set
type: class
doc:
<comment>Description:</comment>
  A Set is a sequence of unique values. This implementation uses the same hash table as <class>Ds\Map</class>,
  where values are used as keys and the mapped value is ignored.


id: Ds\Set::add
type: function
doc:
<comment>Description:</comment>
  Adds values to the set
  
  Adds all given values to the set that haven't already been added.
  
  Values of type <info>object</info> are supported.
   If an object implements <class>Ds\Hashable</class>, equality will be determined by the object's equals function.
   If an object does not implement <class>Ds\Hashable</class>, objects must be references to the same instance to
  be considered equal.
  
  All comparisons are strict (type and value).

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  Values to add to the set.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Set::clear
type: function
doc:
<comment>Description:</comment>
  Removes all values
  
  Removes all values from the set.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Set::contains
type: function
doc:
<comment>Description:</comment>
  Determines if the set contains all values
  
  Determines if the set contains all values.
  
  Values of type <info>object</info> are supported.
   If an object implements <class>Ds\Hashable</class>, equality will be determined by the object's equals function.
   If an object does not implement <class>Ds\Hashable</class>, objects must be references to the same instance to
  be considered equal.
  
  All comparisons are strict (type and value).

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  Values to check.

<comment>Return:</comment>
  <info>bool</info>  <info>false</info> if any of the provided <strong>$values</strong> are not in the set, <info>true</info> otherwise.


id: Ds\Set::copy
type: function
doc:
<comment>Description:</comment>
  Returns a shallow copy of the set
  
  Returns a shallow copy of the set.

<comment>Return:</comment>
  <info>Ds\Set</info>  Returns a shallow copy of the set.


id: Ds\Set::count
type: function
doc:
<comment>Description:</comment>
  Returns the number of values in the set
  
  See <strong>Countable::count()</strong>


id: Ds\Set::diff
type: function
doc:
<comment>Description:</comment>
  Creates a new set using values that aren't in another set
  
  Creates a new set using values that aren't in another set.
  
  A \ B = {x ∈ A | x ∉ B}

<comment>Param:</comment>
  <info>Ds\Set</info>  <strong>$set</strong>  Set containing the values to exclude.

<comment>Return:</comment>
  <info>Ds\Set</info>  A new set containing all values that were not in the other <strong>$set</strong>.

<comment>See Also:</comment>
   * Complement on Wikipedia


id: Ds\Set::filter
type: function
doc:
<comment>Description:</comment>
  Creates a new set using a callable to
      determine which values to include
    
  
  Creates a new set using a <info>callable</info> to determine which values to include.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>bool</info>callback<info>mixed</info><strong>$value</strong>
                       
                       Optional <info>callable</info> which returns <info>true</info> if the value should be included, <info>false</info>
                       otherwise.
                       
                       If a callback is not provided, only values which are <info>true</info> (see converting to
                       boolean) will be included.

<comment>Return:</comment>
  <info>Ds\Set</info>  A new set containing all the values for which either the <strong>$callback</strong> returned <info>true</info>, or all
          values that convert to <info>true</info> if a <strong>$callback</strong> was not provided.


id: Ds\Set::first
type: function
doc:
<comment>Description:</comment>
  Returns the first value in the set
  
  Returns the first value in the set.

<comment>Return:</comment>
  <info>mixed</info>  The first value in the set.


id: Ds\Set::intersect
type: function
doc:
<comment>Description:</comment>
  Creates a new set by intersecting values with another set
  
  Creates a new set using values common to both the current instance and another <strong>$set</strong>.
   In other words, returns a copy of the current instance with all values removed that are not in
  the other <strong>$set</strong>.
  
  A ∩ B = {x : x ∈ A ∧ x ∈ B}

<comment>Param:</comment>
  <info>Ds\Set</info>  <strong>$set</strong>  The other set.

<comment>Return:</comment>
  <info>Ds\Set</info>  The intersection of the current instance and another <strong>$set</strong>.

<comment>See Also:</comment>
   * Intersection on Wikipedia


id: Ds\Set::isEmpty
type: function
doc:
<comment>Description:</comment>
  Returns whether the set is empty
  
  Returns whether the set is empty.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the set is empty, <info>false</info> otherwise.


id: Ds\Set::join
type: function
doc:
<comment>Description:</comment>
  Joins all values together as a string
  
  Joins all values together as a string using an optional separator between each value.

<comment>Param:</comment>
  <info>string</info>  <strong>$glue</strong>  An optional string to separate each value.

<comment>Return:</comment>
  <info>string</info>  All values of the set joined together as a string.


id: Ds\Set::last
type: function
doc:
<comment>Description:</comment>
  Returns the last value in the set
  
  Returns the last value in the set.

<comment>Return:</comment>
  <info>mixed</info>  The last value in the set.


id: Ds\Set::merge
type: function
doc:
<comment>Description:</comment>
  Returns the result of adding all given values to the set
  
  Returns the result of adding all given values to the set.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  A <class>traversable</class> object or an <info>array</info>.

<comment>Return:</comment>
  <info>Ds\Set</info>  The result of adding all given values to the set, effectively the same as adding the
          values to a copy, then returning that copy.
          
          The current instance won't be affected.


id: Ds\Set::reduce
type: function
doc:
<comment>Description:</comment>
  Reduces the set to a single value using a callback function
  
  Reduces the set to a single value using a callback function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
                       
                       The value of the current iteration.
  <info>mixed</info>     <strong>$carry</strong>     The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
  <info>mixed</info>     <strong>$value</strong>     The value of the current iteration.
  <info>mixed</info>     <strong>$initial</strong>   The initial value of the carry value. Can be <info>null</info>.

<comment>Return:</comment>
  <info>mixed</info>  The return value of the final callback.


id: Ds\Set::remove
type: function
doc:
<comment>Description:</comment>
  Removes all given values from the set
  
  Removes all given <strong>$values</strong> from the set, ignoring any that are not in the set.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to remove.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Set::reverse
type: function
doc:
<comment>Description:</comment>
  Reverses the set in-place
    
  
  Reverses the set in-place.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Set::reversed
type: function
doc:
<comment>Description:</comment>
  Returns a reversed copy
  
  Returns a reversed copy of the set.

<comment>Return:</comment>
  <info>Ds\Set</info>  A reversed copy of the set.
            The current instance is not affected. 
          
          The current instance is not affected.


id: Ds\Set::slice
type: function
doc:
<comment>Description:</comment>
  Returns a sub-set of a given range
    
  
  Creates a sub-set of a given range.

<comment>Param:</comment>
  <info>int</info>  <strong>$index</strong>   The index at which the sub-set starts.
                
                If positive, the set will start at that index in the set. If negative, the set will
                start that far from the end.
  <info>int</info>  <strong>$length</strong>  If a length is given and is positive, the resulting set will have up to that many
                values in it.
                 If the length results in an overflow, only values up to the end of the set will be
                included.
                 If a length is given and is negative, the set will stop that many values from the
                end.
                 If a length is not provided, the resulting set will contain all values between the
                index and the end of the set.

<comment>Return:</comment>
  <info>Ds\Set</info>  A sub-set of the given range.


id: Ds\Set::sort
type: function
doc:
<comment>Description:</comment>
  Sorts the set in-place
   
  
  Sorts the set in-place, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Set::sorted
type: function
doc:
<comment>Description:</comment>
  Returns a sorted copy
  
  Returns a sorted copy, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>Ds\Set</info>  Returns a sorted copy of the set.


id: Ds\Set::sum
type: function
doc:
<comment>Description:</comment>
  Returns the sum of all values in the set
  
  Returns the sum of all values in the set.
  
  Arrays and objects are considered equal to zero when calculating the sum.

<comment>Return:</comment>
  <info>int|float</info>  The sum of all the values in the set as either a <info>float</info> or <info>int</info> depending on the values
             in the set.


id: Ds\Set::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the set to an array
    
  
  Converts the set to an <info>array</info>.
  
  Casting to an <info>array</info> is not supported yet.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the set.


id: Ds\Set::union
type: function
doc:
<comment>Description:</comment>
  Creates a new set using values from the current instance and another set
  
  Creates a new set that contains the values of the current instance as well as the values of
  another <strong>$set</strong>.
  
  A ∪ B = {x: x ∈ A ∨ x ∈ B}

<comment>Param:</comment>
  <info>Ds\Set</info>  <strong>$set</strong>  The other set, to combine with the current instance.

<comment>Return:</comment>
  <info>Ds\Set</info>  A new set containing all the values of the current instance as well as another <strong>$set</strong>.

<comment>See Also:</comment>
   * Union on Wikipedia


id: Ds\Set::xor
type: function
doc:
<comment>Description:</comment>
  Creates a new set using values in either the current instance or in another set, but not in both
  
  Creates a new set containing values in the current instance as well as another <strong>$set</strong>, but not in
  both.
  
  A ⊖ B = {x : x ∈ (A \ B) ∪ (B \ A)}

<comment>Param:</comment>
  <info>Ds\Set</info>  <strong>$set</strong>  The other set.

<comment>Return:</comment>
  <info>Ds\Set</info>  A new set containing values in the current instance as well as another <strong>$set</strong>, but not in
          both.

<comment>See Also:</comment>
   * Symmetric Difference on Wikipedia


id: Ds\Stack
type: class
doc:
<comment>Description:</comment>
  A Stack is a “last in, first out” or “LIFO” collection that only allows access to the value at the
  top of the structure and iterates in that order, destructively.
  
  Uses a <class>Ds\Vector</class> internally.


id: Ds\Stack::clear
type: function
doc:
<comment>Description:</comment>
  Removes all values
  
  Removes all values from the stack.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Stack::copy
type: function
doc:
<comment>Description:</comment>
  Returns a shallow copy of the stack
  
  Returns a shallow copy of the stack.

<comment>Return:</comment>
  <info>Ds\Stack</info>  Returns a shallow copy of the stack.


id: Ds\Stack::count
type: function
doc:
<comment>Description:</comment>
  Retorna o número de valores na pilha
  
  Veja <strong>Countable::count()</strong>


id: Ds\Stack::isEmpty
type: function
doc:
<comment>Description:</comment>
  Returns whether the stack is empty
  
  Returns whether the stack is empty.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the stack is empty, <info>false</info> otherwise.


id: Ds\Stack::peek
type: function
doc:
<comment>Description:</comment>
  Retorna o valor no topo da pilha
  
  Retorna o valor no topo da pilha, mas não o remove.

<comment>Return:</comment>
  <info>mixed</info>  O valor no topo da pilha.


id: Ds\Stack::pop
type: function
doc:
<comment>Description:</comment>
  Removes and returns the value at the top of the stack
  
  Removes and returns the value at the top of the stack.

<comment>Return:</comment>
  <info>mixed</info>  The removed value which was at the top of the stack.


id: Ds\Stack::push
type: function
doc:
<comment>Description:</comment>
  Pushes values onto the stack
  
  Pushes <strong>$values</strong> onto the stack.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to push onto the stack.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Stack::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the stack to an array
    
  
  Converts the stack to an <info>array</info>.
  
  Casting to an <info>array</info> is not supported yet.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the stack.


id: Ds\Vector
type: class
doc:
<comment>Description:</comment>
  A Vector is a sequence of values in a contiguous buffer that grows and shrinks automatically. It’s
  the most efficient sequential structure because a value’s index is a direct mapping to its index
  in the buffer, and the growth factor isn't bound to a specific multiple or exponent.


id: Ds\Vector::apply
type: function
doc:
<comment>Description:</comment>
  Updates all values by applying a callback function to each value
  
  Updates all values by applying a <strong>$callback</strong> function to each value in the vector.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>mixed</info>callback<info>mixed</info><strong>$value</strong>
                       
                       A <info>callable</info> to apply to each value in the vector.
                       
                       The callback should return what the value should be replaced by.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Vector::clear
type: function
doc:
<comment>Description:</comment>
  Removes all values
  
  Removes all values from the vector.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Vector::contains
type: function
doc:
<comment>Description:</comment>
  Determines if the vector contains given values
  
  Determines if the vector contains all values.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  Values to check.

<comment>Return:</comment>
  <info>bool</info>  <info>false</info> if any of the provided <strong>$values</strong> are not in the vector, <info>true</info> otherwise.


id: Ds\Vector::copy
type: function
doc:
<comment>Description:</comment>
  Returns a shallow copy of the vector
  
  Returns a shallow copy of the vector.

<comment>Return:</comment>
  <info>Ds\Vector</info>  Returns a shallow copy of the vector.


id: Ds\Vector::filter
type: function
doc:
<comment>Description:</comment>
  Creates a new vector using a callable to
      determine which values to include
   
  
  Creates a new vector using a <info>callable</info> to determine which values to include.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>bool</info>callback<info>mixed</info><strong>$value</strong>
                       
                       Optional <info>callable</info> which returns <info>true</info> if the value should be included, <info>false</info>
                       otherwise.
                       
                       If a callback is not provided, only values which are <info>true</info> (see converting to
                       boolean) will be included.

<comment>Return:</comment>
  <info>Ds\Vector</info>  A new vector containing all the values for which either the <strong>$callback</strong> returned <info>true</info>, or
             all values that convert to <info>true</info> if a <strong>$callback</strong> was not provided.


id: Ds\Vector::first
type: function
doc:
<comment>Description:</comment>
  Returns the first value in the vector
  
  Returns the first value in the vector.

<comment>Return:</comment>
  <info>mixed</info>  The first value in the vector.


id: Ds\Vector::insert
type: function
doc:
<comment>Description:</comment>
  Inserts values at a given index
  
  Inserts values into the vector at a given index.

<comment>Param:</comment>
  <info>int</info>    <strong>$index</strong>   The index at which to insert. 0 \<= index \<= count
                  
                  You can insert at the index equal to the number of values.
  <info>mixed</info>  <strong>$values</strong>  The value or values to insert.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Vector::isEmpty
type: function
doc:
<comment>Description:</comment>
  Returns whether the vector is empty
  
  Returns whether the vector is empty.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the vector is empty, <info>false</info> otherwise.


id: Ds\Vector::join
type: function
doc:
<comment>Description:</comment>
  Joins all values together as a string
  
  Joins all values together as a string using an optional separator between each value.

<comment>Param:</comment>
  <info>string</info>  <strong>$glue</strong>  An optional string to separate each value.

<comment>Return:</comment>
  <info>string</info>  All values of the vector joined together as a string.


id: Ds\Vector::last
type: function
doc:
<comment>Description:</comment>
  Returns the last value
  
  Returns the last value in the vector.

<comment>Return:</comment>
  <info>mixed</info>  The last value in the vector.


id: Ds\Vector::map
type: function
doc:
<comment>Description:</comment>
  Returns the result of applying a callback to each value
  
  Returns the result of applying a <strong>$callback</strong> function to each value in the vector.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  <info>mixed</info>callback<info>mixed</info><strong>$value</strong>
                       
                       A <info>callable</info> to apply to each value in the vector.
                       
                       The callable should return what the new value will be in the new vector.

<comment>Return:</comment>
  <info>Ds\Vector</info>  The result of applying a <strong>$callback</strong> to each value in the vector.
             
             The values of the current instance won't be affected.


id: Ds\Vector::merge
type: function
doc:
<comment>Description:</comment>
  Returns the result of adding all given values to the vector
  
  Returns the result of adding all given values to the vector.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  A <class>traversable</class> object or an <info>array</info>.

<comment>Return:</comment>
  <info>Ds\Vector</info>  The result of adding all given values to the vector, effectively the same as adding the
             values to a copy, then returning that copy.
             
             The current instance won't be affected.


id: Ds\Vector::push
type: function
doc:
<comment>Description:</comment>
  Adds values to the end of the vector
  
  Adds values to the end of the vector.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to add.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Vector::reduce
type: function
doc:
<comment>Description:</comment>
  Reduces the vector to a single value using a callback function
  
  Reduces the vector to a single value using a callback function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
                       
                       The value of the current iteration.
  <info>mixed</info>     <strong>$carry</strong>     The return value of the previous callback, or <strong>$initial</strong> if it's the first
                       iteration.
  <info>mixed</info>     <strong>$value</strong>     The value of the current iteration.
  <info>mixed</info>     <strong>$initial</strong>   The initial value of the carry value. Can be <info>null</info>.

<comment>Return:</comment>
  <info>mixed</info>  The return value of the final callback.


id: Ds\Vector::reverse
type: function
doc:
<comment>Description:</comment>
  Reverses the vector in-place
    
  
  Reverses the vector in-place.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Vector::reversed
type: function
doc:
<comment>Description:</comment>
  Returns a reversed copy
  
  Returns a reversed copy of the vector.

<comment>Return:</comment>
  <info>Ds\Vector</info>  A reversed copy of the vector.
               The current instance is not affected. 
             
             The current instance is not affected.


id: Ds\Vector::rotate
type: function
doc:
<comment>Description:</comment>
  Rotates the vector by a given number of rotations
  
  Rotates the vector by a given number of rotations, which is equivalent to successively calling
  $vector-&gt;push($vector-&gt;shift()) if the number of rotations is positive, or
  $vector-&gt;unshift($vector-&gt;pop()) if negative.

<comment>Param:</comment>
  <info>int</info>  <strong>$rotations</strong>  The number of times the vector should be rotated.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.. The vector of the current instance will be rotated.


id: Ds\Vector::slice
type: function
doc:
<comment>Description:</comment>
  Returns a sub-vector of a given range
    
  
  Creates a sub-vector of a given range.

<comment>Param:</comment>
  <info>int</info>  <strong>$index</strong>   The index at which the sub-vector starts.
                
                If positive, the vector will start at that index in the vector. If negative, the
                vector will start that far from the end.
  <info>int</info>  <strong>$length</strong>  If a length is given and is positive, the resulting vector will have up to that many
                values in it.
                 If the length results in an overflow, only values up to the end of the vector will
                be included.
                 If a length is given and is negative, the vector will stop that many values from
                the end.
                 If a length is not provided, the resulting vector will contain all values between
                the index and the end of the vector.

<comment>Return:</comment>
  <info>Ds\Vector</info>  A sub-vector of the given range.


id: Ds\Vector::sort
type: function
doc:
<comment>Description:</comment>
  Sorts the vector in-place
   
  
  Sorts the vector in-place, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ds\Vector::sorted
type: function
doc:
<comment>Description:</comment>
  Returns a sorted copy
  
  Returns a sorted copy, using an optional <strong>$comparator</strong> function.

<comment>Param:</comment>
  <info>callable</info>  <strong>$comparator</strong>  A função de comparação deve retornar um inteiro menor que, igual ou maior
                         que zero se o primeiro argumento for considerado respectivamente menor que,
                         igual ou maior que o segundo.
                         
                         Retornar valores não inteiros da função de comparação, como <info>float</info>,
                         resultará em uma conversão interna do valor retornado da função callback
                         para <info>int</info>. Portanto, valores como <return>0.99</return> e <return>0.1</return> serão convertidos para o valor
                         inteiro <return>0</return>, o que comparará esses valores como iguais.

<comment>Return:</comment>
  <info>Ds\Vector</info>  Returns a sorted copy of the vector.


id: Ds\Vector::sum
type: function
doc:
<comment>Description:</comment>
  Returns the sum of all values in the vector
  
  Returns the sum of all values in the vector.
  
  Arrays and objects are considered equal to zero when calculating the sum.

<comment>Return:</comment>
  <info>int|float</info>  The sum of all the values in the vector as either a <info>float</info> or <info>int</info> depending on the
             values in the vector.


id: Ds\Vector::toArray
type: function
doc:
<comment>Description:</comment>
  Converts the vector to an array
    
  
  Converts the vector to an <info>array</info>.
  
  Casting to an <info>array</info> is not supported yet.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> containing all the values in the same order as the vector.


id: Ds\Vector::unshift
type: function
doc:
<comment>Description:</comment>
  Adds values to the front of the vector
  
  Adds values to the front of the vector, moving all the current values forward to make room for the
  new values.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$values</strong>  The values to add to the front of the vector.  Multiple values will be added in
                  the same order that they are passed.
                  
                  Multiple values will be added in the same order that they are passed.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EIO_DT_UNKNOWN
type: constant
doc:
<comment>Description:</comment>
  Unknown node type(very common). Further <strong>stat()</strong> needed.


id: EIO_READDIR_DENTS
type: constant
doc:
<comment>Description:</comment>
  <strong>eio_readdir()</strong> flag. If specified, the result argument of the callback becomes an array with the
  following keys: <return>'names'</return> - array of directory names <return>'dents'</return> - array of <return>struct eio_dirent</return>-like
  arrays having the following keys each: <return>'name'</return> - the directory name; <return>'type'</return> - one of EIO_DT_*
  constants; <return>'inode'</return> - the inode number, if available, otherwise unspecified;


id: EIO_READDIR_DIRS_FIRST
type: constant
doc:
<comment>Description:</comment>
  When this flag is specified, the names will be returned in an order where likely directories come
  first, in optimal stat order.


id: EIO_READDIR_STAT_ORDER
type: constant
doc:
<comment>Description:</comment>
  When this flag is specified, then the names will be returned in an order suitable for <return>stat</return>'ing
  each one. When planning to <strong>stat()</strong> all files in the given directory, the returned order will likely
  be fastest.


id: EIO_SEEK_CUR
type: constant
doc:
<comment>Description:</comment>
  The offset is set to its current location plus <strong>$offset</strong> bytes.


id: EIO_SEEK_END
type: constant
doc:
<comment>Description:</comment>
  The offset is set to the size of the file plus <strong>$offset</strong> bytes.


id: EIO_SEEK_SET
type: constant
doc:
<comment>Description:</comment>
  The offset is set to specified number of bytes(<strong>$offset</strong>).


id: ENCHANT_ISPELL
type: constant
doc:
<comment>Description:</comment>
  Dictionary type for Ispell. Used with <strong>enchant_broker_get_dict_path()</strong> and
  <strong>enchant_broker_set_dict_path()</strong>. Deprecated as of PHP 8.0.0.


id: ENCHANT_MYSPELL
type: constant
doc:
<comment>Description:</comment>
  Dictionary type for MySpell. Used with <strong>enchant_broker_get_dict_path()</strong> and
  <strong>enchant_broker_set_dict_path()</strong>. Deprecated as of PHP 8.0.0.


id: EXIF_USE_MBSTRING
type: constant
doc:
<comment>Description:</comment>
  Esta constante tem o valor igual a <return>1</return> se mbstring estiver habilidado, caso contrário tem o valor
  igual a <return>0</return>.


id: EXP_EOF
type: constant
doc:
<comment>Description:</comment>
  Value, returned by <strong>expect_expectl()</strong>, when EOF is reached.


id: EXP_FULLBUFFER
type: constant
doc:
<comment>Description:</comment>
  Value, returned by <strong>expect_expectl()</strong> if no pattern have been matched.


id: EXP_TIMEOUT
type: constant
doc:
<comment>Description:</comment>
  Value, returned by <strong>expect_expectl()</strong> upon timeout of seconds, specified in value of expect.timeout


id: EmptyIterator::current
type: function
doc:
<comment>Description:</comment>
  The current() method
  
  This function must not be called. It throws an exception upon access.
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>never</info>  Nenhum valor é retornado.


id: EmptyIterator::key
type: function
doc:
<comment>Description:</comment>
  The key() method
  
  This function must not be called. It throws an exception upon access.
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>never</info>  Nenhum valor é retornado.


id: EmptyIterator::next
type: function
doc:
<comment>Description:</comment>
  The next() method
  
  No operation, nothing to do.
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EmptyIterator::rewind
type: function
doc:
<comment>Description:</comment>
  The rewind() method
  
  No operation, nothing to do.
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EmptyIterator::valid
type: function
doc:
<comment>Description:</comment>
  The valid() method
  
  The EmptyIterator valid() method.
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>false</info>  <info>false</info>


id: EnchantBroker
type: class
doc:
<comment>Description:</comment>
  A fully opaque class which replaces <return>enchant_broker</return> resources as of PHP 8.0.0.


id: EnchantDictionary
type: class
doc:
<comment>Description:</comment>
  A fully opaque class which replaces <return>enchant_dict</return> resources as of PHP 8.0.0.


id: Error
type: class
doc:
<comment>Description:</comment>
  The base class for <info>Error</info>s that occur during generation or use of randomness.


id: Error::__clone
type: function
doc:
<comment>Description:</comment>
  Clona o erro
  
  Error não pode ser clonada, então o método resulta em um erro fatal.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Error::__construct
type: function
doc:
<comment>Description:</comment>
  Constrói o objeto error
  
  Constrói um erro.

<comment>Param:</comment>
  <info>string</info>          <strong>$message</strong>   A mensagem de erro.
  <info>int</info>             <strong>$code</strong>      O código do erro.
  <info>Throwable|null</info>  <strong>$previous</strong>  O throwable anterior, utilizado para o encadeamento de exceção.


id: Error::__toString
type: function
doc:
<comment>Description:</comment>
  Representação em string do erro
  
  Retorna a representação em <info>string</info> do erro.

<comment>Return:</comment>
  <info>string</info>  Retorna a representação do erro em <info>string</info>.

<comment>See Also:</comment>
   * Throwable::__toString


id: Error::getCode
type: function
doc:
<comment>Description:</comment>
  Recupera o código do erro
  
  Retorna o código do erro.

<comment>Return:</comment>
  <info>int</info>  Retorna o código do erro como um <info>int</info>

<comment>See Also:</comment>
   * Throwable::getCode


id: Error::getFile
type: function
doc:
<comment>Description:</comment>
  Recupera o nome do arquivo onde o erro ocorreu
  
  Recupera o nome do arquivo onde o erro ocorreu.

<comment>Return:</comment>
  <info>string</info>  Retorna o nome do arquivo onde o erro ocorreu.

<comment>See Also:</comment>
   * Throwable::getFile


id: Error::getLine
type: function
doc:
<comment>Description:</comment>
  Recupera a linha onde o erro ocorreu
  
  Recupera o número da linha onde o erro ocorreu.

<comment>Return:</comment>
  <info>int</info>  Retorna o número da linha onde o erro ocorreu.

<comment>See Also:</comment>
   * Throwable::getLine


id: Error::getMessage
type: function
doc:
<comment>Description:</comment>
  Recupera a mensagem de erro
  
  Recupera a mensagem de erro.

<comment>Return:</comment>
  <info>string</info>  Recupera a mensagem de erro como uma string.

<comment>See Also:</comment>
   * Throwable::getMessage


id: Error::getPrevious
type: function
doc:
<comment>Description:</comment>
  Retorna o último Throwable
  
  Retorna Throwable anterior (o terceiro parâmetro do Error::__construct).

<comment>Return:</comment>
  <info>Throwable|null</info>  Retorna <class>Throwable</class> anterior, se disponível, ou <info>null</info>.

<comment>See Also:</comment>
   * Throwable::getPrevious


id: Error::getTrace
type: function
doc:
<comment>Description:</comment>
  Recupera a pilha de rastreio
  
  Recupera a pilha de rastreio.

<comment>Return:</comment>
  <info>array</info>  Recupera a pilha de rastreio como um <info>array</info>.

<comment>See Also:</comment>
   * Throwable::getTrace


id: Error::getTraceAsString
type: function
doc:
<comment>Description:</comment>
  Recupera a pilha de rastreio como uma string
  
  Recupera a pilha de rastreio como uma string.

<comment>Return:</comment>
  <info>string</info>  Recupera a pilha de rastreio como uma string.

<comment>See Also:</comment>
   * Throwable::getTraceAsString


id: ErrorException::__construct
type: function
doc:
<comment>Description:</comment>
  Constrói a exceção
  
  Construtor da Exception.

<comment>Param:</comment>
  <info>string</info>          <strong>$message</strong>   A mensagem da exceção.
  <info>int</info>             <strong>$code</strong>      O código da exceção.
  <info>int</info>             <strong>$severity</strong>  A severidade da exceção.
                             
                             Como a severidade da seção pode ser qualquer valor <info>int</info>, é desejado que
                             as constantes de erro sejam utilizadas.
  <info>string|null</info>     <strong>$filename</strong>  O nome do arquivo onde a exceção é disparada.
  <info>int|null</info>        <strong>$line</strong>      A número da linha onde a exceção é disparada.
  <info>Throwable|null</info>  <strong>$previous</strong>  A exceção anterior, usada para encadeamento de exceções.


id: ErrorException::getSeverity
type: function
doc:
<comment>Description:</comment>
  Obtém o nível da exceção
  
  Retorna o nível da exceção.

<comment>Return:</comment>
  <info>int</info>  Retorna o nível da exceção.


id: Ev
type: class
doc:
<comment>Description:</comment>
  Ev is a static class providing access to the default loop and to some common operations.


id: Ev::BACKEND_ALL
type: constant
doc:
<comment>Description:</comment>
  Try all backends(even currupted ones). It's not recommended to use it explicitly. Bitwise
  operators should be applied here(e.g. <info>Ev::BACKEND_ALL</info> & ~ <info>Ev::BACKEND_KQUEUE</info> ) Use
  Ev::recommendedBackends , or don't specify any backends at all.


id: Ev::BACKEND_EPOLL
type: constant
doc:
<comment>Description:</comment>
  Linux-specific <return>epoll(7)</return> backend for both pre- and post-2.6.9 kernels


id: Ev::BACKEND_KQUEUE
type: constant
doc:
<comment>Description:</comment>
  <return>kqueue</return> backend used on most BSD systems. <class>EvEmbed</class> watcher could be used to embed one loop(with
  kqueue backend) into another. For instance, one can try to create an event loop with <return>kqueue</return>
  backend and use it for sockets only.


id: Ev::BACKEND_MASK
type: constant
doc:
<comment>Description:</comment>
  Not a backend, but a mask to select all backend bits from <strong>$flags</strong> value to mask out any
  backends(e.g. when modifying the LIBEV_FLAGS environment variable).


id: Ev::CHECK
type: constant
doc:
<comment>Description:</comment>
  All <class>EvCheck</class> watchers are queued just after Ev::run has gathered the new events, but before it
  queues any callbacks for any received events. Thus, <class>EvCheck</class> watchers will be invoked before any
  other watchers of the same or lower priority within an event loop iteration.


id: Ev::CHILD
type: constant
doc:
<comment>Description:</comment>
  The <strong>$pid</strong> specified in EvChild::__construct has received a status change.


id: Ev::CUSTOM
type: constant
doc:
<comment>Description:</comment>
  Not ever sent(or otherwise used) by <return>libev</return> itself, but can be freely used by <return>libev</return> users to signal
  watchers (e.g. via EvWatcher::feed ).


id: Ev::EMBED
type: constant
doc:
<comment>Description:</comment>
  The embedded event loop specified in the <class>EvEmbed</class> watcher needs attention.


id: Ev::ERROR
type: constant
doc:
<comment>Description:</comment>
  An unspecified error has occurred, the watcher has been stopped. This might happen because the
  watcher could not be properly started because <return>libev</return> ran out of memory, a file descriptor was found
  to be closed or any other problem. <return>Libev</return> considers these application bugs. See also ANATOMY OF A
  WATCHER


id: Ev::FLAG_FORKCHECK
type: constant
doc:
<comment>Description:</comment>
  Makes libev check for a fork in each iteration, instead of calling EvLoop::fork manually. This
  works by calling <return>getpid()</return> on every iteration of the loop, and thus this might slow down the event
  loop with lots of loop iterations, but usually is not noticeable. This flag setting cannot be
  overridden or specified in the LIBEV_FLAGS environment variable.


id: Ev::FLAG_NOENV
type: constant
doc:
<comment>Description:</comment>
  If this flag used(or the program runs setuid or setgid), <return>libev</return> won't look at the environment
  variable LIBEV_FLAGS . Otherwise(by default), LIBEV_FLAGS will override the flags completely if it
  is found. Useful for performance tests and searching for bugs.


id: Ev::FLAG_NOINOTIFY
type: constant
doc:
<comment>Description:</comment>
  When this flag is specified, <return>libev</return> won't attempt to use the <return>inotify</return> API for its ev_stat watchers.
  The flag can be useful to conserve inotify file descriptors, as otherwise each loop using <return>ev_stat</return>
  watchers consumes one <return>inotify</return> handle.


id: Ev::FLAG_NOSIGMASK
type: constant
doc:
<comment>Description:</comment>
  When this flag is specified, <return>libev</return> will avoid to modify the signal mask. Specifically, this means
  having to make sure signals are unblocked before receiving them.
  
  This behaviour is useful for custom signal handling, or handling signals only in specific threads.


id: Ev::FLAG_SIGNALFD
type: constant
doc:
<comment>Description:</comment>
  When this flag is specified, <return>libev</return> will attempt to use the <return>signalfd</return> API for its ev_signal (and
  ev_child ) watchers. This API delivers signals synchronously, which makes it both faster and might
  make it possible to get the queued signal data. It can also simplify signal handling with threads,
  as long as signals are properly blocked in threads. <return>Signalfd</return> will not be used by default.


id: Ev::IDLE
type: constant
doc:
<comment>Description:</comment>
  <class>EvIdle</class> watcher works when there is nothing to do with other watchers.


id: Ev::PREPARE
type: constant
doc:
<comment>Description:</comment>
  All <class>EvPrepare</class> watchers are invoked just before Ev::run starts. Thus, <class>EvPrepare</class> watchers are the
  last watchers invoked before the event loop sleeps or polls for new events.


id: Ev::READ
type: constant
doc:
<comment>Description:</comment>
  The file descriptor in the <class>EvIo</class> watcher has become readable.


id: Ev::RUN_NOWAIT
type: constant
doc:
<comment>Description:</comment>
  Means that event loop will look for new events, will handle those events and any already
  outstanding ones, but will not wait and block the process in case there are no events and will
  return after one iteration of the loop. This is sometimes useful to poll and handle new events
  while doing lengthy calculations, to keep the program responsive.


id: Ev::RUN_ONCE
type: constant
doc:
<comment>Description:</comment>
  Means that event loop will look for new events (waiting if necessary) and will handle those and
  any already outstanding ones. It will block the process until at least one new event arrives
  (which could be an event internal to libev itself, so there is no guarantee that a user-registered
  callback will be called), and will return after one iteration of the loop.


id: Ev::STAT
type: constant
doc:
<comment>Description:</comment>
  The path specified in <class>EvStat</class> watcher changed its attributes.


id: Ev::WRITE
type: constant
doc:
<comment>Description:</comment>
  The file descriptor in the <class>EvIo</class> watcher has become writable.


id: Ev::backend
type: function
doc:
<comment>Description:</comment>
  Returns an integer describing the backend used by libev
  
  Returns an integer describing the backend used by libev . See Backend flags

<comment>Return:</comment>
  <info>int</info>  Returns an integer(bit mask) describing the backend used by libev .

<comment>See Also:</comment>
   * <class>EvEmbed</class>
   * Ev::embeddableBackends
   * Ev::recommendedBackends
   * Ev::supportedBackends
   * Backend flags


id: Ev::depth
type: function
doc:
<comment>Description:</comment>
  Returns recursion depth
  
  The number of times Ev::run was entered minus the number of times Ev::run was exited normally, in
  other words, the recursion depth. Outside Ev::run , this number is <info>0</info> . In a callback, this number
  is <info>1</info> , unless Ev::run was invoked recursively (or from another thread), in which case it is
  higher.

<comment>Return:</comment>
  <info>int</info>  <strong>ev_depth()</strong> returns recursion depth of the default loop.

<comment>See Also:</comment>
   * Ev::iteration


id: Ev::embeddableBackends
type: function
doc:
<comment>Description:</comment>
  Returns the set of backends that are embeddable in other event loops
  
  Returns the set of backends that are embeddable in other event loops.

<comment>Return:</comment>
  <info>int</info>  Returns a bit mask which can containing backend flags combined using bitwise OR operator.

<comment>See Also:</comment>
   * <class>EvEmbed</class>
   * Ev::recommendedBackends
   * Ev::supportedBackends
   * Backend flags
   * Examples


id: Ev::feedSignal
type: function
doc:
<comment>Description:</comment>
  Feed a signal event info Ev
  
  Simulates a signal receive. It is safe to call this function at any time, from any context,
  including signal handlers or random threads. Its main use is to customise signal handling in the
  process.
  
  Unlike Ev::feedSignalEvent , this works regardless of which loop has registered the signal.

<comment>Param:</comment>
  <info>int</info>  <strong>$signum</strong>  Signal number. See <return>signal(7)</return> man page for detals. You can use constants exported by
                <return>pcntl</return> extension.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::feedSignalEvent


id: Ev::feedSignalEvent
type: function
doc:
<comment>Description:</comment>
  Feed signal event into the default loop
  
  Feed signal event into the default loop. Ev will react to this call as if the signal specified by
  <strong>$signal</strong> had occurred.

<comment>Param:</comment>
  <info>int</info>  <strong>$signum</strong>  Signal number. See <return>signal(7)</return> man page for detals. See also constants exported by
                <return>pcntl</return> extension.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::feedSignal


id: Ev::iteration
type: function
doc:
<comment>Description:</comment>
  Return the number of times the default event loop has polled for new
    events
  
  Return the number of times the event loop has polled for new events. Sometimes useful as a
  generation counter.

<comment>Return:</comment>
  <info>int</info>  Returns number of polls of the default event loop.

<comment>See Also:</comment>
   * Ev::depth


id: Ev::now
type: function
doc:
<comment>Description:</comment>
  Returns the time when the last iteration of the default event
    loop has started
  
  Returns the time when the last iteration of the default event loop has started. This is the time
  that timers( <class>EvTimer</class> and <class>EvPeriodic</class> ) are based on, and referring to it is usually faster then
  calling Ev::time .

<comment>Return:</comment>
  <info>float</info>  Returns number of seconds(fractional) representing the time when the last iteration of the
         default event loop has started.

<comment>See Also:</comment>
   * Ev::nowUpdate


id: Ev::nowUpdate
type: function
doc:
<comment>Description:</comment>
  Establishes the current time by querying the kernel, updating the time
      returned by Ev::now in the progress
  
  Establishes the current time by querying the kernel, updating the time returned by Ev::now in the
  progress. This is a costly operation and is usually done automatically within Ev::run .
  
  This method is rarely useful, but when some event callback runs for a very long time without
  entering the event loop, updating libev 's consideration of the current time is a good idea.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::now


id: Ev::recommendedBackends
type: function
doc:
<comment>Description:</comment>
  Returns a bit mask of recommended backends for current
    platform
  
  Returns the set of all backends compiled into this binary of <return>libev</return> and also recommended for this
  platform, meaning it will work for most file descriptor types. This set is often smaller than the
  one returned by <strong>ev_supported_backends()</strong> , as for example <return>kqueue</return> is broken on most <return>BSD</return> systems and
  will not be auto-detected unless it is requested explicitly. This is the set of backends that
  <return>libev</return> will probe no backends specified explicitly.

<comment>Return:</comment>
  <info>int</info>  Returns a bit mask which can containing backend flags combined using bitwise OR operator.

<comment>See Also:</comment>
   * <class>EvEmbed</class>
   * Ev::embeddableBackends
   * Ev::supportedBackends
   * Backend flags
   * Examples


id: Ev::resume
type: function
doc:
<comment>Description:</comment>
  Resume previously suspended default event loop
  
  Ev::suspend and Ev::resume methods suspend and resume a loop correspondingly.
  
  All timer watchers will be delayed by the time spend between suspend and resume , and all periodic
  watchers will be rescheduled(that is, they will lose any events that would have occurred while
  suspended).
  
  After calling Ev::suspend it is not allowed to call any function on the given loop other than
  Ev::resume . Also it is not allowed to call Ev::resume without a previous call to Ev::suspend .
  
  Calling suspend / resume has the side effect of updating the event loop time(see Ev::nowUpdate ).

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::suspend


id: Ev::run
type: function
doc:
<comment>Description:</comment>
  Begin checking for events and calling callbacks for the default
    loop
  
  Begin checking for events and calling callbacks for the default loop . Returns when a callback
  calls Ev::stop method, or the flags are nonzero(in which case the return value is true) or when
  there are no active watchers which reference the loop( EvWatcher::keepalive is <info>true</info>), in which
  case the return value will be <info>false</info>. The return value can generally be interpreted as if <info>true</info>,
  there is more work left to do .

<comment>Param:</comment>
  <info>int</info>  <strong>$flags</strong>  Optional parameter <strong>$flags</strong> can be one of the following:  List for possible values of
               <strong>$flags</strong> <strong>$flags</strong>Description<info>0</info>The default behavior described above<info>Ev::RUN_ONCE</info>Block at
               most one(wait, but don't loop)<info>Ev::RUN_NOWAIT</info>Don't block at all(fetch/handle events,
               but don't wait)
               
               See the run flag constants .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::stop
   * EvLoop::run


id: Ev::sleep
type: function
doc:
<comment>Description:</comment>
  Block the process for the given number of seconds
  
  Block the process for the given number of seconds.

<comment>Param:</comment>
  <info>float</info>  <strong>$seconds</strong>  Fractional number of seconds

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Ev::stop
type: function
doc:
<comment>Description:</comment>
  Stops the default event loop
  
  Stops the default event loop

<comment>Param:</comment>
  <info>int</info>  <strong>$how</strong>  One of Ev::BREAK_* constants .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::run


id: Ev::supportedBackends
type: function
doc:
<comment>Description:</comment>
  Returns the set of backends supported by current libev
    configuration
  
  Returns the set of backends supported by current libev configuration.

<comment>Return:</comment>
  <info>int</info>  Returns a bit mask which can containing backend flags combined using bitwise OR operator.

<comment>See Also:</comment>
   * <class>EvEmbed</class>
   * Ev::recommendedBackends
   * Ev::embeddableBackends
   * Backend flags
   * Examples


id: Ev::suspend
type: function
doc:
<comment>Description:</comment>
  Suspend the default event loop
  
  Ev::suspend and Ev::resume methods suspend and resume the default loop correspondingly.
  
  All timer watchers will be delayed by the time spend between suspend and resume , and all periodic
  watchers will be rescheduled(that is, they will lose any events that would have occurred while
  suspended).
  
  After calling Ev::suspend it is not allowed to call any function on the given loop other than
  Ev::resume . Also it is not allowed to call Ev::resume without a previous call to Ev::suspend .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::resume


id: Ev::time
type: function
doc:
<comment>Description:</comment>
  Returns the current time in fractional seconds since the epoch
  
  Returns the current time in fractional seconds since the epoch. Consider using Ev::now

<comment>Return:</comment>
  <info>float</info>  Returns the current time in fractional seconds since the epoch.

<comment>See Also:</comment>
   * Ev::now


id: Ev::verify
type: function
doc:
<comment>Description:</comment>
  Performs internal consistency checks(for debugging)
  
  Performs internal consistency checks(for debugging libev ) and abort the program if any data
  structures were found to be corrupted.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvCheck
type: class
doc:
<comment>Description:</comment>
  <class>EvPrepare</class> and <class>EvCheck</class> watchers are usually used in pairs. <class>EvPrepare</class> watchers get invoked before
  the process blocks, <class>EvCheck</class> afterwards.
  
  It is not allowed to call EvLoop::run or similar methods or functions that enter the current event
  loop from either <class>EvPrepare</class> or <class>EvCheck</class> watchers. Other loops than the current one are fine,
  however. The rationale behind this is that one don't need to check for recursion in those
  watchers, i.e. the sequence will always be: <class>EvPrepare</class> -&gt; blocking -&gt; <class>EvCheck</class> , so having a
  watcher of each kind they will always be called in pairs bracketing the blocking call.
  
  The main purpose is to integrate other event mechanisms into libev and their use is somewhat
  advanced. They could be used, for example, to track variable changes, implement custom watchers,
  integrate net-snmp or a coroutine library and lots more. They are also occasionally useful to
  cache some data and want to flush it before blocking.
  
  It is recommended to give <class>EvCheck</class> watchers highest( <info>Ev::MAXPRI</info> ) priority, to ensure that they are
  being run before any other watchers after the poll (this doesn’t matter for <class>EvPrepare</class> watchers).
  
  Also, <class>EvCheck</class> watchers should not activate/feed events. While libev fully supports this, they
  might get executed before other <class>EvCheck</class> watchers did their job.


id: EvCheck::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs the EvCheck watcher object
  
  Constructs the <class>EvCheck</class> watcher object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * <class>EvPrepare</class>
   * EvLoop::check


id: EvCheck::createStopped
type: function
doc:
<comment>Description:</comment>
  Create instance of a stopped EvCheck watcher
  
  Create instance of a stopped EvCheck watcher

<comment>Param:</comment>
  <info>string</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>string</info>  <strong>$data</strong>      Custom data associated with the watcher.
  <info>string</info>  <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>object</info>  Returns EvCheck object on success.

<comment>See Also:</comment>
   * <class>EvPrepare</class>


id: EvChild
type: class
doc:
<comment>Description:</comment>
  <class>EvChild</class> watchers trigger when the process receives a <info>SIGCHLD</info> in response to some child status
  changes (most typically when a child dies or exits). It is permissible to install an <info>EvChild</info>
  watcher after the child has been forked(which implies it might have already exited), as long as
  the event loop isn't entered(or is continued from a watcher), i.e. forking and then immediately
  registering a watcher for the child is fine, but forking and registering a watcher a few event
  loop iterations later or in the next callback invocation is not.
  
  It is allowed to register <class>EvChild</class> watchers in the default loop only.


id: EvChild::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs the EvChild watcher object
  
  Constructs the <class>EvChild</class> watcher object.
  
  Call the callback when a status change for process ID <strong>$pid</strong> (or any PID if <strong>$pid</strong> is <info>0</info> ) has been
  received(a status change happens when the process terminates or is killed, or, when <strong>$trace</strong> is
  <info>true</info>, additionally when it is stopped or continued). In other words, when the process receives a
  <info>SIGCHLD</info> , Ev will fetch the outstanding exit/wait status for all changed/zombie children and call
  the callback.
  
  It is valid to install a child watcher after an <class>EvChild</class> has exited but before the event loop has
  started its next iteration. For example, first one calls <return>fork</return> , then the new child process might
  exit, and only then an <class>EvChild</class> watcher is installed in the parent for the new PID .
  
  You can access both exit/tracing status and <strong>$pid</strong> by using the rstatus and rpid properties of the
  watcher object.
  
  The number of PID watchers per PID is unlimited. All of them will be called.
  
  The EvChild::createStopped method doesn't start(activate) the newly created watcher.

<comment>Param:</comment>
  <info>int</info>       <strong>$pid</strong>       Wait for status changes of process PID(or any process if PID is specified as
                       <info>0</info> ).
  <info>bool</info>      <strong>$trace</strong>     If <info>false</info>, only activate the watcher when the process terminates.
                       Otherwise(<info>true</info>) additionally activate the watcher when the process is stopped
                       or continued.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * EvLoop::child


id: EvChild::createStopped
type: function
doc:
<comment>Description:</comment>
  Create instance of a stopped EvCheck watcher
  
  The same as EvChild::__construct , but doesn't start the watcher automatically.

<comment>Param:</comment>
  <info>int</info>       <strong>$pid</strong>       The same as for EvChild::__construct
  <info>bool</info>      <strong>$trace</strong>     The same as for EvChild::__construct
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>object</info>  

<comment>See Also:</comment>
   * EvChild::__construct
   * EvLoop::child


id: EvChild::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher

<comment>Param:</comment>
  <info>int</info>   <strong>$pid</strong>    The same as for EvChild::__construct
  <info>bool</info>  <strong>$trace</strong>  The same as for EvChild::__construct

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvChild::__construct


id: EvEmbed::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs the EvEmbed object
  
  This is a rather advanced watcher type that lets to embed one event loop into another(currently
  only IO events are supported in the embedded loop, other types of watchers might be handled in a
  delayed or incorrect fashion and must not be used).
  
  See the libev documentation for details.
  
  This watcher is most useful on BSD systems without working <return>kqueue</return> to still be able to handle a
  large number of sockets. See example below.

<comment>Param:</comment>
  <info>object</info>    <strong>$other</strong>     Instance of <class>EvLoop</class> . The loop to embed, this loop must be embeddable(see
                       Ev::embeddableBackends ).
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * Ev::embeddableBackends


id: EvEmbed::createStopped
type: function
doc:
<comment>Description:</comment>
  Create stopped EvEmbed watcher object
  
  The same as EvEmbed::__construct , but doesn't start the watcher automatically.

<comment>Param:</comment>
  <info>object</info>    <strong>$other</strong>     The same as for EvEmbed::__construct
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>void</info>  Returns stopped EvEmbed object on success.

<comment>See Also:</comment>
   * EvEmbed::__construct
   * Ev::embeddableBackends


id: EvEmbed::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher
  
  Configures the watcher to use <strong>$other</strong> event loop object.

<comment>Param:</comment>
  <info>object</info>  <strong>$other</strong>  The same as for EvEmbed::__construct

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvEmbed::sweep
type: function
doc:
<comment>Description:</comment>
  Make a single, non-blocking sweep over the embedded loop
  
  Make a single, non-blocking sweep over the embedded loop. Works similarly to the following, but in
  the most appropriate way for embedded loops: start(Ev::RUN_NOWAIT);
  ?>
  ]]>

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvWatcher::start


id: EvFork
type: class
doc:
<comment>Description:</comment>
  Fork watchers are called when a <return>fork()</return> was detected (usually because whoever signalled libev about
  it by calling EvLoop::fork ). The invocation is done before the event loop blocks next and before
  <class>EvCheck</class> watchers are being called, and only in the child after the fork. Note, that if whoever
  calling EvLoop::fork calls it in the wrong process, the fork handlers will be invoked, too.


id: EvFork::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs the EvFork watcher object
  
  Constructs the EvFork watcher object and starts the watcher automatically.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * EvLoop::fork
   * <class>EvCheck</class>


id: EvFork::createStopped
type: function
doc:
<comment>Description:</comment>
  Creates a stopped instance of EvFork watcher class
  
  The same as EvFork::__construct , but doesn't start the watcher automatically.

<comment>Param:</comment>
  <info>string</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>string</info>  <strong>$data</strong>      Custom data associated with the watcher.
  <info>string</info>  <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>object</info>  Returns EvFork(stopped) object on success.

<comment>See Also:</comment>
   * EvFork::__construct


id: EvIdle
type: class
doc:
<comment>Description:</comment>
  <class>EvIdle</class> watchers trigger events when no other events of the same or higher priority are pending (
  <class>EvPrepare</class> , <class>EvCheck</class> and other <class>EvIdle</class> watchers do not count as receiving events ).
  
  Thus, as long as the process is busy handling sockets or timeouts(or even signals) of the same or
  higher priority it will not be triggered. But when the process is in idle(or only lower-priority
  watchers are pending), the <class>EvIdle</class> watchers are being called once per event loop iteration - until
  stopped, that is, or the process receives more events and becomes busy again with higher priority
  stuff.
  
  Apart from keeping the process non-blocking(which is a useful on its own sometimes), <class>EvIdle</class>
  watchers are a good place to do "pseudo-background processing" , or delay processing stuff to
  after the event loop has handled all outstanding events.
  
  The most noticeable effect is that as long as any idle watchers are active, the process will not
  block when waiting for new events.


id: EvIdle::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs the EvIdle watcher object
  
  Constructs the EvIdle watcher object and starts the watcher automatically.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * EvIdle::createStopped
   * EvLoop::idle


id: EvIdle::createStopped
type: function
doc:
<comment>Description:</comment>
  Creates instance of a stopped EvIdle watcher object
  
  The same as EvIdle::__construct , but doesn't start the watcher automatically.

<comment>Param:</comment>
  <info>string</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>   <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>     <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>object</info>  Returns EvIdle object on success.

<comment>See Also:</comment>
   * EvIdle::__construct
   * EvLoop::idle


id: EvIo
type: class
doc:
<comment>Description:</comment>
  <class>EvIo</class> watchers check whether a file descriptor(or socket, or a stream castable to numeric file
  descriptor) is readable or writable in each iteration of the event loop, or, more precisely, when
  reading would not block the process and writing would at least be able to write some data. This
  behaviour is called level-triggering because events are kept receiving as long as the condition
  persists. To stop receiving events just stop the watcher.
  
  The number of read and/or write event watchers per <strong>$fd</strong> is unlimited. Setting all file descriptors
  to non-blocking mode is also usually a good idea(but not required).
  
  Another thing to watch out for is that it is quite easy to receive false readiness notifications,
  i.e. the callback might be called with <info>Ev::READ</info> but a subsequent read() will actually block
  because there is no data. It is very easy to get into this situation. Thus it is best to always
  use non-blocking I/O: An extra read() returning <info>EAGAIN</info> (or similar) is far preferable to a program
  hanging until some data arrives.
  
  If for some reason it is impossible to run the <strong>$fd</strong> in non-blocking mode, then separately re-test
  whether a file descriptor is really ready. Some people additionally use <info>SIGALRM</info> and an interval
  timer, just to be sure thry won't block infinitely.
  
  Always consider using non-blocking mode.


id: EvIo::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EvIo watcher object
  
  Constructs EvIo watcher object and starts the watcher automatically.

<comment>Param:</comment>
  <info>mixed</info>     <strong>$fd</strong>        Can be a stream opened with <strong>fopen()</strong> or similar functions, numeric file
                       descriptor, or socket.
  <info>int</info>       <strong>$events</strong>    <info>Ev::READ</info> and/or <info>Ev::WRITE</info> . See the bit masks .
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * EvIo::createStopped
   * EvLoop::io


id: EvIo::createStopped
type: function
doc:
<comment>Description:</comment>
  Create stopped EvIo watcher object
  
  The same as EvIo::__construct , but doesn't start the watcher automatically.

<comment>Param:</comment>
  <info>mixed</info>     <strong>$fd</strong>        The same as for EvIo::__construct
  <info>int</info>       <strong>$events</strong>    The same as for EvIo::__construct
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>EvIo</info>  Returns EvIo object on success.

<comment>See Also:</comment>
   * EvIo::__construct
   * EvLoop::io


id: EvIo::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher
  
  Configures the EvIo watcher

<comment>Param:</comment>
  <info>mixed</info>  <strong>$fd</strong>      The same as for EvIo::__construct
  <info>int</info>    <strong>$events</strong>  The same as for EvIo::__construct

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvLoop
type: class
doc:
<comment>Description:</comment>
  Represents an event loop that is always distinct from the default loop . Unlike the default loop ,
  it cannot handle <class>EvChild</class> watchers.
  
  Having threads we have to create a loop per thread, and use the default loop in the parent thread.
  
  The default event loop is initialized automatically by Ev . It is accessible via methods of the <class>Ev</class>
  class, or via EvLoop::defaultLoop method.


id: EvLoop::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs the event loop object
  
  Constructs the event loop object.

<comment>Param:</comment>
  <info>int</info>    <strong>$flags</strong>             One of the event loop flags
  <info>mixed</info>  <strong>$data</strong>              Custom data associated with the loop.
  <info>float</info>  <strong>$io_interval</strong>       See io_interval
  <info>float</info>  <strong>$timeout_interval</strong>  See timeout_interval

<comment>See Also:</comment>
   * EvLoop::defaultLoop


id: EvLoop::backend
type: function
doc:
<comment>Description:</comment>
  Returns an integer describing the backend used by libev
  
  The same as Ev::backend , but for the loop instance.

<comment>Return:</comment>
  <info>int</info>  Returns an integer describing the backend used by libev. See Ev::backend .

<comment>See Also:</comment>
   * Ev::backend


id: EvLoop::check
type: function
doc:
<comment>Description:</comment>
  Creates EvCheck object associated with the current event loop
    instance
  
  Creates EvCheck object associated with the current event loop instance.

<comment>Return:</comment>
  <info>EvCheck</info>  Returns EvCheck object on success.

<comment>See Also:</comment>
   * EvCheck::__construct


id: EvLoop::child
type: function
doc:
<comment>Description:</comment>
  Creates EvChild object associated with the current event loop
  
  Creates EvChild object associated with the current event loop.

<comment>Return:</comment>
  <info>EvChild</info>  Returns EvChild object on success.

<comment>See Also:</comment>
   * EvChild::__construct


id: EvLoop::defaultLoop
type: function
doc:
<comment>Description:</comment>
  Returns or creates the default event loop
  
  If the default event loop is not created, EvLoop::defaultLoop creates it with the specified
  parameters. Otherwise, it just returns the object representing previously created instance
  ignoring all the parameters.

<comment>Param:</comment>
  <info>int</info>    <strong>$flags</strong>                     One of the event loop flags
  <info>mixed</info>  <strong>$data</strong>                      Custom data to associate with the loop.
  <info></info>       <strong>$io_collect_interval</strong>       See io_interval
  <info></info>       <strong>$timeout_collect_interval</strong>  See timeout_interval

<comment>Return:</comment>
  <info>EvLoop</info>  Returns EvLoop object on success.

<comment>See Also:</comment>
   * EvLoop::__construct


id: EvLoop::embed
type: function
doc:
<comment>Description:</comment>
  Creates an instance of EvEmbed watcher associated
    with the current EvLoop object
  
  Creates an instance of <class>EvEmbed</class> watcher associated with the current <class>EvLoop</class> object.

<comment>Return:</comment>
  <info>EvEmbed</info>  Returns EvEmbed object on success.

<comment>See Also:</comment>
   * EvEmbed::__construct


id: EvLoop::fork
type: function
doc:
<comment>Description:</comment>
  Creates EvFork watcher object associated with the current event
    loop instance
  
  Creates EvFork watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvFork</info>  Returns EvFork object on success.

<comment>See Also:</comment>
   * EvFork::__construct


id: EvLoop::idle
type: function
doc:
<comment>Description:</comment>
  Creates EvIdle watcher object associated with the current event
    loop instance
  
  Creates EvIdle watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvIdle</info>  Returns EvIdle object on success.

<comment>See Also:</comment>
   * EvIdle::__construct


id: EvLoop::invokePending
type: function
doc:
<comment>Description:</comment>
  Invoke all pending watchers while resetting their pending state
  
  Invoke all pending watchers while resetting their pending state.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvLoop::io
type: function
doc:
<comment>Description:</comment>
  Create EvIo watcher object associated with the current event
    loop instance
  
  Create EvIo watcher object associated with the current event loop instance.

<comment>Return:</comment>
  <info>EvIo</info>  Returns EvIo object on success.

<comment>See Also:</comment>
   * EvIo::__construct


id: EvLoop::loopFork
type: function
doc:
<comment>Description:</comment>
  Must be called after a fork
  
  Must be called after a fork in the child, before entering or continuing the event loop. An
  alternative is to use <info>Ev::FLAG_FORKCHECK</info> which calls this function automatically, at some
  performance loss (refer to the libev documentation ).

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvLoop::now
type: function
doc:
<comment>Description:</comment>
  Returns the current "event loop time"
  
  Returns the current "event loop time", which is the time the event loop received events and
  started processing them. This timestamp does not change as long as callbacks are being processed,
  and this is also the base time used for relative timers. You can treat it as the timestamp of the
  event occurring(or more correctly, libev finding out about it).

<comment>Return:</comment>
  <info>float</info>  Returns time of the event loop in (fractional) seconds.

<comment>See Also:</comment>
   * Ev::now


id: EvLoop::nowUpdate
type: function
doc:
<comment>Description:</comment>
  Establishes the current time by querying the kernel, updating the time
      returned by EvLoop::now in the progress
  
  Establishes the current time by querying the kernel, updating the time returned by EvLoop::now in
  the progress. This is a costly operation and is usually done automatically within EvLoop::run .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvLoop::now
   * Ev::nowUpdate


id: EvLoop::periodic
type: function
doc:
<comment>Description:</comment>
  Creates EvPeriodic watcher object associated with the current
    event loop instance
  
  Creates EvPeriodic watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvPeriodic</info>  Returns EvPeriodic object on success.

<comment>See Also:</comment>
   * EvPeriodic::__construct


id: EvLoop::prepare
type: function
doc:
<comment>Description:</comment>
  Creates EvPrepare watcher object associated with the current
    event loop instance
  
  Creates EvPrepare watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvPrepare</info>  Returns EvPrepare object on success

<comment>See Also:</comment>
   * EvPrepare::__construct


id: EvLoop::resume
type: function
doc:
<comment>Description:</comment>
  Resume previously suspended default event loop
  
  EvLoop::suspend and EvLoop::resume methods suspend and resume a loop correspondingly.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvLoop::suspend
   * Ev::resume


id: EvLoop::run
type: function
doc:
<comment>Description:</comment>
  Begin checking for events and calling callbacks for the loop
  
  Begin checking for events and calling callbacks for the current event loop. Returns when a
  callback calls Ev::stop method, or the flags are nonzero(in which case the return value is true)
  or when there are no active watchers which reference the loop( EvWatcher::keepalive is <info>true</info>), in
  which case the return value will be <info>false</info>. The return value can generally be interpreted as if
  <info>true</info>, there is more work left to do .

<comment>Param:</comment>
  <info>int</info>  <strong>$flags</strong>  Optional parameter <strong>$flags</strong> can be one of the following:  List for possible values of
               <strong>$flags</strong> <strong>$flags</strong>Description<info>0</info>The default behavior described above<info>Ev::RUN_ONCE</info>Block at
               most one(wait, but don't loop)<info>Ev::RUN_NOWAIT</info>Don't block at all(fetch/handle events,
               but don't wait)
               
               See the run flag constants .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvLoop::stop
   * Ev::run


id: EvLoop::signal
type: function
doc:
<comment>Description:</comment>
  Creates EvSignal watcher object associated with the current
    event loop instance
  
  Creates EvSignal watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvSignal</info>  Returns EvSignal object on success

<comment>See Also:</comment>
   * EvSignal::__construct


id: EvLoop::stat
type: function
doc:
<comment>Description:</comment>
  Creates EvStat watcher object associated with the current event
    loop instance
  
  Creates EvStat watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvStat</info>  Returns EvStat object on success

<comment>See Also:</comment>
   * EvSignal::__construct


id: EvLoop::stop
type: function
doc:
<comment>Description:</comment>
  Stops the event loop
  
  Stops the event loop

<comment>Param:</comment>
  <info>int</info>  <strong>$how</strong>  One of Ev::BREAK_* constants .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvLoop::run
   * Ev::stop


id: EvLoop::suspend
type: function
doc:
<comment>Description:</comment>
  Suspend the loop
  
  EvLoop::suspend and EvLoop::resume methods suspend and resume a loop correspondingly.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvLoop::resume
   * Ev::suspend


id: EvLoop::timer
type: function
doc:
<comment>Description:</comment>
  Creates EvTimer watcher object associated with the current event
    loop instance
  
  Creates EvTimer watcher object associated with the current event loop instance

<comment>Return:</comment>
  <info>EvTimer</info>  Returns EvTimer object on success

<comment>See Also:</comment>
   * EvTimer::__construct


id: EvLoop::verify
type: function
doc:
<comment>Description:</comment>
  Performs internal consistency checks(for debugging)
  
  Performs internal consistency checks(for debugging libev ) and abort the program if any data
  structures were found to be corrupted.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Ev::verify


id: EvPeriodic
type: class
doc:
<comment>Description:</comment>
  Periodic watchers are also timers of a kind, but they are very versatile.
  
  Unlike <class>EvTimer</class> , <class>EvPeriodic</class> watchers are not based on real time(or relative time, the physical
  time that passes) but on wall clock time(absolute time, calendar or clock). The difference is that
  wall clock time can run faster or slower than real time, and time jumps are not uncommon(e.g. when
  adjusting it).
  
  <class>EvPeriodic</class> watcher can be configured to trigger after some specific point in time. For example, if
  an <class>EvPeriodic</class> watcher is configured to trigger "in 10 seconds" (e.g. EvLoop::now + <info>10.0</info> , i.e. an
  absolute time, not a delay), and the system clock is reset to January of the previous year , then
  it will take a year or more to trigger the event (unlike an <class>EvTimer</class> , which would still trigger
  roughly <info>10</info> seconds after starting it as it uses a relative timeout).
  
  As with timers, the callback is guaranteed to be invoked only when the point in time where it is
  supposed to trigger has passed. If multiple timers become ready during the same loop iteration
  then the ones with earlier time-out values are invoked before ones with later time-out values (but
  this is no longer true when a callback calls EvLoop::run recursively).


id: EvPeriodic::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EvPeriodic watcher object
  
  Constructs EvPeriodic watcher object and starts it automatically. EvPeriodic::createStopped method
  creates stopped periodic watcher.

<comment>Param:</comment>
  <info>float</info>     <strong>$offset</strong>         See Periodic watcher operation modes
  <info>string</info>    <strong>$interval</strong>       See Periodic watcher operation modes
  <info>callable</info>  <strong>$reschedule_cb</strong>  Reschedule callback. You can pass <info>null</info>. See Periodic watcher operation
                            modes
  <info>callable</info>  <strong>$callback</strong>       See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>           Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>       Watcher priority

<comment>See Also:</comment>
   * Periodic watcher operation modes
   * <class>EvTimer</class>
   * EvPeriodic::createStopped


id: EvPeriodic::again
type: function
doc:
<comment>Description:</comment>
  Simply stops and restarts the periodic watcher again
  
  Simply stops and restarts the periodic watcher again. This is only useful when attributes are
  changed.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvTimer::again


id: EvPeriodic::at
type: function
doc:
<comment>Description:</comment>
  Returns the absolute time that this
    watcher is supposed to trigger next
  
  When the watcher is active, returns the absolute time that this watcher is supposed to trigger
  next. This is not the same as the offset argument to EvPeriodic::set or EvPeriodic::__construct ,
  but indeed works even in interval mode.

<comment>Return:</comment>
  <info>float</info>  Returns the absolute time this watcher is supposed to trigger next in seconds.


id: EvPeriodic::createStopped
type: function
doc:
<comment>Description:</comment>
  Create a stopped EvPeriodic watcher
  
  Create EvPeriodic object. Unlike EvPeriodic::__construct this method doesn't start the watcher
  automatically.

<comment>Param:</comment>
  <info>float</info>     <strong>$offset</strong>         See Periodic watcher operation modes
  <info>float</info>     <strong>$interval</strong>       See Periodic watcher operation modes
  <info>callable</info>  <strong>$reschedule_cb</strong>  Reschedule callback. You can pass <info>null</info>. See Periodic watcher operation
                            modes
  <info>callable</info>  <strong>$callback</strong>       See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>           Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>       Watcher priority

<comment>Return:</comment>
  <info>EvPeriodic</info>  Returns EvPeriodic watcher object on success.

<comment>See Also:</comment>
   * EvPeriodic::__construct
   * EvTimer::createStopped


id: EvPeriodic::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher
  
  (Re-)Configures EvPeriodic watcher

<comment>Param:</comment>
  <info>float</info>  <strong>$offset</strong>    The same meaning as for EvPeriodic::__construct . See Periodic watcher operation
                    modes
  <info>float</info>  <strong>$interval</strong>  The same meaning as for EvPeriodic::__construct . See Periodic watcher operation
                    modes

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvPrepare::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EvPrepare watcher object
  
  Constructs EvPrepare watcher object. And starts the watcher automatically. If need a stopped
  watcher consider using EvPrepare::createStopped

<comment>Param:</comment>
  <info>string</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>string</info>  <strong>$data</strong>      Custom data associated with the watcher.
  <info>string</info>  <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * <class>EvCheck</class>


id: EvPrepare::createStopped
type: function
doc:
<comment>Description:</comment>
  Creates a stopped instance of EvPrepare watcher
  
  Creates a stopped instance of EvPrepare watcher. Unlike EvPrepare::__construct , this method
  doesn' start the watcher automatically.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>EvPrepare</info>  Return EvPrepare object on success.

<comment>See Also:</comment>
   * EvPrepare::__construct
   * EvWatcher::start


id: EvSignal
type: class
doc:
<comment>Description:</comment>
  <class>EvSignal</class> watchers will trigger an event when the process receives a specific signal one or more
  times. Even though signals are very asynchronous, libev will try its best to deliver signals
  synchronously, i.e. as part of the normal event processing, like any other event.
  
  There is no limit for the number of watchers for the same signal, but only within the same loop,
  i.e. one can watch for <info>SIGINT</info> in the default loop and for <info>SIGIO</info> in another loop, but it is not
  allowed to watch for <info>SIGINT</info> in both the default loop and another loop at the same time. At the
  moment, <info>SIGCHLD</info> is permanently tied to the default loop.
  
  If possible and supported, libev will install its handlers with <return>SA_RESTART</return> (or equivalent)
  behaviour enabled, so system calls should not be unduly interrupted. In case of a problem with
  system calls getting interrupted by signals, all the signals can be blocked in an <class>EvCheck</class> watcher
  and unblocked in a <class>EvPrepare</class> watcher.


id: EvSignal::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EvSignal watcher object
  
  Constructs EvSignal watcher object and starts it automatically. For a stopped periodic watcher
  consider using EvSignal::createStopped method.

<comment>Param:</comment>
  <info>int</info>       <strong>$signum</strong>    Signal number. See constants exported by pcntl extension. See also <return>signal(7)</return>
                       man page.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * EvSignal::createStopped


id: EvSignal::createStopped
type: function
doc:
<comment>Description:</comment>
  Create stopped EvSignal watcher object
  
  Create stopped EvSignal watcher object. Unlike EvSignal::__construct , this method does't start
  the watcher automatically.

<comment>Param:</comment>
  <info>int</info>       <strong>$signum</strong>    Signal number. See constants exported by pcntl extension. See also <return>signal(7)</return>
                       man page.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>EvSignal</info>  Returns EvSignal object on success.

<comment>See Also:</comment>
   * EvWatcher::start
   * EvSignal::__construct


id: EvSignal::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher
  
  Configures the watcher.

<comment>Param:</comment>
  <info>int</info>  <strong>$signum</strong>  Signal number. The same as for EvSignal::__construct

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvStat
type: class
doc:
<comment>Description:</comment>
  <class>EvStat</class> monitors a file system path for attribute changes. It calls stat() on that path in regular
  intervals(or when the OS signals it changed) and sees if it changed compared to the last time,
  invoking the callback if it did.
  
  The path does not need to exist: changing from "path exists" to "path does not exist" is a status
  change like any other. The condition "path does not exist" is signified by the <info>'nlink'</info> item being
  0(returned by EvStat::attr method).
  
  The path must not end in a slash or contain special components such as <info>'.'</info> or <info>..</info> . The path should
  be absolute: if it is relative and the working directory changes, then the behaviour is undefined.
  
  Since there is no portable change notification interface available, the portable implementation
  simply calls stat() regularly on the path to see if it changed somehow. For this case a
  recommended polling interval can be specified. If one specifies a polling interval of <info>0.0</info> (highly
  recommended) then a suitable, unspecified default value will be used(which could be expected to be
  around 5 seconds, although this might change dynamically). libev will also impose a minimum
  interval which is currently around <info>0.1</info> , but that’s usually overkill.
  
  This watcher type is not meant for massive numbers of <class>EvStat</class> watchers, as even with OS-supported
  change notifications, this can be resource-intensive.


id: EvStat::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EvStat watcher object
  
  Constructs EvStat watcher object and starts the watcher automatically.

<comment>Param:</comment>
  <info>string</info>    <strong>$path</strong>      The path to wait for status changes on.
  <info>float</info>     <strong>$interval</strong>  Hint on how quickly a change is expected to be detected and should normally
                       be specified as <info>0.0</info> to let libev choose a suitable value.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority


id: EvStat::attr
type: function
doc:
<comment>Description:</comment>
  Returns the values most recently detected by Ev
  
  Returns array of the values most recently detected by Ev

<comment>Return:</comment>
  <info>array</info>  Returns array with the values most recently detect by Ev(without actual <return>stat</return> 'ing):  List
         for item keys of the array returned by EvStat::attr KeyDescription<info>'dev'</info>ID of device
         containing file<info>'ino'</info>inode number<info>'mode'</info>protection<info>'nlink'</info>number of hard links<info>'uid'</info>user ID of
         owner<info>'size'</info>total size, in bytes<info>'gid'</info>group ID of owner<info>'rdev'</info>device ID (if special
         file)<info>'blksize'</info>blocksize for file system I/O<info>'blocks'</info>number of 512B blocks
         allocated<info>'atime'</info>time of last access<info>'ctime'</info>time of last status change<info>'mtime'</info>time of last
         modification
         
         See <return>stat(2)</return> man page for details.

<comment>See Also:</comment>
   * EvStat::prev
   * EvStat::stat


id: EvStat::createStopped
type: function
doc:
<comment>Description:</comment>
  Create a stopped EvStat watcher object
  
  Creates EvStat watcher object, but doesn't start it automatically(unlike EvStat::__construct ).

<comment>Param:</comment>
  <info>string</info>    <strong>$path</strong>      The path to wait for status changes on.
  <info>float</info>     <strong>$interval</strong>  Hint on how quickly a change is expected to be detected and should normally
                       be specified as <info>0.0</info> to let libev choose a suitable value.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>void</info>  Returns a stopped EvStat watcher object on success.

<comment>See Also:</comment>
   * EvStat::__construct
   * EvWatcher::start


id: EvStat::prev
type: function
doc:
<comment>Description:</comment>
  Returns the previous set of values returned by EvStat::attr
  
  Just like EvStat::attr , but returns the previous set of values.

<comment>Return:</comment>
  <info>void</info>  Returns an array with the same structure as the array returned by EvStat::attr . The array
        contains previously detected values.

<comment>See Also:</comment>
   * EvStat::attr
   * EvStat::stat


id: EvStat::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher
  
  Configures the watcher.

<comment>Param:</comment>
  <info>string</info>  <strong>$path</strong>      The path to wait for status changes on.
  <info>float</info>   <strong>$interval</strong>  Hint on how quickly a change is expected to be detected and should normally be
                     specified as <info>0.0</info> to let libev choose a suitable value.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvStat::stat
type: function
doc:
<comment>Description:</comment>
  Initiates the stat call
  
  Initiates the stat call(updates internal cache). It stats(using <return>lstat</return> ) the path specified in the
  watcher and sets to the values found.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if path exists. Otherwise <info>false</info>.

<comment>See Also:</comment>
   * EvStat::attr
   * EvStat::prev


id: EvTimer
type: class
doc:
<comment>Description:</comment>
  <class>EvTimer</class> watchers are simple relative timers that generate an event after a given time, and
  optionally repeating in regular intervals after that.
  
  The timers are based on real time, that is, if one registers an event that times out after an hour
  and resets the system clock to January last year , it will still time out after(roughly) one hour.
  "Roughly" because detecting time jumps is hard, and some inaccuracies are unavoidable.
  
  The callback is guaranteed to be invoked only after its timeout has passed (not at, so on systems
  with very low-resolution clocks this might introduce a small delay). If multiple timers become
  ready during the same loop iteration then the ones with earlier time-out values are invoked before
  ones of the same priority with later time-out values (but this is no longer true when a callback
  calls EvLoop::run recursively).
  
  The timer itself will do a best-effort at avoiding drift, that is, if a timer is configured to
  trigger every <info>10</info> seconds, then it will normally trigger at exactly <info>10</info> second intervals. If,
  however, the script cannot keep up with the timer because it takes longer than those <info>10</info> seconds to
  do) the timer will not fire more than once per event loop iteration.


id: EvTimer::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs an EvTimer watcher object
  
  Constructs an EvTimer watcher object.

<comment>Param:</comment>
  <info>float</info>     <strong>$after</strong>     Configures the timer to trigger after <strong>$after</strong> seconds.
  <info>float</info>     <strong>$repeat</strong>    If repeat is <info>0.0</info> , then it will automatically be stopped once the timeout is
                       reached. If it is positive, then the timer will automatically be configured
                       to trigger again every repeat seconds later, until stopped manually.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>See Also:</comment>
   * EvTimer::createStopped
   * <class>EvPeriodic</class>
   * ev_timer - relative and optionally repeating timeouts
   * Be smart about timeouts


id: EvTimer::again
type: function
doc:
<comment>Description:</comment>
  Restarts the timer watcher
  
  This will act as if the timer timed out and restart it again if it is repeating. The exact
  semantics are:
  
  if the timer is pending, its pending status is cleared.
  
  if the timer is started but non-repeating, stop it (as if it timed out).
  
  if the timer is repeating, either start it if necessary (with the repeat value), or reset the
  running timer to the repeat value.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvWatcher::stop


id: EvTimer::createStopped
type: function
doc:
<comment>Description:</comment>
  Creates EvTimer stopped watcher object
  
  Creates EvTimer stopped watcher object. Unlike EvTimer::__construct , this method doesn't start
  the watcher automatically.

<comment>Param:</comment>
  <info>float</info>     <strong>$after</strong>     Configures the timer to trigger after <strong>$after</strong> seconds.
  <info>float</info>     <strong>$repeat</strong>    If repeat is <info>0.0</info> , then it will automatically be stopped once the timeout is
                       reached. If it is positive, then the timer will automatically be configured
                       to trigger again every repeat seconds later, until stopped manually.
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .
  <info>mixed</info>     <strong>$data</strong>      Custom data associated with the watcher.
  <info>int</info>       <strong>$priority</strong>  Watcher priority

<comment>Return:</comment>
  <info>EvTimer</info>  Returns EvTimer watcher object on success.

<comment>See Also:</comment>
   * EvTimer::__construct
   * <class>EvPeriodic</class>


id: EvTimer::set
type: function
doc:
<comment>Description:</comment>
  Configures the watcher
  
  Configures the watcher

<comment>Param:</comment>
  <info>float</info>  <strong>$after</strong>   Configures the timer to trigger after <strong>$after</strong> seconds.
  <info>float</info>  <strong>$repeat</strong>  If repeat is <info>0.0</info> , then it will automatically be stopped once the timeout is
                  reached. If it is positive, then the timer will automatically be configured to
                  trigger again every repeat seconds later, until stopped manually.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvWatcher
type: class
doc:
<comment>Description:</comment>
  <class>EvWatcher</class> is a base class for all watchers( <class>EvCheck</class> , <class>EvChild</class> etc.). Since <class>EvWatcher</class> 's
  constructor is abstract , one can't(and don't need to) create EvWatcher objects directly.


id: EvWatcher::__construct
type: function
doc:
<comment>Description:</comment>
  Abstract constructor of a watcher object
  
  EvWatcher::__construct is an abstract constructor of a watcher object implemented in the derived
  classes.


id: EvWatcher::clear
type: function
doc:
<comment>Description:</comment>
  Clear watcher pending status
  
  If the watcher is pending, this method clears its pending status and returns its revents bitset(as
  if its callback was invoked). If the watcher isn't pending it does nothing and returns <info>0</info> .
  
  Sometimes it can be useful to "poll" a watcher instead of waiting for its callback to be invoked,
  which can be accomplished with this function.

<comment>Return:</comment>
  <info>int</info>  In case if the watcher is pending, returns revents bitset as if the watcher callback had been
       invoked. Otherwise returns <info>0</info> .


id: EvWatcher::feed
type: function
doc:
<comment>Description:</comment>
  Feeds the given revents set into the event loop
  
  Feeds the given revents set into the event loop, as if the specified event had happened for the
  watcher.

<comment>Param:</comment>
  <info>int</info>  <strong>$revents</strong>  Bit mask of watcher received events .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvWatcher::getLoop
type: function
doc:
<comment>Description:</comment>
  Returns the loop responsible for the watcher
  
  Returns the loop responsible for the watcher

<comment>Return:</comment>
  <info>EvLoop</info>  Returns <class>EvLoop</class> event loop object responsible for the watcher.


id: EvWatcher::invoke
type: function
doc:
<comment>Description:</comment>
  Invokes the watcher callback with the given received events bit
    mask
  
  Invokes the watcher callback with the given received events bit mask.

<comment>Param:</comment>
  <info>int</info>  <strong>$revents</strong>  Bit mask of watcher received events .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvWatcher::keepalive
type: function
doc:
<comment>Description:</comment>
  Configures whether to keep the loop from returning
  
  Configures whether to keep the loop from returning. With keepalive <strong>$value</strong> set to <info>false</info> the watcher
  won't keep Ev::run / EvLoop::run from returning even though the watcher is active.
  
  Watchers have keepalive <strong>$value</strong> <info>true</info> by default.
  
  Clearing keepalive status is useful when returning from Ev::run / EvLoop::run just because of the
  watcher is undesirable. It could be a long running UDP socket watcher or so.

<comment>Param:</comment>
  <info>bool</info>  <strong>$value</strong>  With keepalive <strong>$value</strong> set to <info>false</info> the watcher won't keep Ev::run / EvLoop::run from
                returning even though the watcher is active.

<comment>Return:</comment>
  <info>bool</info>  Returns the previous state.


id: EvWatcher::setCallback
type: function
doc:
<comment>Description:</comment>
  Sets new callback for the watcher
  
  Sets new callback for the watcher

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  See Watcher callbacks .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EvWatcher::start
type: function
doc:
<comment>Description:</comment>
  Starts the watcher
  
  Marks the watcher as active. Note that only active watchers will receive events.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvWatcher::stop


id: EvWatcher::stop
type: function
doc:
<comment>Description:</comment>
  Stops the watcher
  
  Marks the watcher as inactive. Note that only active watchers will receive events.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EvWatcher::start


id: Event
type: class
doc:
<comment>Description:</comment>
  <class>Event</class> class represents and event firing on a file descriptor being ready to read from or write to;
  a file descriptor becoming ready to read from or write to(edge-triggered I/O only); a timeout
  expiring; a signal occurring; a user-triggered event.
  
  Every event is associated with <class>EventBase</class> . However, event will never fire until it is added (via
  Event::add ). An added event remains in pending state until the registered event occurs, thus
  turning it to active state. To handle events user may register a callback which is called when
  event becomes active. If event is configured persistent , it remains pending. If it is not
  persistent, it stops being pending when it's callback runs. Event::del method deletes event, thus
  making it non-pending. By means of Event::add method it could be added again.


id: Event::ET
type: constant
doc:
<comment>Description:</comment>
  Indicates that the event should be edge-triggered, if the underlying event base backend supports
  edge-triggered events. This affects the semantics of <info>Event::READ</info> and <info>Event::WRITE</info> .


id: Event::PERSIST
type: constant
doc:
<comment>Description:</comment>
  Indicates that the event is persistent. See About event persistence .


id: Event::READ
type: constant
doc:
<comment>Description:</comment>
  This flag indicates an event that becomes active when the provided file descriptor(usually a
  stream resource, or socket) is ready for reading.


id: Event::SIGNAL
type: constant
doc:
<comment>Description:</comment>
  Used to implement signal detection. See "Constructing signal events" below.


id: Event::TIMEOUT
type: constant
doc:
<comment>Description:</comment>
  This flag indicates an event that becomes active after a timeout elapses.
  
  The <info>Event::TIMEOUT</info> flag is ignored when constructing an event: one can either set a timeout when
  event is added , or not. It is set in the <return>$what</return> argument to the callback function when a timeout
  has occurred.


id: Event::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs Event object
  
  Constructs Event object.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>  The event base to associate with.
  <info>mixed</info>      <strong>$fd</strong>    stream resource, socket resource, or numeric file descriptor. For timer events
                    pass <info>-1</info> . For signal events pass the signal number, e.g. <info>SIGHUP</info> .
  <info>int</info>        <strong>$what</strong>  Event flags. See Event flags .
  <info>callable</info>   <strong>$cb</strong>    The event callback. See Event callbacks .
  <info>mixed</info>      <strong>$arg</strong>   Custom data. If specified, it will be passed to the callback when event
                    triggers.

<comment>Return:</comment>
  <info>unknown</info>  Returns Event object.

<comment>See Also:</comment>
   * Event::signal
   * Event::timer


id: Event::add
type: function
doc:
<comment>Description:</comment>
  Makes event pending
  
  Marks event pending. Non-pending event will never occur, and the event callback will never be
  called. In conjunction with Event::del an event could be re-scheduled by user at any time.
  
  If Event::add is called on an already pending event, libevent will leave it pending and
  re-schedule it with the given timeout(if specified). If in this case timeout is not specified,
  Event::add has no effect.

<comment>Param:</comment>
  <info>float</info>  <strong>$timeout</strong>  Timeout in seconds.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * Event::add
   * Event::del
   * Event::signal
   * Event::timer


id: Event::addSignal
type: function
doc:
<comment>Description:</comment>
  Sinônimo de Event::add
  
  Este método é um apelido para:  Event::add


id: Event::del
type: function
doc:
<comment>Description:</comment>
  Makes event non-pending
  
  Removes an event from the set of monitored events, i.e. makes it non-pending.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * Event::add


id: Event::delSignal
type: function
doc:
<comment>Description:</comment>
  Sinônimo de Event::del
  
  Este método é um apelido para:  Event::del


id: Event::free
type: function
doc:
<comment>Description:</comment>
  Make event non-pending and free resources allocated for this
    event
  
  Removes event from the list of events monitored by libevent, and free resources allocated for the
  event.
  
  The Event::free method currently doesn't destruct the object itself. To destruct the object
  completely call <strong>unset()</strong> , or assign <info>null</info>.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Event::__construct


id: Event::getSupportedMethods
type: function
doc:
<comment>Description:</comment>
  Returns array with of the names of the methods supported in this version of Libevent
  
  Returns array with of the names of the methods(backends) supported in this version of Libevent.

<comment>Return:</comment>
  <info>array</info>  Returns array.

<comment>See Also:</comment>
   * <class>EventConfig</class>


id: Event::pending
type: function
doc:
<comment>Description:</comment>
  Detects whether event is pending or scheduled
  
  Detects whether event is pending or scheduled

<comment>Param:</comment>
  <info>int</info>  <strong>$flags</strong>  One of, or a composition of the following constants: <info>Event::READ</info> , <info>Event::WRITE</info> ,
               <info>Event::TIMEOUT</info> , <info>Event::SIGNAL</info> .

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if event is pending or scheduled. Otherwise <info>false</info>.


id: Event::set
type: function
doc:
<comment>Description:</comment>
  Re-configures event
  
  Re-configures event. Note, this function doesn't invoke obsolete libevent's event_set. It calls
  event_assign instead.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>  The event base to associate the event with.
  <info>mixed</info>      <strong>$fd</strong>    Stream resource, socket resource, or numeric file descriptor. For timer events
                    pass <info>-1</info> . For signal events pass the signal number, e.g. <info>SIGHUP</info> .
  <info>int</info>        <strong>$what</strong>  See Event flags .
  <info>callable</info>   <strong>$cb</strong>    The event callback. See Event callbacks .
  <info>mixed</info>      <strong>$arg</strong>   Custom data associated with the event. It will be passed to the callback when
                    the event becomes active.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: Event::setPriority
type: function
doc:
<comment>Description:</comment>
  Set event priority
  
  Set event priority.

<comment>Param:</comment>
  <info>int</info>  <strong>$priority</strong>  The event priority.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: Event::setTimer
type: function
doc:
<comment>Description:</comment>
  Re-configures timer event
  
  Re-configures timer event. Note, this function doesn't invoke obsolete libevent's <return>event_set</return> . It
  calls <return>event_assign</return> instead.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>  The event base to associate with.
  <info>callable</info>   <strong>$cb</strong>    The timer event callback. See Event callbacks .
  <info>mixed</info>      <strong>$arg</strong>   Custom data. If specified, it will be passed to the callback when event
                    triggers.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * Event::__construct
   * Event::timer


id: Event::signal
type: function
doc:
<comment>Description:</comment>
  Constructs signal event object
  
  Constructs signal event object. This is a straightforward method to create a signal event. Note,
  the generic Event::__construct method can contruct signal event objects too.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>    The associated event base object.
  <info>int</info>        <strong>$signum</strong>  The signal number.
  <info>callable</info>   <strong>$cb</strong>      The signal event callback. See Event callbacks .
  <info>mixed</info>      <strong>$arg</strong>     Custom data. If specified, it will be passed to the callback when event
                      triggers.

<comment>Return:</comment>
  <info>Event</info>  Returns Event object on success. Otherwise <info>false</info>.

<comment>See Also:</comment>
   * Constructing signal events


id: Event::timer
type: function
doc:
<comment>Description:</comment>
  Constructs timer event object
  
  Constructs timer event object. This is a straightforward method to create a timer event. Note, the
  generic Event::__construct method can contruct signal event objects too.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>  The associated event base object.
  <info>callable</info>   <strong>$cb</strong>    The signal event callback. See Event callbacks .
  <info>mixed</info>      <strong>$arg</strong>   Custom data. If specified, it will be passed to the callback when event
                    triggers.

<comment>Return:</comment>
  <info>Event</info>  Returns Event object on success. Otherwise <info>false</info>.


id: EventBase
type: class
doc:
<comment>Description:</comment>
  <class>EventBase</class> class represents libevent's event base structure. It holds a set of events and can poll
  to determine which events are active.
  
  Each event base has a method , or a backend that it uses to determine which events are ready. The
  recognized methods are: <return>select</return> , <return>poll</return> , <return>epoll</return> , <return>kqueue</return> , <return>devpoll</return> , <return>evport</return> and <return>win32</return> .
  
  To configure event base to use, or avoid specific backend <class>EventConfig</class> class can be used.
  
  Do NOT destroy the <class>EventBase</class> object as long as resources of the associated <return>Event</return> objects are not
  released. Otherwise, it will lead to unpredictable results!


id: EventBase::EPOLL_USE_CHANGELIST
type: constant
doc:
<comment>Description:</comment>
  If we are using the <return>epoll</return> backend, this flag says that it is safe to use Libevent's internal
  change-list code to batch up adds and deletes in order to try to do as few syscalls as possible.
  
  Setting this flag can make code run faster, but it may trigger a Linux bug: it is not safe to use
  this flag if one has any fds cloned by dup(), or its variants. Doing so will produce strange and
  hard-to-diagnose bugs.
  
  This flag can also be activated by settnig the <return>EVENT_EPOLL_USE_CHANGELIST</return> environment variable.
  
  This flag has no effect if one winds up using a backend other than <return>epoll</return> .


id: EventBase::LOOP_NONBLOCK
type: constant
doc:
<comment>Description:</comment>
  Flag used with EventBase::loop method which means: "do not block: see which events are ready now,
  run the callbacks of the highest-priority ones, then exit".


id: EventBase::LOOP_ONCE
type: constant
doc:
<comment>Description:</comment>
  Flag used with EventBase::loop method which means: "block until libevent has an active event, then
  exit once all active events have had their callbacks run".


id: EventBase::NOLOCK
type: constant
doc:
<comment>Description:</comment>
  Configuration flag. Do not allocate a lock for the event base, even if we have locking set up".


id: EventBase::NO_CACHE_TIME
type: constant
doc:
<comment>Description:</comment>
  Configuration flag. Instead of checking the current time every time the event loop is ready to run
  timeout callbacks, check after each timeout callback.


id: EventBase::STARTUP_IOCP
type: constant
doc:
<comment>Description:</comment>
  Windows-only configuration flag. Enables the IOCP dispatcher at startup.


id: EventBase::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventBase object
  
  Constructs EventBase object

<comment>Param:</comment>
  <info>EventConfig</info>  <strong>$cfg</strong>  Optional <class>EventConfig</class> object.

<comment>Return:</comment>
  <info>unknown</info>  Returns EventBase object.

<comment>See Also:</comment>
   * <class>EventConfig</class>


id: EventBase::dispatch
type: function
doc:
<comment>Description:</comment>
  Dispatch pending events
  
  Wait for events to become active, and run their callbacks. The same as EventBase::loop with no
  flags set.
  
   Do NOT destroy the <class>EventBase</class> object as long as resources of the associated <return>Event</return> objects are not
  released. Otherwise, it will lead to unpredictable results!
  
  Do NOT destroy the <class>EventBase</class> object as long as resources of the associated <return>Event</return> objects are not
  released. Otherwise, it will lead to unpredictable results!

<comment>Return:</comment>
  <info>void</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::loop


id: EventBase::exit
type: function
doc:
<comment>Description:</comment>
  Stop dispatching events
  
  Tells event base to stop optionally after given number of seconds.

<comment>Param:</comment>
  <info>float</info>  <strong>$timeout</strong>  Optional number of seconds after which the event base should stop dispatching
                   events.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::stop


id: EventBase::free
type: function
doc:
<comment>Description:</comment>
  Free resources allocated for this event base
  
  Deallocates resources allocated by libevent for the <class>EventBase</class> object.
  
  The EventBase::free method doesn't destruct the object itself. To destruct the object completely
  call <strong>unset()</strong> , or assign <info>null</info>.
  
  This method does not deallocate or detach any of the events that are currently associated with the
  <class>EventBase</class> object, or close any of their sockets - beware.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventBase::__construct


id: EventBase::getFeatures
type: function
doc:
<comment>Description:</comment>
  Returns bitmask of features supported
  
  Returns bitmask of features supported.

<comment>Return:</comment>
  <info>int</info>  Returns integer representing a bitmask of supported features. See EventConfig::FEATURE_*
       constants .

<comment>See Also:</comment>
   * EventBase::getMethod
   * <class>EventConfig</class>


id: EventBase::getMethod
type: function
doc:
<comment>Description:</comment>
  Returns event method in use

<comment>Return:</comment>
  <info>string</info>  String representing used event method(backend).

<comment>See Also:</comment>
   * EventBase::getFeatures


id: EventBase::getTimeOfDayCached
type: function
doc:
<comment>Description:</comment>
  Returns the current event base time
  
  On success returns the current time(as returned by <return>gettimeofday()</return> ), looking at the cached value
  in base if possible, and calling <return>gettimeofday()</return> or <return>clock_gettime()</return> as appropriate if there is no
  cached time.

<comment>Return:</comment>
  <info>float</info>  Returns the current event base time. On failure returns <info>null</info>.


id: EventBase::gotExit
type: function
doc:
<comment>Description:</comment>
  Checks if the event loop was told to exit
  
  Checks if the event loop was told to exit by EventBase::exit .

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info>, event loop was told to exit by EventBase::exit . Otherwise <info>false</info>.

<comment>See Also:</comment>
   * EventBase::exit
   * EventBase::stop
   * EventBase::gotStop


id: EventBase::gotStop
type: function
doc:
<comment>Description:</comment>
  Checks if the event loop was told to exit
  
  Checks if the event loop was told to exit by EventBase::stop .

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info>, event loop was told to stop by EventBase::stop . Otherwise <info>false</info>.

<comment>See Also:</comment>
   * EventBase::exit
   * EventBase::stop
   * EventBase::gotExit


id: EventBase::loop
type: function
doc:
<comment>Description:</comment>
  Dispatch pending events
  
  Wait for events to become active, and run their callbacks.
  
   Do NOT destroy the <class>EventBase</class> object as long as resources of the associated <return>Event</return> objects are not
  released. Otherwise, it will lead to unpredictable results!
  
  Do NOT destroy the <class>EventBase</class> object as long as resources of the associated <return>Event</return> objects are not
  released. Otherwise, it will lead to unpredictable results!

<comment>Param:</comment>
  <info>int</info>  <strong>$flags</strong>  Optional flags. One of <return>EventBase::LOOP_*</return> constants. See EventBase constants .

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::dispatch


id: EventBase::priorityInit
type: function
doc:
<comment>Description:</comment>
  Sets number of priorities per event base
  
  Sets number of priorities per event base.

<comment>Param:</comment>
  <info>int</info>  <strong>$n_priorities</strong>  The number of priorities per event base.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * Event::setPriority


id: EventBase::reInit
type: function
doc:
<comment>Description:</comment>
  Re-initialize event base(after a fork)
  
  Re-initialize event base. Should be called after a fork.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventBase::stop
type: function
doc:
<comment>Description:</comment>
  Tells event_base to stop dispatching events
  
  Tells event_base to stop dispatching events

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::exit
   * EventBase::gotStop


id: EventBuffer
type: class
doc:
<comment>Description:</comment>
  <class>EventBuffer</class> represents Libevent's "evbuffer", an utility functionality for buffered I/O.
  
  Event buffers are meant to be generally useful for doing the "buffer" part of buffered network
  I/O.


id: EventBuffer::EOL_ANY
type: constant
doc:
<comment>Description:</comment>
  The end of line is any sequence of any number of carriage return and linefeed characters. This
  format is not very useful; it exists mainly for backward compatibility.


id: EventBuffer::EOL_CRLF
type: constant
doc:
<comment>Description:</comment>
  The end of the line is an optional carriage return, followed by a linefeed. (In other words, it is
  either a <return>"\r\n"</return> or a <return>"\n"</return> .) This format is useful in parsing text-based Internet protocols, since
  the standards generally prescribe a <return>"\r\n"</return> line-terminator, but nonconformant clients sometimes
  say just <return>"\n"</return> .


id: EventBuffer::EOL_CRLF_STRICT
type: constant
doc:
<comment>Description:</comment>
  The end of a line is a single carriage return, followed by a single linefeed. (This is also known
  as <return>"\r\n"</return> . The ASCII values are <info>0x0D</info> <info>0x0A</info> ).


id: EventBuffer::EOL_LF
type: constant
doc:
<comment>Description:</comment>
  The end of a line is a single linefeed character. (This is also known as <return>"\n"</return> . It is ASCII value
  is <info>0x0A</info> .)


id: EventBuffer::PTR_ADD
type: constant
doc:
<comment>Description:</comment>
  The same as <info>EventBuffer::PTR_SET</info> , except this flag causes EventBuffer::setPosition method to move
  position forward up to the specified number of bytes(instead of setting absolute position).


id: EventBuffer::PTR_SET
type: constant
doc:
<comment>Description:</comment>
  Flag used as argument of EventBuffer::setPosition method. If this flag specified, the position
  pointer is moved to an absolute position within the buffer.


id: EventBuffer::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventBuffer object
  
  Constructs EventBuffer object

<comment>Return:</comment>
  <info>unknown</info>  Returns EventBuffer object.


id: EventBuffer::add
type: function
doc:
<comment>Description:</comment>
  Append data to the end of an event buffer
  
  Append data to the end of an event buffer.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  String to be appended to the end of the buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::addBuffer


id: EventBuffer::addBuffer
type: function
doc:
<comment>Description:</comment>
  Move all data from a buffer provided to the current instance of EventBuffer
  
  Move all data from the buffer provided in <strong>$buf</strong> parameter to the end of current <class>EventBuffer</class> . This
  is a destructive add. The data from one buffer moves into the other buffer. However, no
  unnecessary memory copies occur.

<comment>Param:</comment>
  <info>EventBuffer</info>  <strong>$buf</strong>  The source EventBuffer object.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::add


id: EventBuffer::appendFrom
type: function
doc:
<comment>Description:</comment>
  Moves the specified number of bytes from a source buffer to the
    end of the current buffer
  
  Moves the specified number of bytes from a source buffer to the end of the current buffer. If
  there are fewer number of bytes, it moves all the bytes available from the source buffer.

<comment>Param:</comment>
  <info>EventBuffer</info>  <strong>$buf</strong>  Source buffer.
  <info>int</info>          <strong>$len</strong>  

<comment>Return:</comment>
  <info>int</info>  Returns the number of bytes read.

<comment>See Also:</comment>
   * EventBuffer::copyout
   * EventBuffer::drain
   * EventBuffer::pullup
   * EventBuffer::readLine
   * EventBuffer::read


id: EventBuffer::copyout
type: function
doc:
<comment>Description:</comment>
  Copies out specified number of bytes from the front of the buffer
  
  Behaves just like EventBuffer::read , but does not drain any data from the buffer. I.e. it copies
  the first <strong>$max_bytes</strong> bytes from the front of the buffer into <strong>$data</strong> . If there are fewer than
  <strong>$max_bytes</strong> bytes available, the function copies all the bytes there are.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>       Output string.
  <info>int</info>     <strong>$max_bytes</strong>  The number of bytes to copy.

<comment>Return:</comment>
  <info>int</info>  Returns the number of bytes copied, or <info>-1</info> on failure.

<comment>See Also:</comment>
   * EventBuffer::read
   * EventBuffer::appendFrom


id: EventBuffer::drain
type: function
doc:
<comment>Description:</comment>
  Removes specified number of bytes from the front of the buffer
    without copying it anywhere
  
  Behaves as EventBuffer::read , except that it does not copy the data: it just removes it from the
  front of the buffer.

<comment>Param:</comment>
  <info>int</info>  <strong>$len</strong>  The number of bytes to remove from the buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::read
   * EventBuffer::appendFrom


id: EventBuffer::enableLocking
type: function
doc:
<comment>Description:</comment>
  Enable locking on an <class>EventBuffer</class> so that it can safely be used by multiple threads at the same
  time. When locking is enabled, the lock will be held when callbacks are invoked. This could result
  in deadlock if you aren't careful. Plan accordingly!

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * Evbuffers and Thread-safety


id: EventBuffer::expand
type: function
doc:
<comment>Description:</comment>
  Reserves space in buffer
  
  Alters the last chunk of memory in the buffer, or adds a new chunk, such that the buffer is now
  large enough to contain <strong>$len</strong> bytes without any further allocations.

<comment>Param:</comment>
  <info>int</info>  <strong>$len</strong>  The number of bytes to reserve for the buffer

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventBuffer::freeze
type: function
doc:
<comment>Description:</comment>
  Prevent calls that modify an event buffer from succeeding
  
  Prevent calls that modify an event buffer from succeeding

<comment>Param:</comment>
  <info>bool</info>  <strong>$at_front</strong>  Whether to disable changes to the front or end of the buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::unfreeze


id: EventBuffer::lock
type: function
doc:
<comment>Description:</comment>
  Acquires a lock on buffer
  
  Acquires a lock on buffer. Can be used in pair with EventBuffer::unlock to make a set of
  operations atomic, i.e. thread-safe. Note, it is not needed to lock buffers for individual
  operations. When locking is enabled(see EventBuffer::enableLocking ), individual operations on
  event buffers are already atomic.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventBuffer::unlock


id: EventBuffer::prepend
type: function
doc:
<comment>Description:</comment>
  Prepend data to the front of the buffer
  
  Prepend data to the front of the buffer.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  String to be prepended to the front of the buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::prependBuffer
   * EventBuffer::add
   * EventBuffer::addBuffer


id: EventBuffer::prependBuffer
type: function
doc:
<comment>Description:</comment>
  Moves all data from source buffer to the front of current buffer
  
  Behaves as EventBuffer::addBuffer , except that it moves data to the front of the buffer.

<comment>Param:</comment>
  <info>EventBuffer</info>  <strong>$buf</strong>  Source buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::add
   * EventBuffer::addBuffer
   * EventBuffer::prepend


id: EventBuffer::pullup
type: function
doc:
<comment>Description:</comment>
  Linearizes data within buffer
    and returns it's contents as a string
  
  "Linearizes" the first <strong>$size</strong> bytes of the buffer, copying or moving them as needed to ensure that
  they are all contiguous and occupying the same chunk of memory. If size is negative, the function
  linearizes the entire buffer.
  
  Calling EventBuffer::pullup with a large size can be quite slow, since it potentially needs to
  copy the entire buffer's contents.

<comment>Param:</comment>
  <info>int</info>  <strong>$size</strong>  The number of bytes required to be contiguous within the buffer.

<comment>Return:</comment>
  <info>string</info>  If <strong>$size</strong> is greater than the number of bytes in the buffer, the function returns <info>null</info>.
          Otherwise, EventBuffer::pullup returns string.

<comment>See Also:</comment>
   * EventBuffer::copyout
   * EventBuffer::drain
   * EventBuffer::read
   * EventBuffer::readLine
   * EventBuffer::appendFrom


id: EventBuffer::read
type: function
doc:
<comment>Description:</comment>
  Read data from an evbuffer and drain the bytes read
  
  Read the first <strong>$max_bytes</strong> from the buffer and drain the bytes read. If more <strong>$max_bytes</strong> are
  requested than are available in the buffer, it only extracts as many bytes as available.

<comment>Param:</comment>
  <info>int</info>  <strong>$max_bytes</strong>  Maxmimum number of bytes to read from the buffer.

<comment>Return:</comment>
  <info>string</info>  Returns string read, or <info>false</info> on failure.

<comment>See Also:</comment>
   * EventBuffer::copyout
   * EventBuffer::drain
   * EventBuffer::pullup
   * EventBuffer::readLine
   * EventBuffer::appendFrom


id: EventBuffer::readFrom
type: function
doc:
<comment>Description:</comment>
  Read data from a file onto the end of the buffer
  
  Read data from the file specified by <strong>$fd</strong> onto the end of the buffer.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$fd</strong>       Socket resource, stream, or numeric file descriptor.
  <info>int</info>    <strong>$howmuch</strong>  Maxmimum number of bytes to read.

<comment>Return:</comment>
  <info>int</info>  Returns the number of bytes read, or <info>false</info> on failure.

<comment>See Also:</comment>
   * EventBuffer::copyout
   * EventBuffer::drain
   * EventBuffer::pullup
   * EventBuffer::readLine
   * EventBuffer::appendFrom


id: EventBuffer::readLine
type: function
doc:
<comment>Description:</comment>
  Extracts a line from the front of the buffer
  
  Extracts a line from the front of the buffer and returns it in a newly allocated string. If there
  is not a whole line to read, the function returns <info>null</info>. The line terminator is not included in the
  copied string.

<comment>Param:</comment>
  <info>int</info>  <strong>$eol_style</strong>  One of EventBuffer:EOL_* constants .

<comment>Return:</comment>
  <info>string</info>  On success returns the line read from the buffer, otherwise <info>null</info>.

<comment>See Also:</comment>
   * EventBuffer::copyout
   * EventBuffer::drain
   * EventBuffer::pullup
   * EventBuffer::read
   * EventBuffer::appendFrom


id: EventBuffer::search
type: function
doc:
<comment>Description:</comment>
  Scans the buffer for an occurrence of a string
  
  Scans the buffer for an occurrence of the string <strong>$what</strong> . It returns numeric position of the
  string, or <info>false</info> if the string was not found.
  
  If the <strong>$start</strong> argument is provided, it points to the position at which the search should begin;
  otherwise, the search is performed from the start of the string. If <strong>$end</strong> argument provided, the
  search is performed between start and end buffer positions.

<comment>Param:</comment>
  <info>string</info>  <strong>$what</strong>   String to search.
  <info>int</info>     <strong>$start</strong>  Start search position.
  <info>int</info>     <strong>$end</strong>    End search position.

<comment>Return:</comment>
  <info>mixed</info>  Returns numeric position of the first occurrence of the string in the buffer, or <info>false</info> if
         string is not found.
         
         Esta função pode
         retornar o valor booleano <info>false</info>, mas também pode retornar um valor não booleano que pode
         ser
         avaliado como <info>false</info>. Leia a seção sobre Booleanos para mais
         informações. Use o operador
         === para testar o valor retornado por esta
         função.

<comment>See Also:</comment>
   * EventBuffer::searchEol


id: EventBuffer::searchEol
type: function
doc:
<comment>Description:</comment>
  Scans the buffer for an occurrence of an end of line
  
  Scans the buffer for an occurrence of an end of line specified by <strong>$eol_style</strong> parameter . It
  returns numeric position of the string, or <info>false</info> if the string was not found.
  
  If the <strong>$start</strong> argument is provided, it represents the position at which the search should begin;
  otherwise, the search is performed from the start of the string. If <strong>$end</strong> argument provided, the
  search is performed between start and end buffer positions.

<comment>Param:</comment>
  <info>int</info>  <strong>$start</strong>      Start search position.
  <info>int</info>  <strong>$eol_style</strong>  One of EventBuffer:EOL_* constants .

<comment>Return:</comment>
  <info>mixed</info>  Returns numeric position of the first occurrence of end-of-line symbol in the buffer, or
         <info>false</info> if not found.
         
         Esta função pode
         retornar o valor booleano <info>false</info>, mas também pode retornar um valor não booleano que pode
         ser
         avaliado como <info>false</info>. Leia a seção sobre Booleanos para mais
         informações. Use o operador
         === para testar o valor retornado por esta
         função.

<comment>See Also:</comment>
   * EventBuffer::search


id: EventBuffer::substr
type: function
doc:
<comment>Description:</comment>
  Substracts a portion of the buffer data
  
  Substracts up to <strong>$length</strong> bytes of the buffer data beginning at <strong>$start</strong> position.

<comment>Param:</comment>
  <info>int</info>  <strong>$start</strong>   The start position of data to be substracted.
  <info>int</info>  <strong>$length</strong>  Maximum number of bytes to substract.

<comment>Return:</comment>
  <info>string</info>  Returns the data substracted as a <info>string</info> on success, or <info>false</info> on failure.

<comment>See Also:</comment>
   * EventBuffer::read


id: EventBuffer::unfreeze
type: function
doc:
<comment>Description:</comment>
  Re-enable calls that modify an event buffer
  
  Re-enable calls that modify an event buffer.

<comment>Param:</comment>
  <info>bool</info>  <strong>$at_front</strong>  Whether to enable events at the front or at the end of the buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::freeze


id: EventBuffer::unlock
type: function
doc:
<comment>Description:</comment>
  Releases lock acquired by EventBuffer::lock
  
  Releases lock acquired by EventBuffer::lock .

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBuffer::lock


id: EventBuffer::write
type: function
doc:
<comment>Description:</comment>
  Write contents of the buffer to a file or socket
  
  Write contents of the buffer to a file descriptor. The buffer will be drained after the bytes have
  been successfully written.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$fd</strong>       Socket resource, stream or numeric file descriptor associated normally associated
                   with a socket.
  <info>int</info>    <strong>$howmuch</strong>  The maximum number of bytes to write.

<comment>Return:</comment>
  <info>int</info>  Returns the number of bytes written, or <info>false</info> on error.

<comment>See Also:</comment>
   * EventBuffer::read


id: EventBufferEvent
type: class
doc:
<comment>Description:</comment>
  Represents Libevent's buffer event.
  
  Usually an application wants to perform some amount of data buffering in addition to just
  responding to events. When we want to write data, for example, the usual pattern looks like:
  
  Decide that we want to write some data to a connection; put that data in a buffer.
  
  Wait for the connection to become writable
  
  Write as much of the data as we can
  
  Remember how much we wrote, and if we still have more data to write, wait for the connection to
  become writable again.
  
  This buffered I/O pattern is common enough that Libevent provides a generic mechanism for it. A
  "buffer event" consists of an underlying transport (like a socket), a read buffer, and a write
  buffer. Instead of regular events, which give callbacks when the underlying transport is ready to
  be read or written, a buffer event invokes its user-supplied callbacks when it has read or written
  enough data.


id: EventBufferEvent::ERROR
type: constant
doc:
<comment>Description:</comment>
  An error occurred during a bufferevent operation. For more information on what the error was, call
  EventUtil::getLastSocketErrno and/or EventUtil::getLastSocketError .


id: EventBufferEvent::OPT_CLOSE_ON_FREE
type: constant
doc:
<comment>Description:</comment>
  When the buffer event is freed, close the underlying transport. This will close an underlying
  socket, free an underlying buffer event, etc.


id: EventBufferEvent::OPT_DEFER_CALLBACKS
type: constant
doc:
<comment>Description:</comment>
  When this flag is set, the bufferevent defers all of its callbacks. See Fast portable non-blocking
  network programming with Libevent, Deferred callbacks .


id: EventBufferEvent::OPT_THREADSAFE
type: constant
doc:
<comment>Description:</comment>
  Automatically allocate locks for the bufferevent, so that it’s safe to use from multiple threads.


id: EventBufferEvent::OPT_UNLOCK_CALLBACKS
type: constant
doc:
<comment>Description:</comment>
  By default, when the bufferevent is set up to be threadsafe, the buffer event’s locks are held
  whenever the any user-provided callback is invoked. Setting this option makes Libevent release the
  buffer event’s lock when it’s invoking the callbacks.


id: EventBufferEvent::READING
type: constant
doc:
<comment>Description:</comment>
  An event occurred during a read operation on the bufferevent. See the other flags for which event
  it was.


id: EventBufferEvent::WRITING
type: constant
doc:
<comment>Description:</comment>
  An event occurred during a write operation on the bufferevent. See the other flags for which event
  it was.


id: EventBufferEvent::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventBufferEvent object
  
  Create a buffer event on a socket, stream or a file descriptor. Passing <info>null</info> to <strong>$socket</strong> means that
  the socket should be created later, e.g. by means of EventBufferEvent::connect .

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>     Event base that should be associated with the new buffer event.
  <info>mixed</info>      <strong>$socket</strong>   May be created as a stream(not necessarily by means of <return>sockets</return> extension)
  <info>int</info>        <strong>$options</strong>  One of EventBufferEvent::OPT_* constants , or <info>0</info> .
  <info>callable</info>   <strong>$readcb</strong>   Read event callback. See About buffer event callbacks .
  <info>callable</info>   <strong>$writecb</strong>  Write event callback. See About buffer event callbacks .
  <info>callable</info>   <strong>$eventcb</strong>  Status-change event callback. See About buffer event callbacks .
  <info>mixed</info>      <strong>$arg</strong>      A variable that will be passed to all the callbacks.

<comment>Return:</comment>
  <info>unknown</info>  Returns buffer event resource optionally associated with socket resource. */

<comment>See Also:</comment>
   * EventBufferEvent::sslFilter
   * EventBufferEvent::sslSocket


id: EventBufferEvent::close
type: function
doc:
<comment>Description:</comment>
  Closes file descriptor associated with the current buffer event
  
  Closes file descriptor associated with the current buffer event.
  
  This method may be used in cases when the <info>EventBufferEvent::OPT_CLOSE_ON_FREE</info> option is not
  appropriate.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventBufferEvent::connect
type: function
doc:
<comment>Description:</comment>
  Connect buffer event's file descriptor to given address or
    UNIX socket
  
  Connect buffer event's file descriptor to given address(optionally with port), or a UNIX domain
  socket.
  
  If socket is not assigned to the buffer event, this function allocates a new socket and makes it
  non-blocking internally.
  
  To resolve DNS names(asyncronously), use EventBufferEvent::connectHost method.

<comment>Param:</comment>
  <info>string</info>  <strong>$addr</strong>  Should contain an IP address with optional port number, or a path to UNIX domain
                 socket. Recognized formats are:
                  Note, <return>'unix:'</return> prefix is currently not case sensitive.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::connectHost


id: EventBufferEvent::connectHost
type: function
doc:
<comment>Description:</comment>
  Connects to a hostname with optionally asyncronous DNS resolving
  
  Resolves the DNS name hostname, looking for addresses of type <strong>$family</strong> ( <return>EventUtil::AF_*</return>
  constants). If the name resolution fails, it invokes the event callback with an error event. If it
  succeeds, it launches a connection attempt just as EventBufferEvent::connect would.
  
  <strong>$dns_base</strong> is optional. May be <info>null</info>, or an object created with EventDnsBase::__construct . For
  asyncronous hostname resolving pass a valid event dns base resource. Otherwise the hostname
  resolving will block.
  
  <class>EventDnsBase</class> is available only if <return>Event</return> configured --with-event-extra ( <return>event_extra</return> library,
  libevent protocol-specific functionality support including HTTP, DNS, and RPC ).
  
  EventBufferEvent::connectHost requires <return>libevent-2.0.3-alpha</return> or greater.

<comment>Param:</comment>
  <info>EventDnsBase</info>  <strong>$dns_base</strong>  Object of <class>EventDnsBase</class> in case if DNS is to be resolved asyncronously.
                           Otherwise <info>null</info>.
  <info>string</info>        <strong>$hostname</strong>  Hostname to connect to. Recognized formats are:
                           
  <info>int</info>           <strong>$port</strong>      Port number
  <info>int</info>           <strong>$family</strong>    Address family. <info>EventUtil::AF_UNSPEC</info> , <info>EventUtil::AF_INET</info> , or
                           <info>EventUtil::AF_INET6</info> . See EventUtil constants .

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::connect


id: EventBufferEvent::createPair
type: function
doc:
<comment>Description:</comment>
  Creates two buffer events connected to each other
  
  Returns array of two <class>EventBufferEvent</class> objects connected to each other. All the usual options are
  supported, except for <info>EventBufferEvent::OPT_CLOSE_ON_FREE</info> , which has no effect, and
  <info>EventBufferEvent::OPT_DEFER_CALLBACKS</info> , which is always on.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>     Associated event base
  <info>int</info>        <strong>$options</strong>  EventBufferEvent::OPT_* constants combined with bitwise <return>OR</return> operator.

<comment>Return:</comment>
  <info>array</info>  Returns array of two <class>EventBufferEvent</class> objects connected to each other.


id: EventBufferEvent::disable
type: function
doc:
<comment>Description:</comment>
  Disable events read, write, or both on a buffer event
  
  Disable events <info>Event::READ</info> , <info>Event::WRITE</info> , or <info>Event::READ</info> <return>|</return> <info>Event::WRITE</info> on a buffer event.

<comment>Param:</comment>
  <info>int</info>  <strong>$events</strong>  

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::enable


id: EventBufferEvent::enable
type: function
doc:
<comment>Description:</comment>
  Enable events read, write, or both on a buffer event
  
  Enable events <info>Event::READ</info> , <info>Event::WRITE</info> , or <info>Event::READ</info> <return>|</return> <info>Event::WRITE</info> on a buffer event.

<comment>Param:</comment>
  <info>int</info>  <strong>$events</strong>  <info>Event::READ</info> , <info>Event::WRITE</info> , or <info>Event::READ</info> <return>|</return> <info>Event::WRITE</info> on a buffer event.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::disable


id: EventBufferEvent::free
type: function
doc:
<comment>Description:</comment>
  Free a buffer event
  
  Free resources allocated by buffer event.
  
  Usually there is no need to call this method, since normally it is done within internal object
  destructors. However, sometimes we have a long-time script allocating lots of instances, or a
  script with a heavy memory usage, where we need to free resources as soon as possible. In such
  cases EventBufferEvent::free may be used to protect the script against running up to the
  <return>memory_limit</return> .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventBufferEvent::getDnsErrorString
type: function
doc:
<comment>Description:</comment>
  Returns string describing the last failed DNS lookup attempt
  
  Returns string describing the last failed DNS lookup attempt made by EventBufferEvent::connectHost
  , or an empty string, if there is no DNS error detected.

<comment>Return:</comment>
  <info>string</info>  Returns a string describing DNS lookup error, or an empty string for no error.

<comment>See Also:</comment>
   * EventBufferEvent::connectHost


id: EventBufferEvent::getEnabled
type: function
doc:
<comment>Description:</comment>
  Returns bitmask of events currently enabled on the buffer event
  
  Returns bitmask of events currently enabled on the buffer event

<comment>Return:</comment>
  <info>int</info>  Returns integer representing a bitmask of events currently enabled on the buffer event

<comment>See Also:</comment>
   * EventBufferEvent::enable
   * EventBufferEvent::disable


id: EventBufferEvent::getInput
type: function
doc:
<comment>Description:</comment>
  Returns underlying input buffer associated with current buffer
    event
  
  Returns underlying input buffer associated with current buffer event. An input buffer is a storage
  for data to read.
  
  Note, there is also <return>input</return> property of <class>EventBufferEvent</class> class.

<comment>Return:</comment>
  <info>EventBuffer</info>  Returns instance of <class>EventBuffer</class> input buffer associated with current buffer event.

<comment>See Also:</comment>
   * EventBufferEvent::getOutput


id: EventBufferEvent::getOutput
type: function
doc:
<comment>Description:</comment>
  Returns underlying output buffer associated with current buffer
    event
  
  Returns underlying output buffer associated with current buffer event. An output buffer is a
  storage for data to be written.
  
  Note, there is also <return>output</return> property of <class>EventBufferEvent</class> class.

<comment>Return:</comment>
  <info>EventBuffer</info>  Returns instance of <class>EventBuffer</class> output buffer associated with current buffer event.

<comment>See Also:</comment>
   * EventBufferEvent::getInput


id: EventBufferEvent::read
type: function
doc:
<comment>Description:</comment>
  Read buffer's data
  
  Removes up to <strong>$size</strong> bytes from the input buffer. Returns a string of data read from the input
  buffer.

<comment>Param:</comment>
  <info>int</info>  <strong>$size</strong>  Maximum number of bytes to read

<comment>Return:</comment>
  <info>string</info>  Returns string of data read from the input buffer.

<comment>See Also:</comment>
   * EventBufferEvent::readBuffer


id: EventBufferEvent::readBuffer
type: function
doc:
<comment>Description:</comment>
  Drains the entire contents of the input buffer and places them into buf
  
  Drains the entire contents of the input buffer and places them into <strong>$buf</strong> .

<comment>Param:</comment>
  <info>EventBuffer</info>  <strong>$buf</strong>  Target buffer

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::read


id: EventBufferEvent::setCallbacks
type: function
doc:
<comment>Description:</comment>
  Assigns read, write and event(status) callbacks
  
  Assigns read, write and event(status) callbacks.

<comment>Param:</comment>
  <info>callable</info>  <strong>$readcb</strong>   Read event callback. See About buffer event callbacks .
  <info>callable</info>  <strong>$writecb</strong>  Write event callback. See About buffer event callbacks .
  <info>callable</info>  <strong>$eventcb</strong>  Status-change event callback. See About buffer event callbacks .
  <info>mixed</info>     <strong>$arg</strong>      A variable that will be passed to all the callbacks.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventBufferEvent::__construct


id: EventBufferEvent::setPriority
type: function
doc:
<comment>Description:</comment>
  Assign a priority to a bufferevent
  
  Assign a priority to a bufferevent
  
  Only supported for socket buffer events

<comment>Param:</comment>
  <info>int</info>  <strong>$priority</strong>  Priority value.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventBufferEvent::setTimeouts
type: function
doc:
<comment>Description:</comment>
  Set the read and write timeout for a buffer event
  
  Set the read and write timeout for a buffer event

<comment>Param:</comment>
  <info>float</info>  <strong>$timeout_read</strong>   Read timeout
  <info>float</info>  <strong>$timeout_write</strong>  Write timeout

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventBufferEvent::setWatermark
type: function
doc:
<comment>Description:</comment>
  Adjusts read and/or write watermarks
  
  Adjusts the read watermarks, the write watermarks , or both, of a single buffer event.
  
  A buffer event watermark is an edge, a value specifying number of bytes to be read or written
  before callback is invoked. By default every read/write event triggers a callback invokation. See
  Fast portable non-blocking network programming with Libevent: Callbacks and watermarks

<comment>Param:</comment>
  <info>int</info>  <strong>$events</strong>    Bitmask of <info>Event::READ</info> , <info>Event::WRITE</info> , or both.
  <info>int</info>  <strong>$lowmark</strong>   Minimum watermark value.
  <info>int</info>  <strong>$highmark</strong>  Maximum watermark value. <info>0</info> means "unlimited".

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventBufferEvent::sslError
type: function
doc:
<comment>Description:</comment>
  Returns most recent OpenSSL error reported on the buffer event
  
  Returns most recent OpenSSL error reported on the buffer event.
  
  This function is available only if <return>Event</return> is compiled with OpenSSL support.

<comment>Return:</comment>
  <info>string</info>  Returns OpenSSL error string reported on the buffer event, or <info>false</info>, if there is no more
          error to return.

<comment>See Also:</comment>
   * EventBufferEvent::sslRenegotiate


id: EventBufferEvent::sslFilter
type: function
doc:
<comment>Description:</comment>
  Create a new SSL buffer event to send its data over another buffer event
  
  Create a new SSL buffer event to send its data over another buffer event
  
  This function is available only if <return>Event</return> is compiled with OpenSSL support.

<comment>Param:</comment>
  <info>EventBase</info>         <strong>$base</strong>        Associated event base.
  <info>EventBufferEvent</info>  <strong>$underlying</strong>  A socket buffer event to use for this SSL.
  <info>EventSslContext</info>   <strong>$ctx</strong>         Object of <class>EventSslContext</class> class.
  <info>int</info>               <strong>$state</strong>       The current state of SSL connection: <info>EventBufferEvent::SSL_OPEN</info> ,
                                 <info>EventBufferEvent::SSL_ACCEPTING</info> or <info>EventBufferEvent::SSL_CONNECTING</info>
                                 .
  <info>int</info>               <strong>$options</strong>     One or more buffer event options.

<comment>Return:</comment>
  <info>EventBufferEvent</info>  Returns a new SSL <class>EventBufferEvent</class> object.

<comment>See Also:</comment>
   * EventBufferEvent::sslSocket


id: EventBufferEvent::sslGetCipherInfo
type: function
doc:
<comment>Description:</comment>
  Returns a textual description of the cipher
  
  Retrieves description of the current cipher by means of the <return>SSL_CIPHER_description</return> SSL API
  function (see SSL_CIPHER_get_name(3) man page).
  
  This function is available only if <return>Event</return> is compiled with OpenSSL support.

<comment>Return:</comment>
  <info>string</info>  Returns a textual description of the cipher on success, or <info>false</info> on error.


id: EventBufferEvent::sslGetCipherName
type: function
doc:
<comment>Description:</comment>
  Returns the current cipher name of the SSL connection
  
  Retrieves name of cipher used by current SSL connection.
  
  This function is available only if <return>Event</return> is compiled with OpenSSL support.

<comment>Return:</comment>
  <info>string</info>  Returns the current cipher name of the SSL connection, or <info>false</info> on error.


id: EventBufferEvent::sslGetCipherVersion
type: function
doc:
<comment>Description:</comment>
  Returns version of cipher used by current SSL connection
  
  Retrieves version of cipher used by current SSL connection.
  
  This function is available only if <return>Event</return> is compiled with OpenSSL support.

<comment>Return:</comment>
  <info>string</info>  Returns the current cipher version of the SSL connection, or <info>false</info> on error.


id: EventBufferEvent::sslGetProtocol
type: function
doc:
<comment>Description:</comment>
  Returns the name of the protocol used for current SSL connection
  
  Returns the name of the protocol used for current SSL connection.
  
  This function is available only if <return>Event</return> is compiled with OpenSSL support.

<comment>Return:</comment>
  <info>string</info>  Returns the name of the protocol used for current SSL connection.


id: EventBufferEvent::sslRenegotiate
type: function
doc:
<comment>Description:</comment>
  Tells a bufferevent to begin SSL renegotiation
  
  Tells a bufferevent to begin SSL renegotiation.
  
  Calling this function tells the SSL to renegotiate, and the buffer event to invoke appropriate
  callbacks. This is an advanced topic; this should be generally avoided unless one really knows
  what he/she does, especially since many SSL versions have had known security issues related to
  renegotiation.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventBufferEvent::sslSocket
type: function
doc:
<comment>Description:</comment>
  Creates a new SSL buffer event to send its data over an SSL on a socket
  
  Creates a new SSL buffer event to send its data over an SSL on a socket.

<comment>Param:</comment>
  <info>EventBase</info>        <strong>$base</strong>     Associated event base.
  <info>mixed</info>            <strong>$socket</strong>   Socket to use for this SSL. Can be stream or socket resource, numeric
                             file descriptor, or <info>null</info>. If <strong>$socket</strong> is <info>null</info>, it is assumed that the
                             file descriptor for the socket will be assigned later, for instance, by
                             means of EventBufferEvent::connectHost method.
  <info>EventSslContext</info>  <strong>$ctx</strong>      Object of <class>EventSslContext</class> class.
  <info>int</info>              <strong>$state</strong>    The current state of SSL connection: <info>EventBufferEvent::SSL_OPEN</info> ,
                             <info>EventBufferEvent::SSL_ACCEPTING</info> or <info>EventBufferEvent::SSL_CONNECTING</info> .
  <info>int</info>              <strong>$options</strong>  The buffer event options.

<comment>Return:</comment>
  <info>EventBufferEvent</info>  Returns <class>EventBufferEvent</class> object.

<comment>See Also:</comment>
   * EventBufferEvent::sslFilter


id: EventBufferEvent::write
type: function
doc:
<comment>Description:</comment>
  Adds data to a buffer event's output buffer
  
  Adds <strong>$data</strong> to a buffer event's output buffer

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Data to be added to the underlying buffer.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::writeBuffer


id: EventBufferEvent::writeBuffer
type: function
doc:
<comment>Description:</comment>
  Adds contents of the entire buffer to a buffer event's output
    buffer
  
  Adds contents of the entire buffer to a buffer event's output buffer

<comment>Param:</comment>
  <info>EventBuffer</info>  <strong>$buf</strong>  Source <class>EventBuffer</class> object.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBufferEvent::write


id: EventConfig
type: class
doc:
<comment>Description:</comment>
  Represents configuration structure which could be used in construction of the <class>EventBase</class> .


id: EventConfig::FEATURE_FDS
type: constant
doc:
<comment>Description:</comment>
  Requires a backend method that can support arbitrary file descriptor types, and not just sockets.


id: EventConfig::FEATURE_O1
type: constant
doc:
<comment>Description:</comment>
  Requires a backend method where adding or deleting a single event, or having a single event become
  active, is an O(1) operation.


id: EventConfig::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventConfig object
  
  Constructs EventConfig object which could be passed to EventBase::__construct constructor.

<comment>Return:</comment>
  <info>unknown</info>  Returns <class>EventConfig</class> object.

<comment>See Also:</comment>
   * EventBase::__construct


id: EventConfig::avoidMethod
type: function
doc:
<comment>Description:</comment>
  Tells libevent to avoid specific event method
  
  Tells libevent to avoid specific event method(backend). See Creating an event base .

<comment>Param:</comment>
  <info>string</info>  <strong>$method</strong>  The backend method to avoid. See EventConfig constants .

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::__construct


id: EventConfig::requireFeatures
type: function
doc:
<comment>Description:</comment>
  Enters a required event method feature that the application demands
  
  Enters a required event method feature that the application demands

<comment>Param:</comment>
  <info>int</info>  <strong>$feature</strong>  Bitmask of required features. See <return>EventConfig::FEATURE_*</return> constants

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::getFeatures


id: EventConfig::setFlags
type: function
doc:
<comment>Description:</comment>
  Sets one or more flags to configure the eventual EventBase will be initialized
  
  Sets one or more flags to configure what parts of  the eventual EventBase will be initialized, and
  how they'll work.

<comment>Param:</comment>
  <info>int</info>  <strong>$flags</strong>  One of <return>EventBase::LOOP_*</return> constants.  See EventBase constants.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventBase::getFeatures


id: EventConfig::setMaxDispatchInterval
type: function
doc:
<comment>Description:</comment>
  Prevents priority inversion
  
  Prevents priority inversion by limiting how many low-priority event callbacks can be invoked
  before checking for more high-priority events.
  
  Available since <return>libevent 2.1.0-alpha</return> .

<comment>Param:</comment>
  <info>int</info>  <strong>$max_interval</strong>   An interval after which Libevent should stop running callbacks and check for
                       more events, or <info>0</info> , if there should be no such interval.
  <info>int</info>  <strong>$max_callbacks</strong>  A number of callbacks after which Libevent should stop running callbacks and
                       check for more events, or <info>-1</info> , if there should be no such limit.
  <info>int</info>  <strong>$min_priority</strong>   A priority below which <strong>$max_interval</strong> and <strong>$max_callbacks</strong> should not be
                       enforced. If this is set to <info>0</info> , they are enforced for events of every
                       priority; if it's set to <info>1</info> , they're enforced for events of priority <info>1</info> and
                       above, and so on.

<comment>Return:</comment>
  <info>void</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventDnsBase
type: class
doc:
<comment>Description:</comment>
  Represents Libevent's DNS base structure. Used to resolve DNS asyncronously, parse configuration
  files like resolv.conf etc.


id: EventDnsBase::OPTIONS_ALL
type: constant
doc:
<comment>Description:</comment>
  Tells to learn as much as it can from the <return>resolv.conf</return> file.


id: EventDnsBase::OPTION_HOSTSFILE
type: constant
doc:
<comment>Description:</comment>
  Tells to read a list of hosts from <return>/etc/hosts</return> as part of loading the <return>resolv.conf</return> file.


id: EventDnsBase::OPTION_NAMESERVERS
type: constant
doc:
<comment>Description:</comment>
  Tells to learn the nameservers from the <return>resolv.conf</return> file.


id: EventDnsBase::OPTION_SEARCH
type: constant
doc:
<comment>Description:</comment>
  Tells to read the domain and search fields from the <return>resolv.conf</return> file and the <return>ndots</return> option, and use
  them to decide which domains(if any) to search for hostnames that aren’t fully-qualified.


id: EventDnsBase::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventDnsBase object
  
  Constructs EventDnsBase object.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>        Event base.
  <info>bool</info>       <strong>$initialize</strong>  If the <strong>$initialize</strong> argument is <info>true</info>, it tries to configure the DNS base
                          sensibly given your operating system’s default. Otherwise, it leaves the
                          event DNS base empty, with no nameservers or options configured. In the
                          latter case DNS base should be configured manually, e.g. with
                          EventDnsBase::parseResolvConf .

<comment>Return:</comment>
  <info>unknown</info>  Returns EventDnsBase object.


id: EventDnsBase::addNameserverIp
type: function
doc:
<comment>Description:</comment>
  Adds a nameserver to the DNS base
  
  Adds a nameserver to the evdns_base.

<comment>Param:</comment>
  <info>string</info>  <strong>$ip</strong>  The nameserver string, either as an IPv4 address, an IPv6 address, an IPv4 address
               with a port ( <return>IPv4:Port</return> ), or an IPv6 address with a port ( <return>[IPv6]:Port</return> ).

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventDnsBase::addSearch
type: function
doc:
<comment>Description:</comment>
  Adds a domain to the list of search domains
  
  Adds a domain to the list of search domains

<comment>Param:</comment>
  <info>string</info>  <strong>$domain</strong>  Search domain.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventDnsBase::clearSearch
type: function
doc:
<comment>Description:</comment>
  Removes all current search suffixes
  
  Removes all current search suffixes from the DNS base; the EventDnsBase::addSearch function adds a
  suffix.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventDnsBase::addSearch


id: EventDnsBase::countNameservers
type: function
doc:
<comment>Description:</comment>
  Gets the number of configured nameservers
  
  Gets the number of configured nameservers

<comment>Return:</comment>
  <info>int</info>  Returns the number of configured nameservers(not necessarily the number of running
       nameservers). This is useful for double-checking whether our calls to the various nameserver
       configuration functions have been successful.


id: EventDnsBase::loadHosts
type: function
doc:
<comment>Description:</comment>
  Loads a hosts file (in the same format as /etc/hosts) from hosts file
  
  Loads a hosts file (in the same format as <return>/etc/hosts</return> ) from hosts file.

<comment>Param:</comment>
  <info>string</info>  <strong>$hosts</strong>  Path to the hosts' file.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventDnsBase::parseResolvConf
type: function
doc:
<comment>Description:</comment>
  Scans the resolv.conf-formatted file
  
  Scans the resolv.conf-formatted file stored in filename, and read in all the options from it that
  are listed in flags

<comment>Param:</comment>
  <info>int</info>     <strong>$flags</strong>     Determines what information is parsed from the <return>resolv.conf</return> file. See the man
                     page for <return>resolv.conf</return> for the format of this file.
                     
                     The following directives are not parsed from the file: <return>sortlist, rotate,
                     no-check-names, inet6, debug</return> .
                     
                     If this function encounters an error, the possible return values are: <info>1</info> =
                     failed to open file<info>2</info> = failed to stat file<info>3</info> = file too large<info>4</info> = out of memory<info>5</info>
                     = short read from file<info>6</info> = no nameservers listed in the file
  <info>string</info>  <strong>$filename</strong>  Path to <return>resolv.conf</return> file.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventDnsBase::setOption
type: function
doc:
<comment>Description:</comment>
  Set the value of a configuration option
  
  Set the value of a configuration option.

<comment>Param:</comment>
  <info>string</info>  <strong>$option</strong>  The currently available configuration options are: <return>"ndots"</return> , <return>"timeout"</return> ,
                   <return>"max-timeouts"</return> , <return>"max-inflight"</return> , and <return>"attempts"</return> .
  <info>string</info>  <strong>$value</strong>   Option value.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventDnsBase::setSearchNdots
type: function
doc:
<comment>Description:</comment>
  Set the 'ndots' parameter for searches
  
  Set the <info>'ndots'</info> parameter for searches. Sets the number of dots which, when found in a name,
  causes the first query to be without any search domain.

<comment>Param:</comment>
  <info>int</info>  <strong>$ndots</strong>  The number of dots.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventHttp::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventHttp object(the HTTP server)
  
  Constructs the HTTP server object.

<comment>Param:</comment>
  <info>EventBase</info>        <strong>$base</strong>  Associated event base.
  <info>EventSslContext</info>  <strong>$ctx</strong>   <class>EventSslContext</class> class object. Turns plain HTTP server into HTTPS server.
                          It means that if <strong>$ctx</strong> is configured correctly, then the underlying buffer
                          events will be based on OpenSSL sockets. Thus, all traffic will pass
                          through the SSL or TLS.
                          
                          This parameter is available only if <return>Event</return> is compiled with OpenSSL support
                          and only with <return>Libevent 2.1.0-alpha</return> and higher.

<comment>Return:</comment>
  <info>unknown</info>  Returns <class>EventHttp</class> object.


id: EventHttp::accept
type: function
doc:
<comment>Description:</comment>
  Makes an HTTP server accept connections on the specified socket stream or resource
  
  Makes an HTTP server accept connections on the specified socket stream or resource. The socket
  should be ready to accept connections.
  
  Can be called multiple times to accept connections on different sockets.
  
  To bind a socket, <return>listen</return> , and <return> accept</return> connections on the socket in s single call use
  EventHttp::bind . EventHttp::accept is needed only if one already has a socket ready to accept
  connections.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$socket</strong>  Socket resource, stream or numeric file descriptor representing a socket ready to
                  accept connections.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttp::bind


id: EventHttp::addServerAlias
type: function
doc:
<comment>Description:</comment>
  Adds a server alias to the HTTP server object
  
  Adds a server alias to the HTTP server object.

<comment>Param:</comment>
  <info>string</info>  <strong>$alias</strong>  The alias to add.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttp::removeServerAlias


id: EventHttp::bind
type: function
doc:
<comment>Description:</comment>
  Binds an HTTP server on the specified address and port
  
  Binds an HTTP server on the specified address and port.
  
  Can be called multiple times to bind the same HTTP server to multiple different ports.

<comment>Param:</comment>
  <info>string</info>  <strong>$address</strong>  A string containing the IP address to <return>listen(2)</return> on.
  <info>int</info>     <strong>$port</strong>     The port number to listen on.

<comment>Return:</comment>
  <info>void</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttp::accept


id: EventHttp::removeServerAlias
type: function
doc:
<comment>Description:</comment>
  Removes server alias
  
  Removes server alias added with EventHttp::addServerAlias

<comment>Param:</comment>
  <info>string</info>  <strong>$alias</strong>  The alias to remove.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttp::addServerAlias


id: EventHttp::setAllowedMethods
type: function
doc:
<comment>Description:</comment>
  Sets the what HTTP methods are supported in requests accepted by this server, and passed to user
  callbacks
  
  Sets the what HTTP methods are supported in requests accepted by this server, and passed to user
  callbacks
  
  If not supported they will generate a <return>"405 Method not allowed"</return> response.
  
  By default this includes the following methods: <return>GET</return> , <return>POST</return> , <return>HEAD</return> , <return>PUT</return> , <return>DELETE</return> . See
  <return>EventHttpRequest::CMD_*</return> constants.

<comment>Param:</comment>
  <info>int</info>  <strong>$methods</strong>  A bit mask of <return>EventHttpRequest::CMD_*</return> constants .

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttp::setCallback
type: function
doc:
<comment>Description:</comment>
  Sets a callback for specified URI
  
  Sets a callback for specified URI.

<comment>Param:</comment>
  <info>string</info>            <strong>$path</strong>  The path for which to invoke the callback.
  <info>string</info>            <strong>$cb</strong>    The callback <info>callable</info> that gets invoked on requested <strong>$path</strong> . It should
                           match the following prototype:
                           
                           <strong>$req</strong><class>EventHttpRequest</class> object. <strong>$arg</strong> Custom data. 
                           
                           <class>EventHttpRequest</class> object.
                           
                           Custom data.
  <info>EventHttpRequest</info>  <strong>$req</strong>   <class>EventHttpRequest</class> object.
  <info>string</info>            <strong>$arg</strong>   Custom data.
  <info>string</info>            <strong>$arg</strong>   Custom data.

<comment>Return:</comment>
  <info>void</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttp::setDefaultCallback


id: EventHttp::setDefaultCallback
type: function
doc:
<comment>Description:</comment>
  Sets default callback to handle requests that are not caught by specific callbacks
  
  Sets default callback to handle requests that are not caught by specific callbacks

<comment>Param:</comment>
  <info>string</info>            <strong>$cb</strong>   The callback <info>callable</info> . It should match the following prototype:
                          
                          <strong>$req</strong><class>EventHttpRequest</class> object. <strong>$arg</strong> Custom data. 
                          
                          <class>EventHttpRequest</class> object.
                          
                          Custom data.
  <info>EventHttpRequest</info>  <strong>$req</strong>  <class>EventHttpRequest</class> object.
  <info>string</info>            <strong>$arg</strong>  Custom data.
  <info>string</info>            <strong>$arg</strong>  User custom data passed to the callback.

<comment>Return:</comment>
  <info>void</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttp::setCallback


id: EventHttp::setMaxBodySize
type: function
doc:
<comment>Description:</comment>
  Sets maximum request body size
  
  Sets maximum request body size.

<comment>Param:</comment>
  <info>int</info>  <strong>$value</strong>  The body size in bytes.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttp::setMaxHeadersSize


id: EventHttp::setMaxHeadersSize
type: function
doc:
<comment>Description:</comment>
  Sets maximum HTTP header size
  
  Sets maximum HTTP header size.

<comment>Param:</comment>
  <info>int</info>  <strong>$value</strong>  The header size in bytes.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttp::setMaxHeadersSize


id: EventHttp::setTimeout
type: function
doc:
<comment>Description:</comment>
  Sets the timeout for an HTTP request
  
  Sets the timeout for an HTTP request.

<comment>Param:</comment>
  <info>int</info>  <strong>$value</strong>  The timeout in seconds.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpConnection::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventHttpConnection object
  
  Constructs EventHttpConnection object.

<comment>Param:</comment>
  <info>EventBase</info>        <strong>$base</strong>      Associated event base.
  <info>EventDnsBase</info>     <strong>$dns_base</strong>  If <strong>$dns_base</strong> is <info>null</info>, hostname resolution will block.
  <info>string</info>           <strong>$address</strong>   The address to connect to.
  <info>int</info>              <strong>$port</strong>      The port to connect to.
  <info>EventSslContext</info>  <strong>$ctx</strong>       <class>EventSslContext</class> class object. Enables OpenSSL.
                              
                              This parameter is available only if <return>Event</return> is compiled with OpenSSL
                              support and only with <return>Libevent 2.1.0-alpha</return> and higher.

<comment>Return:</comment>
  <info>unknown</info>  Returns <class>EventHttpConnection</class> object.


id: EventHttpConnection::getBase
type: function
doc:
<comment>Description:</comment>
  Returns event base associated with the connection
  
  Returns event base associated with the connection.

<comment>Return:</comment>
  <info>EventBase</info>  On success returns <class>EventBase</class> object associated with the connection. Otherwise <info>false</info>.


id: EventHttpConnection::getPeer
type: function
doc:
<comment>Description:</comment>
  Gets the remote address and port associated with the connection
  
  Gets the remote address and port associated with the connection

<comment>Param:</comment>
  <info>string</info>  <strong>$address</strong>  Address of the peer.
  <info>int</info>     <strong>$port</strong>     Port of the peer.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpConnection::makeRequest
type: function
doc:
<comment>Description:</comment>
  Makes an HTTP request over the specified connection
  
  Makes an HTTP request over the specified connection. <strong>$type</strong> is one of <return>EventHttpRequest::CMD_*</return>
  constants.

<comment>Param:</comment>
  <info>EventHttpRequest</info>  <strong>$req</strong>   The connection object over which to send the request.
  <info>int</info>               <strong>$type</strong>  One of <return>EventHttpRequest::CMD_*</return> constants .
  <info>string</info>            <strong>$uri</strong>   The URI associated with the request.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttpRequest::addHeader


id: EventHttpConnection::setCloseCallback
type: function
doc:
<comment>Description:</comment>
  Set callback for connection close
  
  Sets callback for connection close.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  Callback which is called when connection is closed. Should match the
                       following prototype:

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpConnection::setLocalAddress
type: function
doc:
<comment>Description:</comment>
  Sets the IP address from which HTTP connections are made
  
  Sets the IP address from which http connections are made.

<comment>Param:</comment>
  <info>string</info>  <strong>$address</strong>  The IP address from which HTTP connections are made.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpConnection::setLocalPort


id: EventHttpConnection::setLocalPort
type: function
doc:
<comment>Description:</comment>
  Sets the local port from which connections are made
  
  Sets the local port from which connections are made.

<comment>Param:</comment>
  <info>int</info>  <strong>$port</strong>  The port number.

<comment>Return:</comment>
  <info>void</info>  

<comment>See Also:</comment>
   * EventHttpConnection::setLocalAddress


id: EventHttpConnection::setMaxBodySize
type: function
doc:
<comment>Description:</comment>
  Sets maximum body size for the connection
  
  Sets maximum body size for the connection.

<comment>Param:</comment>
  <info>string</info>  <strong>$max_size</strong>  The maximum body size in bytes.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpConnection::setMaxHeadersSize


id: EventHttpConnection::setMaxHeadersSize
type: function
doc:
<comment>Description:</comment>
  Sets maximum header size
  
  Sets maximum header size for the connection.

<comment>Param:</comment>
  <info>string</info>  <strong>$max_size</strong>  The maximum header size in bytes.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpConnection::setMaxBodySize


id: EventHttpConnection::setRetries
type: function
doc:
<comment>Description:</comment>
  Sets the retry limit for the connection
  
  Sets the retry limit for the connection

<comment>Param:</comment>
  <info>int</info>  <strong>$retries</strong>  The retry limit. <info>-1</info> means infinity.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpConnection::setTimeout
type: function
doc:
<comment>Description:</comment>
  Sets the timeout for the connection
  
  Sets the timeout for the connection

<comment>Param:</comment>
  <info>int</info>  <strong>$timeout</strong>  Timeout in seconds.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpRequest::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs EventHttpRequest object
  
  Constructs EventHttpRequest object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  Gets invoked on requesting path. Should match the following prototype:
  <info>mixed</info>     <strong>$data</strong>      User custom data passed to the callback.

<comment>Return:</comment>
  <info>unknown</info>  Returns EventHttpRequest object.

<comment>See Also:</comment>
   * EventHttpRequest::cancel
   * EventHttpRequest::addHeader


id: EventHttpRequest::addHeader
type: function
doc:
<comment>Description:</comment>
  Adds an HTTP header to the headers of the request
  
  Adds an HTTP header to the headers of the request.

<comment>Param:</comment>
  <info>string</info>  <strong>$key</strong>    Header name.
  <info>string</info>  <strong>$value</strong>  Header value.
  <info>int</info>     <strong>$type</strong>   One of <return>EventHttpRequest::*_HEADER</return> constants .

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventHttpRequest::removeHeader


id: EventHttpRequest::cancel
type: function
doc:
<comment>Description:</comment>
  Cancels a pending HTTP request
  
  Cancels a pending HTTP request.
  
  Cancels an ongoing HTTP request. The callback associated with this request is not executed and the
  request object is freed. If the request is currently being processed, e.g. it is ongoing, the
  corresponding <class>EventHttpConnection</class> object is going to get reset.
  
  A request cannot be canceled if its callback has executed already. A request may be canceled
  reentrantly from its chunked callback.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpRequest::clearHeaders
type: function
doc:
<comment>Description:</comment>
  Removes all output headers from the header list of the request
  
  Removes all output headers from the header list of the request.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpRequest::addHeader


id: EventHttpRequest::closeConnection
type: function
doc:
<comment>Description:</comment>
  Closes associated HTTP connection
  
  Closes HTTP connection associated with the request.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpRequest::findHeader
type: function
doc:
<comment>Description:</comment>
  Finds the value belonging a header
  
  Finds the value belonging a header.

<comment>Param:</comment>
  <info>string</info>  <strong>$key</strong>   The header name.
  <info>string</info>  <strong>$type</strong>  One of <return>EventHttpRequest::*_HEADER</return> constants .

<comment>Return:</comment>
  <info>void</info>  Returns <info>null</info> if header not found.

<comment>See Also:</comment>
   * EventHttpRequest::addHeader


id: EventHttpRequest::free
type: function
doc:
<comment>Description:</comment>
  Frees the object and removes associated events
  
  Frees the object and removes associated events.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventHttpRequest::getBufferEvent
type: function
doc:
<comment>Description:</comment>
  Returns EventBufferEvent object
  
  Returns <class>EventBufferEvent</class> object which represents buffer event that the connection is using.
  
  The reference counter of the returned object will be incremented by one to protect internal
  structures against premature destruction when the method is called from a user callback. So the
  <class>EventBufferEvent</class> object should be freed explicitly with EventBufferEvent::free method. Otherwise
  memory will leak.

<comment>Return:</comment>
  <info>EventBufferEvent</info>  Returns <class>EventBufferEvent</class> object.

<comment>See Also:</comment>
   * EventHttpRequest::getConnection


id: EventHttpRequest::getCommand
type: function
doc:
<comment>Description:</comment>
  Returns the request command(method)
  
  Returns the request command, one of <return>EventHttpRequest::CMD_*</return> constants.

<comment>Return:</comment>
  <info>void</info>  Returns the request command, one of <return>EventHttpRequest::CMD_*</return> constants.


id: EventHttpRequest::getConnection
type: function
doc:
<comment>Description:</comment>
  Returns EventHttpConnection object
  
  Returns <class>EventHttpConnection</class> object which represents HTTP connection associated with the request.
  
  Libevent API allows HTTP request objects to be not bound to any HTTP connection. Therefore we
  can't unambiguously associate <class>EventHttpRequest</class> with <class>EventHttpConnection</class> . Thus, we construct
  <class>EventHttpConnection</class> object on-the-fly. Having no information about the event base, DNS base and
  connection-close callback, we just leave these fields unset.
  
  EventHttpRequest::getConnection method is usually useful when we need to set up a callback on
  connection close. See EventHttpConnection::setCloseCallback .

<comment>Return:</comment>
  <info>EventHttpConnection</info>  Returns <class>EventHttpConnection</class> object.

<comment>See Also:</comment>
   * EventHttpConnection::setCloseCallback
   * EventHttpRequest::getBufferEvent


id: EventHttpRequest::getHost
type: function
doc:
<comment>Description:</comment>
  Returns the request host
  
  Returns the request host.

<comment>Return:</comment>
  <info>string</info>  Returns the request host.

<comment>See Also:</comment>
   * EventHttpRequest::getUri
   * EventHttpRequest::getCommand


id: EventHttpRequest::getInputBuffer
type: function
doc:
<comment>Description:</comment>
  Returns the input buffer
  
  Returns the input buffer.

<comment>Return:</comment>
  <info>EventBuffer</info>  Returns the input buffer.

<comment>See Also:</comment>
   * EventHttpRequest::getOutputBuffer


id: EventHttpRequest::getInputHeaders
type: function
doc:
<comment>Description:</comment>
  Returns associative array of the input headers
  
  Returns associative array of the input headers.

<comment>Return:</comment>
  <info>array</info>  Returns associative array of the input headers.

<comment>See Also:</comment>
   * EventHttpRequest::getOutputHeaders


id: EventHttpRequest::getOutputBuffer
type: function
doc:
<comment>Description:</comment>
  Returns the output buffer of the request
  
  Returns the output buffer of the request.

<comment>Return:</comment>
  <info>EventBuffer</info>  Returns the output buffer of the request.

<comment>See Also:</comment>
   * EventHttpRequest::getInputBuffer


id: EventHttpRequest::getOutputHeaders
type: function
doc:
<comment>Description:</comment>
  Returns associative array of the output headers
  
  Returns associative array of the output headers.

<comment>Return:</comment>
  <info>void</info>  

<comment>See Also:</comment>
   * EventHttpRequest::getInputHeaders


id: EventHttpRequest::getResponseCode
type: function
doc:
<comment>Description:</comment>
  Returns the response code
  
  Returns the response code.

<comment>Return:</comment>
  <info>int</info>  Returns the response code of the request.

<comment>See Also:</comment>
   * EventHttpRequest::getCommand
   * EventHttpRequest::getHost
   * EventHttpRequest::getUri


id: EventHttpRequest::getUri
type: function
doc:
<comment>Description:</comment>
  Returns the request URI
  
  Returns the request URI

<comment>Return:</comment>
  <info>string</info>  Returns the request URI

<comment>See Also:</comment>
   * EventHttpRequest::getCommand
   * EventHttpRequest::getHost
   * EventHttpRequest::getResponseCode


id: EventHttpRequest::removeHeader
type: function
doc:
<comment>Description:</comment>
  Removes an HTTP header from the headers of the request
  
  Removes an HTTP header from the headers of the request.

<comment>Param:</comment>
  <info>string</info>  <strong>$key</strong>   The header name.
  <info>string</info>  <strong>$type</strong>  <strong>$type</strong> is one of <return>EventHttpRequest::*_HEADER</return> constants.

<comment>Return:</comment>
  <info>void</info>  Removes an HTTP header from the headers of the request.

<comment>See Also:</comment>
   * EventHttpRequest::addHeader


id: EventHttpRequest::sendError
type: function
doc:
<comment>Description:</comment>
  Send an HTML error message to the client
  
  Send an HTML error message to the client.

<comment>Param:</comment>
  <info>int</info>     <strong>$error</strong>   The HTTP error code.
  <info>string</info>  <strong>$reason</strong>  A brief explanation ofthe error. If <info>null</info>, the standard meaning of the error code
                   will be used.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpRequest::sendReply


id: EventHttpRequest::sendReply
type: function
doc:
<comment>Description:</comment>
  Send an HTML reply to the client
  
  Send an HTML reply to the client. The body of the reply consists of data in optional <strong>$buf</strong>
  parameter.

<comment>Param:</comment>
  <info>int</info>          <strong>$code</strong>    The HTTP response code to send.
  <info>string</info>       <strong>$reason</strong>  A brief message to send with the response code.
  <info>EventBuffer</info>  <strong>$buf</strong>     The body of the response.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpRequest::sendError
   * EventHttpRequest::sendReplyChunk


id: EventHttpRequest::sendReplyChunk
type: function
doc:
<comment>Description:</comment>
  Send another data chunk as part of an ongoing chunked reply
  
  Send another data chunk as part of an ongoing chunked reply. After calling this method <strong>$buf</strong> will
  be empty.

<comment>Param:</comment>
  <info>EventBuffer</info>  <strong>$buf</strong>  The data chunk to send as part of the reply.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpRequest::sendReplyStart
   * EventHttpRequest::sendReplyEnd


id: EventHttpRequest::sendReplyEnd
type: function
doc:
<comment>Description:</comment>
  Complete a chunked reply, freeing the request as appropriate
  
  Complete a chunked reply, freeing the request as appropriate.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpRequest::sendReplyStart
   * EventHttpRequest::sendReplyChunk


id: EventHttpRequest::sendReplyStart
type: function
doc:
<comment>Description:</comment>
  Initiate a chunked reply
  
  Initiate a reply that uses <return>Transfer-Encoding</return> <return>chunked</return> .
  
  This allows the caller to stream the reply back to the client and is useful when either not all of
  the reply data is immediately available or when sending very large replies.
  
  The caller needs to supply data chunks with EventHttpRequest::sendReplyChunk and complete the
  reply by calling EventHttpRequest::sendReplyEnd .

<comment>Param:</comment>
  <info>int</info>     <strong>$code</strong>    The HTTP response code to send.
  <info>string</info>  <strong>$reason</strong>  A brief message to send with the response code.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * EventHttpRequest::sendReplyChunk
   * EventHttpRequest::sendReplyEnd


id: EventListener::OPT_CLOSE_ON_EXEC
type: constant
doc:
<comment>Description:</comment>
  If this option is set, the connection listener sets the close-on-exec flag on the underlying
  listener socket. See platform documentation for <return>fcntl</return> and <info>FD_CLOEXEC</info> for more information.


id: EventListener::OPT_CLOSE_ON_FREE
type: constant
doc:
<comment>Description:</comment>
  If this option is set, the connection listener closes its underlying socket when the <class>EventListener</class>
  object is freed.


id: EventListener::OPT_LEAVE_SOCKETS_BLOCKING
type: constant
doc:
<comment>Description:</comment>
  By default Libevent turns underlying file descriptors, or sockets, to non-blocking mode. This flag
  tells Libevent to leave them in blocking mode.


id: EventListener::OPT_REUSEABLE
type: constant
doc:
<comment>Description:</comment>
  By default on some platforms, once a listener socket is closed, no other socket can bind to the
  same port until a while has passed. Setting this option makes Libevent mark the socket as
  reusable, so that once it is closed, another socket can be opened to listen on the same port.


id: EventListener::OPT_THREADSAFE
type: constant
doc:
<comment>Description:</comment>
  Allocate locks for the listener, so that it’s safe to use it from multiple threads.


id: EventListener::__construct
type: function
doc:
<comment>Description:</comment>
  Creates new connection listener associated with an event base
  
  Creates new connection listener associated with an event base.

<comment>Param:</comment>
  <info>EventBase</info>  <strong>$base</strong>     Associated event base.
  <info>callable</info>   <strong>$cb</strong>       A <info>callable</info> that will be invoked when new connection received.
  <info>mixed</info>      <strong>$data</strong>     Custom user data attached to <strong>$cb</strong> .
  <info>int</info>        <strong>$flags</strong>    Bit mask of <return>EventListener::OPT_*</return> constants. See EventListener constants .
  <info>int</info>        <strong>$backlog</strong>  Controls the maximum number of pending connections that the network stack
                       should allow to wait in a not-yet-accepted state at any time; see
                       documentation for your system’s <return>listen</return> function for more details. If <strong>$backlog</strong>
                       is negative, Libevent tries to pick a good value for the <strong>$backlog</strong> ; if it is
                       zero, Event assumes that <return>listen</return> is already called on the socket( <strong>$target</strong> )
  <info>mixed</info>      <strong>$target</strong>   May be string, socket resource, or a stream associated with a socket. In case
                       if <strong>$target</strong> is a string, the string will be parsed as network address. It will
                       be interpreted as a UNIX domain socket path, if prefixed with <return>'unix:'</return> , e.g.
                       <return>'unix:/tmp/my.sock'</return> .

<comment>Return:</comment>
  <info>unknown</info>  Returns <class>EventListener</class> object representing the event connection listener.


id: EventListener::disable
type: function
doc:
<comment>Description:</comment>
  Disables an event connect listener object
  
  Disables an event connect listener object

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventListener::enable


id: EventListener::enable
type: function
doc:
<comment>Description:</comment>
  Enables an event connect listener object
  
  Enables an event connect listener object

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * EventListener::disable


id: EventListener::getBase
type: function
doc:
<comment>Description:</comment>
  Returns event base associated with the event listener
  
  Returns event base associated with the event listener.

<comment>Return:</comment>
  <info>void</info>  Returns event base associated with the event listener.


id: EventListener::getSocketName
type: function
doc:
<comment>Description:</comment>
  Retreives the current address to which the
    listener's socket is bound
  
  Retreives the current address to which the listener's socket is bound.

<comment>Param:</comment>
  <info>string</info>  <strong>$address</strong>  Output parameter. IP-address depending on the socket address family.
  <info>mixed</info>   <strong>$port</strong>     Output parameter. The port the socket is bound to.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventListener::setCallback
type: function
doc:
<comment>Description:</comment>
  The setCallback purpose
  
  Adjust event connect listener's callback and optionally the callback argument.

<comment>Param:</comment>
  <info>callable</info>       <strong>$cb</strong>        The new callback for new connections. Ignored if <info>null</info>.
                            
                            Should match the following prototype:
                            
                            <strong>$listener</strong> The <class>EventListener</class> object. <strong>$fd</strong> The file descriptor or a
                            resource associated with the listener. <strong>$address</strong> Array of two elements:
                            IP address and the server port. <strong>$arg</strong> User custom data attached to the
                            callback.
                            
                            The <class>EventListener</class> object.
                            
                            The file descriptor or a resource associated with the listener.
                            
                            Array of two elements: IP address and the server port.
                            
                            User custom data attached to the callback.
  <info>EventListener</info>  <strong>$listener</strong>  The <class>EventListener</class> object.
  <info>mixed</info>          <strong>$fd</strong>        The file descriptor or a resource associated with the listener.
  <info>array</info>          <strong>$address</strong>   Array of two elements: IP address and the server port.
  <info>mixed</info>          <strong>$arg</strong>       User custom data attached to the callback.
  <info>mixed</info>          <strong>$arg</strong>       Custom user data attached to the callback. Ignored if <info>null</info>.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: EventListener::setErrorCallback
type: function
doc:
<comment>Description:</comment>
  Set event listener's error callback
  
  Set event listener's error callback

<comment>Param:</comment>
  <info>string</info>         <strong>$cb</strong>        The error callback. Should match the following prototype:
                            
                            <strong>$listener</strong> The <class>EventListener</class> object. <strong>$data</strong> User custom data attached to
                            the callback.
                            
                            The <class>EventListener</class> object.
                            
                            User custom data attached to the callback.
  <info>EventListener</info>  <strong>$listener</strong>  The <class>EventListener</class> object.
  <info>mixed</info>          <strong>$data</strong>      User custom data attached to the callback.

<comment>Return:</comment>
  <info>void</info>  

<comment>See Also:</comment>
   * EventListener::setCallback


id: EventSslContext
type: class
doc:
<comment>Description:</comment>
  Represents <return>SSL_CTX</return> structure. Provides methods and properties to configure the SSL context.


id: EventSslContext::OPT_ALLOW_SELF_SIGNED
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents option
  that allows self-signed certificates.


id: EventSslContext::OPT_CA_FILE
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents path of
  the certificate authority file.


id: EventSslContext::OPT_CA_PATH
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents path where
  the certificate authority file should be searched for.


id: EventSslContext::OPT_CIPHERS
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents the cipher
  list for the SSL context.


id: EventSslContext::OPT_LOCAL_CERT
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . The option points to
  path of local certificate.


id: EventSslContext::OPT_LOCAL_PK
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . The option points to
  path of the private key.


id: EventSslContext::OPT_PASSPHRASE
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents passphrase
  of the certificate.


id: EventSslContext::OPT_VERIFY_DEPTH
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents maximum
  depth for the certificate chain verification that shall be allowed for the SSL context.


id: EventSslContext::OPT_VERIFY_PEER
type: constant
doc:
<comment>Description:</comment>
  Key for an item of the options' array used in EventSslContext::__construct . Represents option
  that tells Event to verify peer.


id: EventSslContext::SSLv23_CLIENT_METHOD
type: constant
doc:
<comment>Description:</comment>
  SSLv23 client method. See <return>SSL_CTX_new(3)</return> man page.


id: EventSslContext::SSLv23_SERVER_METHOD
type: constant
doc:
<comment>Description:</comment>
  SSLv23 server method. See <return>SSL_CTX_new(3)</return> man page.


id: EventSslContext::SSLv2_CLIENT_METHOD
type: constant
doc:
<comment>Description:</comment>
  SSLv2 client method. See <return>SSL_CTX_new(3)</return> man page.


id: EventSslContext::SSLv2_SERVER_METHOD
type: constant
doc:
<comment>Description:</comment>
  SSLv2 server method. See <return>SSL_CTX_new(3)</return> man page.


id: EventSslContext::SSLv3_CLIENT_METHOD
type: constant
doc:
<comment>Description:</comment>
  SSLv3 client method. See <return>SSL_CTX_new(3)</return> man page.


id: EventSslContext::SSLv3_SERVER_METHOD
type: constant
doc:
<comment>Description:</comment>
  SSLv3 server method. See <return>SSL_CTX_new(3)</return> man page.


id: EventSslContext::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs an OpenSSL context for use with Event classes
  
  Creates SSL context holding pointer to <return>SSL_CTX</return> (see the system manual).

<comment>Param:</comment>
  <info>string</info>  <strong>$method</strong>   One of <return>EventSslContext::*_METHOD</return> constants .
  <info>string</info>  <strong>$options</strong>  Associative array of SSL context options One of <return>EventSslContext::OPT_*</return> constants
                    .

<comment>Return:</comment>
  <info>unknown</info>  Returns <class>EventSslContext</class> object.


id: EventUtil
type: class
doc:
<comment>Description:</comment>
  <class>EventUtil</class> is a singleton with supplimentary methods and constants.


id: EventUtil::IPPROTO_IP
type: constant
doc:
<comment>Description:</comment>
  See the <return>socket(7)</return> manual page. (Added in event-1.6.0.)


id: EventUtil::LIBEVENT_VERSION_NUMBER
type: constant
doc:
<comment>Description:</comment>
  Libevent' version number at the time when Event extension had been compiled with the library.


id: EventUtil::SOL_SOCKET
type: constant
doc:
<comment>Description:</comment>
  Socket option level. See the <return>socket(7)</return> manual page. (Added in event-1.6.0.)


id: EventUtil::SO_BROADCAST
type: constant
doc:
<comment>Description:</comment>
  Socket option. Reports whether transmission of broadcast messages is supported. See the <return>socket(7)</return>
  manual page. (Added in event-1.6.0.)


id: EventUtil::SO_DEBUG
type: constant
doc:
<comment>Description:</comment>
  Socket option. Enable socket debugging. Only allowed for processes with the <return>CAP_NET_ADMIN</return>
  capability or an effective user ID of <info>0</info> . (Added in event-1.6.0.)


id: EventUtil::SO_DONTROUTE
type: constant
doc:
<comment>Description:</comment>
  Socket option. See the <return>socket(7)</return> manual page. (Added in event-1.6.0.)


id: EventUtil::SO_KEEPALIVE
type: constant
doc:
<comment>Description:</comment>
  Socket option. Enable sending of keep-alive messages on connection-oriented sockets. Expects an
  integer boolean flag. See the <return>socket(7)</return> manual page. (Added in event-1.6.0.)


id: EventUtil::SO_LINGER
type: constant
doc:
<comment>Description:</comment>
  Socket option. When enabled, a <return>close(2)</return> or <return>shutdown(2)</return> will not return until all queued messages
  for the socket have been successfully sent or the linger timeout has been reached. Otherwise, the
  call returns immediately and the closing is done in the background. See the <return>socket(7)</return> manual page.
  (Added in event-1.6.0.)


id: EventUtil::SO_REUSEADDR
type: constant
doc:
<comment>Description:</comment>
  Socket option. Indicates that the rules used in validating addresses supplied in a <return>bind(2)</return> call
  should allow reuse of local addresses. See the <return>socket(7)</return> manual page. (Added in event-1.6.0.)


id: EventUtil::__construct
type: function
doc:
<comment>Description:</comment>
  The abstract constructor
  
  <class>EventUtil</class> is a singleton. Therefore the constructor is abstract, and it is impossible to create
  objects based on this class.

<comment>Return:</comment>
  <info>unknown</info>  Nenhum valor é retornado.


id: EventUtil::getLastSocketErrno
type: function
doc:
<comment>Description:</comment>
  Returns the most recent socket error number
  
  Returns the most recent socket error number( <return>errno</return> ).

<comment>Param:</comment>
  <info>mixed</info>  <strong>$socket</strong>  Socket resource, stream or a file descriptor of a socket.

<comment>Return:</comment>
  <info>int</info>  Returns the most recent socket error number( <return>errno</return> ).

<comment>See Also:</comment>
   * EventUtil::getLastSocketError


id: EventUtil::getLastSocketError
type: function
doc:
<comment>Description:</comment>
  Returns the most recent socket error
  
  Returns the most recent socket error.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$socket</strong>  Socket resource, stream or a file descriptor of a socket.

<comment>Return:</comment>
  <info>string</info>  Returns the most recent socket error.

<comment>See Also:</comment>
   * EventUtil::getLastSocketErrno


id: EventUtil::getSocketFd
type: function
doc:
<comment>Description:</comment>
  Returns numeric file descriptor of a socket, or stream
  
  Returns numeric file descriptor of a socket or stream specified by <strong>$socket</strong> argument just like the
  <return>Event</return> extension does it internally for all methods accepting socket resource or stream.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$socket</strong>  Socket resource or stream.

<comment>Return:</comment>
  <info>int</info>  Returns numeric file descriptor of a socket, or stream. EventUtil::getSocketFd returns <info>false</info>
       in case if it is whether failed to recognize the type of the underlying file, or detected
       that the file descriptor associated with <strong>$socket</strong> is not valid.


id: EventUtil::getSocketName
type: function
doc:
<comment>Description:</comment>
  Retreives the current address to which the
    socket is bound
  
  Retreives the current address to which the <strong>$socket</strong> is bound.

<comment>Param:</comment>
  <info>mixed</info>   <strong>$socket</strong>   Socket resource, stream or a file descriptor of a socket.
  <info>string</info>  <strong>$address</strong>  Output parameter. IP-address, or the UNIX domain socket path depending on the
                    socket address family.
  <info>mixed</info>   <strong>$port</strong>     Output parameter. The port the socket is bound to. Has no meaning for UNIX
                    domain sockets.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: EventUtil::setSocketOption
type: function
doc:
<comment>Description:</comment>
  Sets socket options
  
  Sets socket options.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$socket</strong>   Socket resource, stream, or numeric file descriptor associated with the socket.
  <info>int</info>    <strong>$level</strong>    One of <return>EventUtil::SOL_*</return> constants. Specifies the protocol level at which the
                   option resides. For example, to retrieve options at the socket level, a <strong>$level</strong>
                   parameter of <info>EventUtil::SOL_SOCKET</info> would be used. Other levels, such as TCP, can
                   be used by specifying the protocol number of that level. Protocol numbers can be
                   found by using the <strong>getprotobyname()</strong> function. See EventUtil constants .
  <info>int</info>    <strong>$optname</strong>  Option name(type). Has the same meaning as corresponding parameter of
                   <strong>socket_get_option()</strong> function. See EventUtil constants .
  <info>mixed</info>  <strong>$optval</strong>   Accepts the same values as <strong>$optval</strong> parameter of the <strong>socket_get_option()</strong> function.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * <strong>socket_get_option()</strong>
   * <strong>socket_set_option()</strong>


id: EventUtil::sslRandPoll
type: function
doc:
<comment>Description:</comment>
  Generates entropy by means of OpenSSL's RAND_poll()
  
  Generates entropy by means of OpenSSL's <return>RAND_poll()</return> (see the system manual).

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Exception::__clone
type: function
doc:
<comment>Description:</comment>
  Clona a exceção
  
  <class>Exception</class>s não podem ser clonadas, e isso resultará no lançamento de um <class>Error</class>.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Exception::__construct
type: function
doc:
<comment>Description:</comment>
  Construtor da exceção
  
  Construtor de Exception.

<comment>Param:</comment>
  <info>string</info>          <strong>$message</strong>   A mensagem da exceção.
  <info>int</info>             <strong>$code</strong>      O código da exceção.
  <info>Throwable|null</info>  <strong>$previous</strong>  A exceção anterior, para o encadeamento de exceções.


id: Exception::__toString
type: function
doc:
<comment>Description:</comment>
  Representação em string da exceção
  
  Retorna a representação <info>string</info> da exceção.

<comment>Return:</comment>
  <info>string</info>  Retorna a representação <info>string</info> da exceção.

<comment>See Also:</comment>
   * Throwable::__toString


id: Exception::getCode
type: function
doc:
<comment>Description:</comment>
  Obtém o código da exceção
  
  Retorna o código da exceção.

<comment>Return:</comment>
  <info>int</info>  Retorna o código da Exceção como um <info>int</info> da <class>Exception</class> mas possívelmente outros tipos
       descendentes de <class>Exception</class> (<class>PDOException</class>, por exemplo, retorna como <info>string</info>).

<comment>See Also:</comment>
   * Throwable::getCode


id: Exception::getFile
type: function
doc:
<comment>Description:</comment>
  Obtém o arquivo no qual a exceção foi criada
  
  Obtém o nome do arquivo de onde a exceção foi criada.

<comment>Return:</comment>
  <info>string</info>  Retorna o nome do arquivo no qual a exceção foi criada.

<comment>See Also:</comment>
   * Throwable::getFile


id: Exception::getLine
type: function
doc:
<comment>Description:</comment>
  Obtém a linha na qual a exceção foi criada
  
  Retorna o número da linha onde a exceção foi disparada.

<comment>Return:</comment>
  <info>int</info>  Retorna o número da linha onde a exceção foi disparada.

<comment>See Also:</comment>
   * Throwable::getLine


id: Exception::getMessage
type: function
doc:
<comment>Description:</comment>
  Obtém a mensagem da exceção
  
  Retorna a mensagem da exceção.

<comment>Return:</comment>
  <info>string</info>  Retorna a mensagem da exceção como uma string.

<comment>See Also:</comment>
   * Throwable::getMessage


id: Exception::getPrevious
type: function
doc:
<comment>Description:</comment>
  Retorna o Throwable anterior
  
  Retorna o <class>Throwable</class> anterior (o terceiro valor passado no construtor Exception::__construct).

<comment>Return:</comment>
  <info>Throwable|null</info>  Retorna a <class>Throwable</class> anterior se disponível, ou senão <info>null</info>.

<comment>See Also:</comment>
   * Throwable::getPrevious


id: Exception::getTrace
type: function
doc:
<comment>Description:</comment>
  Obtém a stack trace
  
  Retorna a stack trace da exceção.

<comment>Return:</comment>
  <info>array</info>  Retorna a stack trace da exceção como um <info>array</info>.

<comment>See Also:</comment>
   * Throwable::getTrace


id: Exception::getTraceAsString
type: function
doc:
<comment>Description:</comment>
  Obtém a stack trace como uma string
  
  Retorna a stack trace da exceção como uma string.

<comment>Return:</comment>
  <info>string</info>  Retorna a stack trace da exceção como uma string.

<comment>See Also:</comment>
   * Throwable::getTraceAsString


id: Executable::execute
type: function
doc:
<comment>Description:</comment>
  Execute statement
  
  Execute the statement from either a collection operation or a table query; this functionality
  allows for method chaining.

<comment>Return:</comment>
  <info>mysql_xdevapi\Result</info>  One of the Result objects, such as Result or SqlStatementResult.


id: ExecutionStatus::__construct
type: function
doc:
<comment>Description:</comment>
  ExecutionStatus constructor
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.


id: Expression::__construct
type: function
doc:
<comment>Description:</comment>
  Expression constructor
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Param:</comment>
  <info>string</info>  <strong>$expression</strong>  


id: FANNConnection
type: class
doc:
<comment>Description:</comment>
  <class>FANNConnection</class> is used for the neural network connection. The objects of this class are used in
  <strong>fann_get_connection_array()</strong> and <strong>fann_set_weight_array()</strong>.


id: FANNConnection::__construct
type: function
doc:
<comment>Description:</comment>
  The connection constructor
  
  Create new connection and initialize its params. After creating the connection, only weight can be
  changed.

<comment>Param:</comment>
  <info>int</info>    <strong>$from_neuron</strong>  The position number of starting neuron.
  <info>int</info>    <strong>$to_neuron</strong>    The position number of terminating neuron.
  <info>float</info>  <strong>$weight</strong>       The connection weight value.


id: FANNConnection::getFromNeuron
type: function
doc:
<comment>Description:</comment>
  Returns the postions of starting neuron
  
  Returns the postions of starting neuron.

<comment>Return:</comment>
  <info>int</info>  The postions of starting neuron.


id: FANNConnection::getToNeuron
type: function
doc:
<comment>Description:</comment>
  Returns the postions of terminating neuron
  
  Returns the positions of terminating neuron.

<comment>Return:</comment>
  <info>int</info>  The postions of terminating neuron.


id: FANNConnection::getWeight
type: function
doc:
<comment>Description:</comment>
  Returns the connection weight
  
  Returns the connection weight.

<comment>Return:</comment>
  <info>void</info>  The connection weight.


id: FANNConnection::setWeight
type: function
doc:
<comment>Description:</comment>
  Sets the connections weight
  
  Sets the connection weight.
  
  This method is different than <strong>fann_set_weight()</strong>. It does not update the weight value in the
  network. The network value is updated only after calling <strong>fann_set_weight_array()</strong>.

<comment>Param:</comment>
  <info>float</info>  <strong>$weight</strong>  The connection weight.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: FANN_ELLIOT
type: constant
doc:
<comment>Description:</comment>
  Fast (sigmoid like) activation function defined by David Elliott.


id: FANN_ELLIOT_SYMMETRIC
type: constant
doc:
<comment>Description:</comment>
  Fast (symmetric sigmoid like) activation function defined by David Elliott.


id: FANN_ERRORFUNC_TANH
type: constant
doc:
<comment>Description:</comment>
  Tanh error function; usually better but may require a lower learning rate. This error function
  aggressively targets outputs that differ much from the desired, while not targeting outputs that
  only differ slightly. Not recommended for cascade or incremental training.


id: FANN_E_TRAIN_DATA_MISMATCH
type: constant
doc:
<comment>Description:</comment>
  Irreconcilable differences between two struct fann_train_data structures.


id: FANN_STOPFUNC_BIT
type: constant
doc:
<comment>Description:</comment>
  Stop criteria is number of bits that fail.  The number of bits means the number of output neurons
  which differs more than the bit fail limit (see fann_get_bit_fail_limit, fann_set_bit_fail_limit).
  The bits are counted in all of the training data, so this number can be higher than the number of
  training data.


id: FANN_TRAIN_BATCH
type: constant
doc:
<comment>Description:</comment>
  Standard backpropagation algorithm, where the weights are updated after calculating the mean
  square error for the whole training set. This means that the weights are only updated once during
  a epoch. For this reason some problems, will train slower with this algorithm. But since the mean
  square error is calculated more correctly than in incremental training, some problems will reach a
  better solutions with this algorithm.


id: FANN_TRAIN_INCREMENTAL
type: constant
doc:
<comment>Description:</comment>
  Standard backpropagation algorithm, where the weights are updated after each training pattern.
  This means that the weights are updated many times during a single epoch. For this reason some
  problems, will train very fast with this algorithm, while other more advanced problems will not
  train very well.


id: FANN_TRAIN_QUICKPROP
type: constant
doc:
<comment>Description:</comment>
  A more advanced batch training algorithm which achieves good results for many problems. The
  quickprop training algorithm uses the learning_rate parameter along with other more advanced
  parameters, but it is only recommended to change these advanced parameters, for users with insight
  in how the quickprop training algorithm works. The quickprop training algorithm is described by
  [Fahlman, 1988].


id: FANN_TRAIN_RPROP
type: constant
doc:
<comment>Description:</comment>
  A more advanced batch training algorithm which achieves good results for many problems. The RPROP
  training algorithm is adaptive, and does therefore not use the learning_rate. Some other
  parameters can however be set to change the way the RPROP algorithm works, but it is only
  recommended for users with insight in how the RPROP training algorithm works. The RPROP training
  algorithm is described by [Riedmiller and Braun, 1993], but the actual learning algorithm used
  here is the iRPROP- training algorithm which is described by [Igel and Husken, 2000] which is an
  variety of the standard RPROP training algorithm.


id: FFI
type: class
doc:
<comment>Description:</comment>
  Objects of this class are created by the factory methods FFI::cdef, FFI::load or FFI::scope.
  Defined C variables are made available as properties of the FFI instance, and defined C functions
  are made available as methods of the FFI instance. Declared C types can be used to create new C
  data structures using FFI::new and FFI::type.
  
  FFI definition parsing and shared library loading may take significant time. It is not useful to
  do it on each HTTP request in a Web environment. However, it is possible to preload FFI
  definitions and libraries at PHP startup, and to instantiate FFI objects when necessary. Header
  files may be extended with special <return>FFI_SCOPE</return> defines (e.g. #define FFI_SCOPE "foo"; the default
  scope is "C") and then loaded by FFI::load during preloading. This leads to the creation of a
  persistent binding, that will be available to all the following requests through FFI::scope. Refer
  to the complete PHP/FFI/preloading example for details.
  
  It is possible to preload more than one C header file into the same scope.


id: FFI::addr
type: function
doc:
<comment>Description:</comment>
  Creates an unmanaged pointer to C data
  
  Creates an unmanaged pointer to the C data represented by the given <class>FFI\CData</class>. The source <strong>$ptr</strong>
  must survive the resulting pointer. This function is mainly useful to pass arguments to C
  functions by pointer.

<comment>Param:</comment>
  <info>FFI\CData</info>  <strong>$ptr</strong>  The handle of the pointer to a C data structure.

<comment>Return:</comment>
  <info>FFI\CData</info>  Returns the freshly created <class>FFI\CData</class> object.


id: FFI::alignof
type: function
doc:
<comment>Description:</comment>
  Gets the alignment
  
  Gets the alignment of the given <class>FFI\CData</class> or <class>FFI\CType</class> object.

<comment>Param:</comment>
  <info>FFI\CData|FFI\CType</info>  <strong>$ptr</strong>  The handle of the C data or type.

<comment>Return:</comment>
  <info>int</info>  Returns the alignment of the given <class>FFI\CData</class> or <class>FFI\CType</class> object.


id: FFI::arrayType
type: function
doc:
<comment>Description:</comment>
  Dynamically constructs a new C array type
  
  Dynamically constructs a new C array type with elements of type defined by <strong>$type</strong>, and dimensions
  specified by <strong>$dimensions</strong>. In the following example $t1 and $t2 are equivalent array types:
  ]]>

<comment>Param:</comment>
  <info>FFI\CType</info>  <strong>$type</strong>        A valid C declaration as <info>string</info>, or an instance of <class>FFI\CType</class> which has
                          already been created.
  <info>array</info>      <strong>$dimensions</strong>  The dimensions of the type as <info>array</info>.

<comment>Return:</comment>
  <info>FFI\CType</info>  Returns the freshly created <class>FFI\CType</class> object.


id: FFI::cast
type: function
doc:
<comment>Description:</comment>
  Performs a C type cast
  
  FFI::cast creates a new <class>FFI\CData</class> object, that references the same C data structure, but is
  associated with a different type. The resulting object does not own the C data, and the source
  <strong>$ptr</strong> must survive the result. The C type may be specified as a <info>string</info> with any valid C type
  declaration or as <class>FFI\CType</class> object, created before. If this method is called statically, it must
  only use predefined C type names (e.g. <return>int</return>, <return>char</return>, etc.); if the method is called as instance
  method, any type declared for the instance is allowed.

<comment>Param:</comment>
  <info>FFI\CType|string</info>               <strong>$type</strong>  A valid C declaration as <info>string</info>, or an instance of <class>FFI\CType</class>
                                        which has already been created.
  <info>FFI\CData|int|float|bool|null</info>  <strong>$ptr</strong>   The handle of the pointer to a C data structure.

<comment>Return:</comment>
  <info>FFI\CData|null</info>  Returns the freshly created <class>FFI\CData</class> object.


id: FFI::cdef
type: function
doc:
<comment>Description:</comment>
  Creates a new FFI object
  
  Creates a new FFI object.

<comment>Param:</comment>
  <info>string</info>       <strong>$code</strong>  A string containing a sequence of declarations in regular C language (types,
                      structures, functions, variables, etc). Actually, this string may be
                      copy-pasted from C header files.
                      
                      C preprocessor directives are not supported, i.e. #include, #define and CPP
                      macros do not work.
  <info>string|null</info>  <strong>$lib</strong>   The name of a shared library file, to be loaded and linked with the
                      definitions.
                      
                      If <strong>$lib</strong> is omitted or <info>null</info>, platforms supporting <return>RTLD_DEFAULT</return> attempt to
                      lookup symbols declared in <strong>$code</strong> in the normal global scope. Other systems
                      will fail to resolve these symbols.

<comment>Return:</comment>
  <info>FFI</info>  Returns the freshly created <class>FFI</class> object.


id: FFI::free
type: function
doc:
<comment>Description:</comment>
  Releases an unmanaged data structure
  
  Manually releases a previously created unmanaged data structure.

<comment>Param:</comment>
  <info>FFI\CData</info>  <strong>$ptr</strong>  The handle of the unmanaged pointer to a C data structure.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: FFI::isNull
type: function
doc:
<comment>Description:</comment>
  Checks whether a FFI\CData is a null pointer
  
  Checks whether a FFI\CData is a null pointer.

<comment>Param:</comment>
  <info>FFI\CData</info>  <strong>$ptr</strong>  The handle of the pointer to a C data structure.

<comment>Return:</comment>
  <info>bool</info>  Returns whether a <class>FFI\CData</class> is a null pointer.


id: FFI::load
type: function
doc:
<comment>Description:</comment>
  Loads C declarations from a C header file
  
  Loads C declarations from a C header file. It is possible to specify shared libraries that should
  be loaded, using special <return>FFI_LIB</return> defines in the loaded C header file.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  The name of a C header file.
                     
                     C preprocessor directives are not supported, i.e. <return>#include</return>, <return>#define</return> and CPP
                     macros do not work, except for special cases listed below.
                     
                     The header file should contain a <return>#define</return> statement for the <return>FFI_SCOPE</return> variable,
                     e.g.: #define FFI_SCOPE "MYLIB". Refer to the class introduction for details.
                     
                     The header file may contain a <return>#define</return> statement for the <return>FFI_LIB</return> variable to
                     specify the library it exposes. If it is a system library only the file name is
                     required, e.g.: #define FFI_LIB "libc.so.6".  If it is a custom library, a
                     relative path is required, e.g.: #define FFI_LIB "./mylib.so".

<comment>Return:</comment>
  <info>FFI|null</info>  Returns the freshly created <class>FFI</class> object, or <info>null</info> on failure.

<comment>See Also:</comment>
   * FFI::scope


id: FFI::memcmp
type: function
doc:
<comment>Description:</comment>
  Compares memory areas
  
  Compares <strong>$size</strong> bytes from the memory areas <strong>$ptr1</strong> and <strong>$ptr2</strong>. Both <strong>$ptr1</strong> and <strong>$ptr2</strong> can be any native
  data structures (<class>FFI\CData</class>) or PHP <info>string</info>s.

<comment>Param:</comment>
  <info>string|FFI\CData</info>  <strong>$ptr1</strong>  The start of one memory area.
  <info>string|FFI\CData</info>  <strong>$ptr2</strong>  The start of another memory area.
  <info>int</info>               <strong>$size</strong>  The number of bytes to compare.

<comment>Return:</comment>
  <info>int</info>  Returns a value less than <return>0</return> if the contents of the memory area starting at <strong>$ptr1</strong> are
       considered less than the contents of the memory area starting at <strong>$ptr2</strong>, a value greater than
       <return>0</return> if the contents of the first memory area are considered greater than the second, and <return>0</return> if
       they are equal.


id: FFI::memcpy
type: function
doc:
<comment>Description:</comment>
  Copies one memory area to another
  
  Copies <strong>$size</strong> bytes from the memory area <strong>$from</strong> to the memory area <strong>$to</strong>.

<comment>Param:</comment>
  <info>FFI\CData</info>         <strong>$to</strong>    The start of the memory area to copy to.
  <info>FFI\CData|string</info>  <strong>$from</strong>  The start of the memory area to copy from.
  <info>int</info>               <strong>$size</strong>  The number of bytes to copy.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: FFI::memset
type: function
doc:
<comment>Description:</comment>
  Fills a memory area
  
  Fills <strong>$size</strong> bytes of the memory area pointed to by <strong>$ptr</strong> with the given byte <strong>$value</strong>.

<comment>Param:</comment>
  <info>FFI\CData</info>  <strong>$ptr</strong>    The start of the memory area to fill.
  <info>int</info>        <strong>$value</strong>  The byte to fill with.
  <info>int</info>        <strong>$size</strong>   The number of bytes to fill.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: FFI::new
type: function
doc:
<comment>Description:</comment>
  Creates a C data structure
  
  Creates a native data structure of the given C type. If this method is called statically, it must
  only use predefined C type names (e.g. <return>int</return>, <return>char</return>, etc.); if the method is called as instance
  method, any type declared for the instance is allowed.

<comment>Param:</comment>
  <info>FFI\CType|string</info>  <strong>$type</strong>        <strong>$type</strong> is a valid C declaration as <info>string</info>, or an instance of
                                 <class>FFI\CType</class> which has already been created.
  <info>bool</info>              <strong>$owned</strong>       Whether to create owned (i.e. managed) or unmanaged data. Managed
                                 data lives together with the returned <class>FFI\CData</class> object, and is
                                 released when the last reference to that object is released by
                                 regular PHP reference counting or GC. Unmanaged data should be
                                 released by calling FFI::free, when no longer needed.
  <info>bool</info>              <strong>$persistent</strong>  Whether to allocate the C data structure permanently on the system
                                 heap (using  <strong>malloc()</strong>), or on the PHP request heap (using
                                 <strong>emalloc()</strong>).

<comment>Return:</comment>
  <info>FFI\CData|null</info>  Returns the freshly created <class>FFI\CData</class> object, or <info>null</info> on failure.


id: FFI::scope
type: function
doc:
<comment>Description:</comment>
  Instantiates an FFI object with C declarations parsed during preloading
  
  Instantiates an FFI object with C declarations parsed during preloading.
  
  The FFI::scope method is safe to call multiple times for the same scope. Multiple references to
  the same scope may be loaded at the same time.

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>  The scope name defined by a special <return>FFI_SCOPE</return> define.

<comment>Return:</comment>
  <info>FFI</info>  Returns the freshly created <class>FFI</class> object.

<comment>See Also:</comment>
   * FFI::load


id: FFI::sizeof
type: function
doc:
<comment>Description:</comment>
  Gets the size of C data or types
  
  Returns the size of the given <class>FFI\CData</class> or <class>FFI\CType</class> object.

<comment>Param:</comment>
  <info>FFI\CData|FFI\CType</info>  <strong>$ptr</strong>  The handle of the C data or type.

<comment>Return:</comment>
  <info>int</info>  The size of the memory area pointed at by <strong>$ptr</strong>.


id: FFI::string
type: function
doc:
<comment>Description:</comment>
  Creates a PHP string from a memory area
  
  Creates a PHP <info>string</info> from <strong>$size</strong> bytes of the memory area pointed to by <strong>$ptr</strong>.

<comment>Param:</comment>
  <info>FFI\CData</info>  <strong>$ptr</strong>   The start of the memory area from which to create a <info>string</info>.
  <info>int|null</info>   <strong>$size</strong>  The number of bytes to copy to the <info>string</info>. If <strong>$size</strong> is omitted or <info>null</info>, <strong>$ptr</strong>
                    must be a zero terminated array of C <return>char</return>.

<comment>Return:</comment>
  <info>string</info>  The freshly created PHP <info>string</info>.


id: FFI::type
type: function
doc:
<comment>Description:</comment>
  Creates an FFI\CType object from a C declaration
  
  This function creates and returns a <class>FFI\CType</class> object for the given <info>string</info> containing a C type
  declaration. If this method is called statically, it must only use predefined C type names (e.g.
  <return>int</return>, <return>char</return>, etc.); if the method is called as instance method, any type declared for the instance
  is allowed.

<comment>Param:</comment>
  <info>string</info>  <strong>$type</strong>  A valid C declaration as <info>string</info>.

<comment>Return:</comment>
  <info>FFI\CType|null</info>  Returns the freshly created <class>FFI\CType</class> object, or <info>null</info> on failure.


id: FFI::typeof
type: function
doc:
<comment>Description:</comment>
  Gets the FFI\CType of FFI\CData
  
  Gets the <class>FFI\CType</class> object representing the type of the given <class>FFI\CData</class> object.

<comment>Param:</comment>
  <info>FFI\CData</info>  <strong>$ptr</strong>  The handle of the pointer to a C data structure.

<comment>Return:</comment>
  <info>FFI\CType</info>  Returns the <class>FFI\CType</class> object representing the type of the given <class>FFI\CData</class> object.


id: FFI\CData
type: class
doc:
<comment>Description:</comment>
  <class>FFI\CData</class> objects can be used in a number of ways as a regular
   PHP data:  C data of scalar types can be read and assigned via the $cdata property, e.g.  $x =
  FFI::new('int'); $x-&gt;cdata = 42;  C struct and union fields can be accessed as regular PHP
  object property, e.g. $cdata-&gt;field  C array elements can be accessed as regular PHP array
  elements, e.g. $cdata[$offset]  C arrays can be iterated using foreach statements.  C arrays can
  be used as arguments of <strong>count()</strong>.  C pointers can be dereferenced as arrays, e.g. $cdata[0]  C
  pointers can be compared using regular comparison operators (\<, \<=, ==, !=, &gt;=, &gt;).  C pointers can be incremented and decremented using regular +/-/ ++/–- operations, e.g. $cdata += 5  C pointers can be subtracted from another using regular - operations.  C pointers to functions can be called as a regular PHP closure, e.g. $cdata()  Any C data can be duplicated using the clone operator, e.g. $cdata2 = clone $cdata;  Any C data can be visualized using <strong>var_dump()</strong>, <strong>print_r()</strong>, etc.   Notable limitations are that <class>FFI\CData</class> instances do not support <strong>isset()</strong>, <strong>empty()</strong> and <strong>unset()</strong>, and that wrapped C structs and unions do not implement Traversable.
  
  C data of scalar types can be read and assigned via the $cdata property, e.g.  $x =
  FFI::new('int'); $x-&gt;cdata = 42;
  
  C struct and union fields can be accessed as regular PHP object property, e.g. $cdata-&gt;field
  
  C array elements can be accessed as regular PHP array elements, e.g. $cdata[$offset]
  
  C arrays can be iterated using foreach statements.
  
  C arrays can be used as arguments of <strong>count()</strong>.
  
  C pointers can be dereferenced as arrays, e.g. $cdata[0]
  
  C pointers can be compared using regular comparison operators (\<, \<=, ==, !=, &gt;=, &gt;).
  
  C pointers can be incremented and decremented using regular +/-/ ++/–- operations, e.g. $cdata +=
  5
  
  C pointers can be subtracted from another using regular - operations.
  
  C pointers to functions can be called as a regular PHP closure, e.g. $cdata()
  
  Any C data can be duplicated using the clone operator, e.g. $cdata2 = clone $cdata;
  
  Any C data can be visualized using <strong>var_dump()</strong>, <strong>print_r()</strong>, etc.
  
  Notable limitations are that <class>FFI\CData</class> instances do not support <strong>isset()</strong>, <strong>empty()</strong> and <strong>unset()</strong>, and
  that wrapped C structs and unions do not implement Traversable.


id: FFI\CType::getAlignment
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>int</info>  


id: FFI\CType::getArrayElementType
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>FFI\CType</info>  


id: FFI\CType::getFuncParameterType
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Param:</comment>
  <info>int</info>  <strong>$index</strong>  

<comment>Return:</comment>
  <info>FFI\CType</info>  


id: FFI\CType::getName
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>string</info>  


id: FFI\CType::getStructFieldNames
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>array</info>  


id: FFI\CType::getStructFieldOffset
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>  

<comment>Return:</comment>
  <info>int</info>  


id: FFI\CType::getStructFieldType
type: function
doc:
<comment>Description:</comment>
  Description
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>  

<comment>Return:</comment>
  <info>FFI\CType</info>  


id: FILEINFO_COMPRESS
type: constant
doc:
<comment>Description:</comment>
  Descompacta arquivos compactados.
  
  Desabilitada devido a problemas com thread safety.


id: FILEINFO_DEVICES
type: constant
doc:
<comment>Description:</comment>
  Verifica o conteúdo dos dispositivos especiais de blocos ou caracteres.


id: FILEINFO_EXTENSION
type: constant
doc:
<comment>Description:</comment>
  Retorna a extensão de arquivo apropriada para o tipo MIME detectado no arquivo.
  
  Para tipos que normalmente possuem múltiplas extensões de arquivo, como imagens <return>JPEG</return>, o valor
  retornado é composto por múltiplas extensões separadas por uma barra, por exemplo:
  <return>"jpeg/jpg/jpe/jfif"</return>. Para tipos desconhecidos indisponíveis no banco de dados magic.mime, o valor
  de retorno é <return>"???"</return>.
  
  Disponível desde o PHP 7.2.0.


id: FILEINFO_MIME
type: constant
doc:
<comment>Description:</comment>
  Retorna o tipo e a codificação MIME conforme definido pela RFC 2045.


id: FILEINFO_RAW
type: constant
doc:
<comment>Description:</comment>
  Não traduz caracteres não imprimíveis para uma representação octal <return>\ooo</return>.


id: FILE_BINARY
type: constant
doc:
<comment>Description:</comment>
  Modo binário.  Esta constante não tem efeito e está disponível apenas para compatibilidade futura
  (<return>forward compatibility</return>).
  
  Esta constante não tem efeito e está disponível apenas para compatibilidade futura (<return>forward
  compatibility</return>).


id: FILE_TEXT
type: constant
doc:
<comment>Description:</comment>
  Modo texto.  Esta constante não tem efeito e está disponível apenas para compatibilidade futura
  (<return>forward compatibility</return>).
  
  Esta constante não tem efeito e está disponível apenas para compatibilidade futura (<return>forward
  compatibility</return>).


id: FILTER_DEFAULT
type: constant
doc:
<comment>Description:</comment>
  ID do filtro padrão ("unsafe_raw"). Equivalente a <info>FILTER_UNSAFE_RAW</info>.


id: FILTER_FLAG_ALLOW_HEX
type: constant
doc:
<comment>Description:</comment>
  Permite notação hexadecimal (<return>0x[0-9a-fA-F]+</return>) no filtro "int".


id: FILTER_FLAG_ALLOW_OCTAL
type: constant
doc:
<comment>Description:</comment>
  Permite notação octal (<return>0[0-7]+</return>) no filtro "int".


id: FILTER_FLAG_ALLOW_SCIENTIFIC
type: constant
doc:
<comment>Description:</comment>
  Permite notação científica (<return>e</return>, <return>E</return>) no filtro "number_float".


id: FILTER_FLAG_ALLOW_THOUSAND
type: constant
doc:
<comment>Description:</comment>
  Permite separador de milhar (<return>,</return>) no filtro "number_float".


id: FILTER_FLAG_EMAIL_UNICODE
type: constant
doc:
<comment>Description:</comment>
  Aceita caracteres Unicode na parte local no filtro "validate_email". (Disponível a partir do PHP
  7.1.0)


id: FILTER_FLAG_HOSTNAME
type: constant
doc:
<comment>Description:</comment>
  Requer que hostnames inicial com caracteres alfanuméricos e contenham apenas alfanuméricos ou
  hífen. (Disponível a partir do PHP 7.0.0)


id: FILTER_FLAG_HOST_REQUIRED
type: constant
doc:
<comment>Description:</comment>
  Requer host no filtro "validate_url". (Depreciado a partir do PHP 7.3.0 e removido a partir do PHP
  8.0.0, já que está implementado no filtro.)


id: FILTER_FLAG_SCHEME_REQUIRED
type: constant
doc:
<comment>Description:</comment>
  Requer scheme no filtro "validate_url". (Obsoleto a partir do PHP 7.3.0 e removido a partir do PHP
  8.0.0, por já estar implícito no filtro em outro filtro)


id: FILTER_SANITIZE_MAGIC_QUOTES
type: constant
doc:
<comment>Description:</comment>
  ID do filtro "magic_quotes". (DEPRECIADO a partir do PHP 7.3.0 e REMOVIDO a partir do PHP 8.0.0,
  ao invés, use <info>FILTER_SANITIZE_ADD_SLASHES</info>.)


id: FILTER_SANITIZE_STRING
type: constant
doc:
<comment>Description:</comment>
  ID do filtro "string". (Depreciado a partir do PHP 8.1.0, ao invés, use <strong>htmlspecialchars()</strong>.)


id: FILTER_SANITIZE_STRIPPED
type: constant
doc:
<comment>Description:</comment>
  ID do filtro "stripped". (Depreciado a partir do PHP 8.1.0, ao invés, use <strong>htmlspecialchars()</strong>.)


id: FILTER_VALIDATE_DOMAIN
type: constant
doc:
<comment>Description:</comment>
  ID do filtro "validate_domain". (Disponível a partir do PHP 7.0.0)


id: FNM_CASEFOLD
type: constant
doc:
<comment>Description:</comment>
  Corresponde sem diferenciar maiúsculas e minúsculas. Parte da extensão GNU.


id: FNM_PATHNAME
type: constant
doc:
<comment>Description:</comment>
  A barra na string corresponde apenas à barra no padrão fornecido.


id: FNM_PERIOD
type: constant
doc:
<comment>Description:</comment>
  O ponto inicial na string deve corresponder exatamente ao ponto no padrão fornecido.


id: FTP\Connection
type: class
doc:
<comment>Description:</comment>
  A fully opaque class which replaces a <return>ftp</return> resource as of PHP 8.1.0.


id: FTP_AUTORESUME
type: constant
doc:
<comment>Description:</comment>
  Determina automaticamente a posição de continuação e a posição de início para as requisições GET e
  PUT (só funciona se FTP_AUTOSEEK estiver habilitado)


id: FT_INTERNAL
type: constant
doc:
<comment>Description:</comment>
  The return string is in internal format, will not canonicalize to CRLF.


id: Fiber
type: class
doc:
<comment>Description:</comment>
  Fibers representam funções interrompíveis de pilha completa. Fibers podem ser suspensas de
  qualquer lugar na pilha de chamadas, pausando a execução dentro de Fiber até que ela seja retomada
  posteriormente.


id: Fiber::__construct
type: function
doc:
<comment>Description:</comment>
  Cria uma nova instância de Fiber

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  O <info>callable</info> a ser invocado ao iniciar a Fiber. Argumentos informados a
                       Fiber::start serão fornecidos como argumentos ao callable informado.


id: Fiber::getCurrent
type: function
doc:
<comment>Description:</comment>
  Obtém a instância de Fiber sendo executada no momento

<comment>Return:</comment>
  <info>Fiber|null</info>  Retorna a instância de <class>Fiber</class> sendo executada no momento ou <info>null</info> se este método é
              chamado do lado de fora de uma Fiber.


id: Fiber::getReturn
type: function
doc:
<comment>Description:</comment>
  Obtém o valor retornado pela Fiber

<comment>Return:</comment>
  <info>mixed</info>  Retorna o valor retornado pela <info>callable</info> fornecida a Fiber::__construct. Se a Fiber não
         retornou um valor, por não ter iniciado ou terminado, ou por ter disparado uma exceção, uma
         <class>FiberError</class> será disparada.


id: Fiber::isRunning
type: function
doc:
<comment>Description:</comment>
  Determina se a Fiber está em execução

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> apenas se a Fiber estiver em execução. Um Fiber é considerada em execução após
        uma chamada a Fiber::start, Fiber::resume ou Fiber::throw que ainda não retornaram. Retorna
        <info>false</info> se a Fiber não está em execução.


id: Fiber::isStarted
type: function
doc:
<comment>Description:</comment>
  Determina se uma Fiber foi iniciada

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> apenas se a Fiber foi iniciada; caso contrário retorna <info>false</info>.


id: Fiber::isSuspended
type: function
doc:
<comment>Description:</comment>
  Determina se uma Fiber está suspensa

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> se uma Fiber está atualmente suspensa; caso contrário retorna <info>false</info>.


id: Fiber::isTerminated
type: function
doc:
<comment>Description:</comment>
  Determina se a Fiber terminou

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> apenas após a Fiber ter terminado, ou retornando da execução ou disparando uma
        exceção; caso contrário retorna <info>false</info>.


id: Fiber::resume
type: function
doc:
<comment>Description:</comment>
  Retoma a execução de uma Fiber com um valor
  
  Retoma a execução da Fiber usando o valor fornecido como resultado da chamada Fiber::suspend
  atual.
  
  Se a Fiber não estiver suspensa quando este método for chamado, uma exceção <class>FiberError</class> será
  disparada.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$value</strong>  O valor para retomar a Fiber. Este valor será o valor de retorno da chamada atual
                 de Fiber::suspend.

<comment>Return:</comment>
  <info>mixed</info>  O valor fornecido para a próxima chamada de Fiber::suspend ou <info>null</info> se a Fiber retornar. Se
         a Fiber disparar uma exceção antes de ser suspensa, ela será disparada a partir da chamada
         a este método.


id: Fiber::start
type: function
doc:
<comment>Description:</comment>
  Inicia execução de uma Fibra
  
  Uma lista variável de argumentos a ser fornecida para o callable usado na construção da Fiber.
  
  Se a Fiber já tiver sido iniciada quando este método for chamado, uma exceção <class>FiberError</class> será
  disparada.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$args</strong>  Os argumentos que serão utilizados na chamada ao callable fornecido ao construtor da
                Fiber.

<comment>Return:</comment>
  <info>mixed</info>  O valor fornecido à primeira chamada a Fiber::suspend ou <info>null</info> se a Fiber retornar. Se a
         Fiber disparar uma exceção antes de ser suspensa, ela será disparada a partir da chamada a
         este método.


id: Fiber::suspend
type: function
doc:
<comment>Description:</comment>
  Suspende a execução da Fiber atual
  
  Suspende a execução da Fiber atual. O valor fornecido a este método será retornado da chamada a
  Fiber::start, Fiber::resume ou Fiber::throw que mudou a execução para a Fiber atual.
  
  Quando a Fiber é retomada, este método retorna o valor fornecido a Fiber::resume. Se a Fiber é
  retomada usando Fiber::throw, a exceção fornecida àquele método será disparada a partir da chamada
  a este método.
  
  Se este método for chamado de fora de uma Fiber, uma exceção <class>FiberError</class> será disparada.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$value</strong>  O valor a retornar da chamada a Fiber::start, Fiber::resume ou Fiber::throw que
                 mudou a execução para a Fiber atual.

<comment>Return:</comment>
  <info>mixed</info>  O valor fornecido a Fiber::resume.


id: Fiber::throw
type: function
doc:
<comment>Description:</comment>
  Retoma a execução de uma Fiber com uma exceção
  
  Retoma a Fiber disparando a exceção informada a partir da chamada Fiber::suspend atual.
  
  Se a Fiber não estiver suspensa quando este método é chamado, uma exceção <class>FiberError</class> será
  disparada.

<comment>Param:</comment>
  <info>Throwable</info>  <strong>$exception</strong>  A exceção a ser disparada na Fiber a partir da chamada Fiber::suspend
                         atual.

<comment>Return:</comment>
  <info>mixed</info>  O valor fornecido à próxima chamada a Fiber::suspend ou <info>null</info> se a Fiber retornar. Se a
         Fiber disparar uma exceção antes de ser suspensa, ela será disparada a partir da chamada a
         este método.


id: FilesystemIterator::CURRENT_AS_FILEINFO
type: constant
doc:
<comment>Description:</comment>
  Makes FilesystemIterator::current return an <class>SplFileInfo</class> instance.


id: FilesystemIterator::CURRENT_AS_SELF
type: constant
doc:
<comment>Description:</comment>
  Makes FilesystemIterator::current return $this (the FilesystemIterator).


id: FilesystemIterator::NEW_CURRENT_AND_KEY
type: constant
doc:
<comment>Description:</comment>
  Same as <return>FilesystemIterator::KEY_AS_FILENAME | FilesystemIterator::CURRENT_AS_FILEINFO</return>.


id: FilesystemIterator::OTHER_MODE_MASK
type: constant
doc:
<comment>Description:</comment>
  Mask used for FilesystemIterator::getFlags and FilesystemIterator::setFlags.


id: FilesystemIterator::UNIX_PATHS
type: constant
doc:
<comment>Description:</comment>
  Makes paths use Unix-style forward slash irrespective of system default. Note that the <strong>$path</strong> that
  is passed to the constructor is not modified.


id: FilesystemIterator::__construct
type: function
doc:
<comment>Description:</comment>
  Constructs a new filesystem iterator
  
  Constructs a new filesystem iterator from the <strong>$directory</strong>.

<comment>Param:</comment>
  <info>string</info>  <strong>$directory</strong>  The path of the filesystem item to be iterated over.
  <info>int</info>     <strong>$flags</strong>      Flags may be provided which will affect the behavior of some methods.  A list
                      of the flags can found under FilesystemIterator predefined constants.  They
                      can also be set later with FilesystemIterator::setFlags

<comment>See Also:</comment>
   * FilesystemIterator::setFlags
   * DirectoryIterator::__construct


id: FilesystemIterator::current
type: function
doc:
<comment>Description:</comment>
  The current file
  
  Get file information of the current element.

<comment>Return:</comment>
  <info>string|SplFileInfo|FilesystemIterator</info>  The filename, file information, or $this depending on the
                                         set flags. See the FilesystemIterator constants.

<comment>See Also:</comment>
   * FilesystemIterator constants
   * DirectoryIterator::current
   * DirectoryIterator::getFileName


id: FilesystemIterator::getFlags
type: function
doc:
<comment>Description:</comment>
  Get the handling flags
  
  Gets the handling flags, as set in FilesystemIterator::__construct or
  FilesystemIterator::setFlags.

<comment>Return:</comment>
  <info>int</info>  The integer value of the set flags.

<comment>See Also:</comment>
   * FilesystemIterator::__construct
   * FilesystemIterator::setFlags


id: FilesystemIterator::key
type: function
doc:
<comment>Description:</comment>
  Retrieve the key for the current file

<comment>Return:</comment>
  <info>string</info>  Returns the pathname or filename depending on the set flags. See the FilesystemIterator
          constants.

<comment>See Also:</comment>
   * FilesystemIterator constants
   * DirectoryIterator::key
   * DirectoryIterator::getFilename
   * DirectoryIterator::getPathname


id: FilesystemIterator::next
type: function
doc:
<comment>Description:</comment>
  Move to the next file
  
  Move to the next file.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * DirectoryIterator::next


id: FilesystemIterator::rewind
type: function
doc:
<comment>Description:</comment>
  Rewinds back to the beginning
  
  Rewinds the directory back to the start.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * DirectoryIterator::rewind


id: FilesystemIterator::setFlags
type: function
doc:
<comment>Description:</comment>
  Sets handling flags
  
  Sets handling flags.

<comment>Param:</comment>
  <info>int</info>  <strong>$flags</strong>  The handling flags to set. See the FilesystemIterator constants.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * FilesystemIterator::__construct
   * FilesystemIterator::getFlags


id: FilterIterator
type: class
doc:
<comment>Description:</comment>
  This abstract iterator filters out unwanted values. This class should be extended to implement
  custom iterator filters. The FilterIterator::accept must be implemented in the subclass.


id: FilterIterator::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a filterIterator
  
  Constructs a new <class>FilterIterator</class>, which consists of a passed in <strong>$iterator</strong> with filters applied to
  it.
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Param:</comment>
  <info>Iterator</info>  <strong>$iterator</strong>  The iterator that is being filtered.

<comment>See Also:</comment>
   * LimitIterator::__construct


id: FilterIterator::accept
type: function
doc:
<comment>Description:</comment>
  Check whether the current element of the iterator is acceptable
  
  Returns whether the current element of the iterator is acceptable through this filter.

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> if the current element is acceptable, otherwise <info>false</info>.


id: FilterIterator::current
type: function
doc:
<comment>Description:</comment>
  Retorna o valor do elemento atual
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.
  
  Obtém o valor do atual elemento.

<comment>Return:</comment>
  <info>mixed</info>  O valor do elemento atual.

<comment>See Also:</comment>
   * <strong>FilterIterator::key()</strong>
   * <strong>FilterIterator::next()</strong>


id: FilterIterator::key
type: function
doc:
<comment>Description:</comment>
  Retorna a chave do elemento atual
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.
  
  Obtém a chave atual.

<comment>Return:</comment>
  <info>mixed</info>  A chave atual.

<comment>See Also:</comment>
   * <strong>FilterIterator::next()</strong>
   * <strong>FilterIterator::current()</strong>


id: FilterIterator::next
type: function
doc:
<comment>Description:</comment>
  Avança o iterador
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.
  
  Avança o iterador.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * <strong>FilterIterator::current()</strong>
   * <strong>FilterIterator::key()</strong>


id: FilterIterator::rewind
type: function
doc:
<comment>Description:</comment>
  Recomeça o iterador
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.
  
  Recomeça o iterador.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.

<comment>See Also:</comment>
   * <strong>FilterIterator::current()</strong>
   * <strong>FilterIterator::key()</strong>
   * <strong>FilterIterator::next()</strong>


id: FilterIterator::valid
type: function
doc:
<comment>Description:</comment>
  Verifica se o elemento atual é válido ou não
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.
  
  Verifica se o elemento atual é válido.

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> se o elemento atual é válido, <info>false</info> caso contrário


id: GD_EXTRA_VERSION
type: constant
doc:
<comment>Description:</comment>
  A versão "extra" da biblioteca GD (beta/rc..) compilada com o PHP.


id: GEARMAN_CLIENT_FREE_TASKS
type: constant
doc:
<comment>Description:</comment>
  Automatically free task objects once they are complete.  This is the default setting in this
  extension to prevent memory leaks.


id: GEARMAN_CLIENT_UNBUFFERED_RESULT
type: constant
doc:
<comment>Description:</comment>
  Allow the client to read data in chunks rather than have the library buffer the entire data result
  and pass that back.


id: GEARMAN_ECHO_DATA_CORRUPTION
type: constant
doc:
<comment>Description:</comment>
  After GearmanClient::echo or GearmanWorker::echo the data returned doesn't match the data sent.


id: GEARMAN_ERRNO
type: constant
doc:
<comment>Description:</comment>
  A system error.  Check GearmanClient::errno or GearmanWorker::errno for the system error code that
  was returned.


id: GEARMAN_INVALID_FUNCTION_NAME
type: constant
doc:
<comment>Description:</comment>
  Trying to register a function name of NULL or using the callback interface without specifying
  callbacks.


id: GEARMAN_IO_WAIT
type: constant
doc:
<comment>Description:</comment>
  When in non-blocking mode, an event is hit that would have blocked.


id: GEARMAN_NEED_WORKLOAD_FN
type: constant
doc:
<comment>Description:</comment>
  When the client opted to stream the workload of a task, but did not specify a workload callback
  function.


id: GEARMAN_NO_ACTIVE_FDS
type: constant
doc:
<comment>Description:</comment>
  GearmanClient::wait or GearmanWorker was called with no connections.


id: GEARMAN_NO_JOBS
type: constant
doc:
<comment>Description:</comment>
  For a non-blocking worker, when GearmanWorker::work does not have any active jobs.


id: GEARMAN_NO_SERVERS
type: constant
doc:
<comment>Description:</comment>
  Did not call GearmanClient::addServer before submitting jobs or tasks.


id: GEARMAN_PAUSE
type: constant
doc:
<comment>Description:</comment>
  For the non-blocking client task interface, can be returned from the task callback to "pause" the
  call and return from GearmanClient::runTasks. Call GearmanClient::runTasks again to continue.


id: GEARMAN_SEND_BUFFER_TOO_SMALL
type: constant
doc:
<comment>Description:</comment>
  Internal error: trying to flush more data in one atomic chunk than is possible due to hard-coded
  buffer sizes.


id: GEARMAN_SERVER_ERROR
type: constant
doc:
<comment>Description:</comment>
  Something went wrong in the Gearman server and it could not handle the request gracefully.


id: GEARMAN_UNEXPECTED_PACKET
type: constant
doc:
<comment>Description:</comment>
  Indicates something going very wrong in gearmand.  Applies only to <class>GearmanWorker</class>.


id: GEARMAN_WORKER_GRAB_UNIQ
type: constant
doc:
<comment>Description:</comment>
  Return the client assigned unique ID in addition to the job handle.


id: GEARMAN_WORK_DATA
type: constant
doc:
<comment>Description:</comment>
  Notice return code obtained with GearmanClient::returnCode when using GearmanClient::do.  Sent to
  update the client with data from a running job.  A worker uses this when it needs to send updates,
  send partial results, or flush data during long running jobs.


id: GEARMAN_WORK_EXCEPTION
type: constant
doc:
<comment>Description:</comment>
  Notice return code obtained with GearmanClient::returnCode when using GearmanClient::do. Indicates
  that a job failed with a given exception.


id: GEARMAN_WORK_FAIL
type: constant
doc:
<comment>Description:</comment>
  Notice return code obtained with GearmanClient::returnCode when using GearmanClient::do. Indicates
  that the job failed.


id: GEARMAN_WORK_STATUS
type: constant
doc:
<comment>Description:</comment>
  Notice return code obtained with GearmanClient::returnCode when using GearmanClient::do. Sent to
  update the status of a long running job. Use GearmanClient::doStatus to obtain the percentage
  complete of the task.


id: GEARMAN_WORK_WARNING
type: constant
doc:
<comment>Description:</comment>
  Notice return code obtained with GearmanClient::returnCode when using GearmanClient::do.  Updates
  the client with a warning.  The behavior is just like <info>GEARMAN_WORK_DATA</info>, but should be treated as
  a warning instead of normal response data.


id: GMP
type: class
doc:
<comment>Description:</comment>
  Representa um número GMP. Este objeto suporta sobrecarga dos operadores aritméticos, binários e
  comparativos.
  
  Nenhuma interface orientada a objeto é provida para manipular objetos <class>GMP</class>. Para isto, favor usar a
  API GMP procedural.


id: GMP::__construct
type: function
doc:
<comment>Description:</comment>
  Create GMP number
  
  Creates a GMP number from an integer or string.

<comment>Param:</comment>
  <info>int|string</info>  <strong>$num</strong>   An integer or a string. The string representation can be decimal, hexadecimal
                     or octal.
  <info>int</info>         <strong>$base</strong>  The base.
                     
                     The base may vary from 2 to 62. If base is 0 (default value), the actual base
                     is determined from the leading characters: if the first two characters are <return>0x</return>
                     or <return>0X</return>, hexadecimal is assumed, if the first two characters are <return>0b</return> or <return>0B</return>, binary
                     is assumed, otherwise if the first character is <return>0</return>, octal is assumed, otherwise
                     decimal is assumed. For bases up to 36, case is ignored; upper-case and
                     lower-case letters have the same value. For bases 37 to 62, upper-case letter
                     represent the usual 10 to 35 while lower-case letter represent 36 to 61.

<comment>See Also:</comment>
   * <strong>gmp_init()</strong>


id: GMP::__serialize
type: function
doc:
<comment>Description:</comment>
  Serializes the GMP object
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Return:</comment>
  <info>array</info>  Nenhum valor é retornado.


id: GMP::__unserialize
type: function
doc:
<comment>Description:</comment>
  Deserializes the data parameter into a GMP object
  
  Esta função não
  está documentada; apenas a lista de argumentos está disponível.

<comment>Param:</comment>
  <info>array</info>  <strong>$data</strong>  The value being deserialized.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: GSLC_SSL_NO_AUTH
type: constant
doc:
<comment>Description:</comment>
  SSL Authentication Mode - No authentication required. (Only for Oracle LDAP)


id: GSLC_SSL_ONEWAY_AUTH
type: constant
doc:
<comment>Description:</comment>
  SSL Authentication Mode - Only server authentication required. (Only for Oracle LDAP)


id: GSLC_SSL_TWOWAY_AUTH
type: constant
doc:
<comment>Description:</comment>
  SSL Authentication Mode - Both server and client authentication required. (Only for Oracle LDAP)


id: GdFont
type: class
doc:
<comment>Description:</comment>
  A fully opaque class which replaces <return>gd font</return> resources as of PHP 8.1.0.


id: GdImage
type: class
doc:
<comment>Description:</comment>
  A fully opaque class which replaces <return>gd</return> resources as of PHP 8.0.0.


id: GearmanClient
type: class
doc:
<comment>Description:</comment>
  Represents a class for connecting to a Gearman job server and making requests to perform some
  function on provided data.  The function performed must be one registered by a Gearman worker and
  the data passed is opaque to the job server.


id: GearmanClient::__construct
type: function
doc:
<comment>Description:</comment>
  Create a GearmanClient instance
  
  Creates a <class>GearmanClient</class> instance representing a client that connects to the job server and submits
  tasks to complete.

<comment>Return:</comment>
  <info>unknown</info>  A <class>GearmanClient</class> object.

<comment>See Also:</comment>
   * GearmanClient::clone


id: GearmanClient::addOptions
type: function
doc:
<comment>Description:</comment>
  Add client options
  
  Adds one or more options to those already set.

<comment>Param:</comment>
  <info>int</info>  <strong>$option</strong>  The options to add. One of the following constants, or a combination of them using
                the bitwise OR operator (|): <info>GEARMAN_CLIENT_GENERATE_UNIQUE</info>,
                <info>GEARMAN_CLIENT_NON_BLOCKING</info>, <info>GEARMAN_CLIENT_UNBUFFERED_RESULT</info> or
                <info>GEARMAN_CLIENT_FREE_TASKS</info>.

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.


id: GearmanClient::addServer
type: function
doc:
<comment>Description:</comment>
  Add a job server to the client
  
  Adds a job server to a list of servers that can be used to run a task.  No socket I/O happens
  here; the server is simply added to the list.

<comment>Param:</comment>
  <info>string</info>  <strong>$host</strong>  O nome do servidor de trabalho.
  <info>int</info>     <strong>$port</strong>  A porta do servidor de trabalho.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::addServers


id: GearmanClient::addServers
type: function
doc:
<comment>Description:</comment>
  Add a list of job servers to the client
  
  Adds a list of job servers that can be used to run a task.  No socket I/O happens here; the
  servers are simply added to the full list of servers.

<comment>Param:</comment>
  <info>string</info>  <strong>$servers</strong>  A comma-separated list of servers, each server specified in the format
                    '<return>host:port</return>'.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::addServer


id: GearmanClient::addTask
type: function
doc:
<comment>Description:</comment>
  Add a task to be run in parallel
  
  Adds a task to be run in parallel with other tasks.  Call this method for all the tasks to be run
  in parallel, then call GearmanClient::runTasks to  perform the work.  Note that enough workers
  need to be available for the tasks to all run in parallel.

<comment>Param:</comment>
  <info>string</info>            <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string|int|float</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>mixed</info>             <strong>$context</strong>        Contexto da aplicação para associar a uma tarefa
  <info>string|null</info>       <strong>$unique_key</strong>     Um identificador único usado para identificar uma tarefa
                                    específica

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> if the task could not be added.

<comment>See Also:</comment>
   * GearmanClient::addTaskHigh
   * GearmanClient::addTaskLow
   * GearmanClient::addTaskBackground
   * GearmanClient::addTaskHighBackground
   * GearmanClient::addTaskLowBackground
   * GearmanClient::runTasks


id: GearmanClient::addTaskBackground
type: function
doc:
<comment>Description:</comment>
  Add a background task to be run in parallel
  
  Adds a background task to be run in parallel with other tasks.  Call this method for all the tasks
  to be run in parallel, then call GearmanClient::runTasks to perform the work.

<comment>Param:</comment>
  <info>string</info>            <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string|int|float</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>mixed</info>             <strong>$context</strong>        Contexto da aplicação para associar a uma tarefa
  <info>string|null</info>       <strong>$unique_key</strong>     Um identificador único usado para identificar uma tarefa
                                    específica

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> if the task could not be added.

<comment>See Also:</comment>
   * GearmanClient::addTask
   * GearmanClient::addTaskHigh
   * GearmanClient::addTaskLow
   * GearmanClient::addTaskHighBackground
   * GearmanClient::addTaskLowBackground
   * GearmanClient::runTasks


id: GearmanClient::addTaskHigh
type: function
doc:
<comment>Description:</comment>
  Add a high priority task to run in parallel
  
  Adds a high priority task to be run in parallel with other tasks.  Call this method for all the
  high priority tasks to be run in parallel, then call GearmanClient::runTasks to perform the work.
  Tasks with a high priority will be selected from the queue before those of normal or low priority.

<comment>Param:</comment>
  <info>string</info>            <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string|int|float</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>mixed</info>             <strong>$context</strong>        Contexto da aplicação para associar a uma tarefa
  <info>string|null</info>       <strong>$unique_key</strong>     Um identificador único usado para identificar uma tarefa
                                    específica

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> if the task could not be added.

<comment>See Also:</comment>
   * GearmanClient::addTask
   * GearmanClient::addTaskLow
   * GearmanClient::addTaskBackground
   * GearmanClient::addTaskHighBackground
   * GearmanClient::addTaskLowBackground
   * GearmanClient::runTasks


id: GearmanClient::addTaskHighBackground
type: function
doc:
<comment>Description:</comment>
  Add a high priority background task to be run in parallel
  
  Adds a high priority background task to be run in parallel with other tasks. Call this method for
  all the tasks to be run in parallel, then call GearmanClient::runTasks to perform the work. Tasks
  with a high priority will be selected from the queue before those of normal or low priority.

<comment>Param:</comment>
  <info>string</info>            <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string|int|float</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>mixed</info>             <strong>$context</strong>        Contexto da aplicação para associar a uma tarefa
  <info>string|null</info>       <strong>$unique_key</strong>     Um identificador único usado para identificar uma tarefa
                                    específica

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> if the task could not be added.

<comment>See Also:</comment>
   * GearmanClient::addTask
   * GearmanClient::addTaskHigh
   * GearmanClient::addTaskLow
   * GearmanClient::addTaskBackground
   * GearmanClient::addTaskLowBackground
   * GearmanClient::runTasks


id: GearmanClient::addTaskLow
type: function
doc:
<comment>Description:</comment>
  Add a low priority task to run in parallel
  
  Adds a low priority background task to be run in parallel with other tasks. Call this method for
  all the tasks to be run in parallel, then call GearmanClient::runTasks to perform the work. Tasks
  with a low priority will be selected from the queue after those of normal or low priority.

<comment>Param:</comment>
  <info>string</info>            <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string|int|float</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>mixed</info>             <strong>$context</strong>        Contexto da aplicação para associar a uma tarefa
  <info>string|null</info>       <strong>$unique_key</strong>     Um identificador único usado para identificar uma tarefa
                                    específica

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> if the task could not be added.

<comment>See Also:</comment>
   * GearmanClient::addTask
   * GearmanClient::addTaskHigh
   * GearmanClient::addTaskBackground
   * GearmanClient::addTaskHighBackground
   * GearmanClient::addTaskLowBackground
   * GearmanClient::runTasks


id: GearmanClient::addTaskLowBackground
type: function
doc:
<comment>Description:</comment>
  Add a low priority background task to be run in parallel
  
  Adds a low priority background task to be run in parallel with other tasks. Call this method for
  all the tasks to be run in parallel, then call GearmanClient::runTasks to perform the work. Tasks
  with a low priority will be selected from the queue after those of normal or high priority.

<comment>Param:</comment>
  <info>string</info>            <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string|int|float</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>mixed</info>             <strong>$context</strong>        Contexto da aplicação para associar a uma tarefa
  <info>string|null</info>       <strong>$unique_key</strong>     Um identificador único usado para identificar uma tarefa
                                    específica

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> if the task could not be added.

<comment>See Also:</comment>
   * GearmanClient::addTask
   * GearmanClient::addTaskHigh
   * GearmanClient::addTaskLow
   * GearmanClient::addTaskBackground
   * GearmanClient::addTaskHighBackground
   * GearmanClient::runTasks


id: GearmanClient::addTaskStatus
type: function
doc:
<comment>Description:</comment>
  Add a task to get status
  
  Used to request status information from the Gearman server, which will call the specified status
  callback (set using GearmanClient::setStatusCallback).

<comment>Param:</comment>
  <info>string</info>  <strong>$job_handle</strong>  The job handle for the task to get status for
  <info>mixed</info>   <strong>$context</strong>     Data to be passed to the status callback, generally a reference to an array
                       or object

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> object or <info>false</info> on failure.

<comment>See Also:</comment>
   * GearmanClient::setStatusCallback


id: GearmanClient::clearCallbacks
type: function
doc:
<comment>Description:</comment>
  Clear all task callback functions
  
  Clears all the task callback functions that have previously been set.

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::clone
type: function
doc:
<comment>Description:</comment>
  Create a copy of a GearmanClient object
  
  Creates a copy of a <class>GearmanClient</class> object.

<comment>Return:</comment>
  <info>GearmanClient</info>  A <class>GearmanClient</class> on success, <info>false</info> on failure.


id: GearmanClient::context
type: function
doc:
<comment>Description:</comment>
  Get the application context
  
  Get the application context previously set with GearmanClient::setContext.

<comment>Return:</comment>
  <info>string</info>  The same context data structure set with GearmanClient::setContext

<comment>See Also:</comment>
   * GearmanClient::setContext


id: GearmanClient::data
type: function
doc:
<comment>Description:</comment>
  Get the application data (deprecated)
  
  Get the application data previously set with GearmanClient::setData.
  
  This method was replaced by GearmanClient::setContext in the 0.6.0 release of the Gearman
  extension.

<comment>Return:</comment>
  <info>string</info>  The same string data set with GearmanClient::setData

<comment>See Also:</comment>
   * GearmanClient::setData


id: GearmanClient::do
type: function
doc:
<comment>Description:</comment>
  Run a single task and return a result [deprecated]
  
  The GearmanClient::do method is deprecated as of pecl/gearman 1.0.0. Use GearmanClient::doNormal.

<comment>Param:</comment>
  <info>string</info>  <strong>$function_name</strong>  Uma função registrada que o worker deve executar
  <info>string</info>  <strong>$workload</strong>       Dados serializados a serem processados
  <info>string</info>  <strong>$unique</strong>         Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  A string representing the results of running a task.

<comment>See Also:</comment>
   * GearmanClient::doHigh
   * GearmanClient::doLow
   * GearmanClient::doBackground
   * GearmanClient::doHighBackground
   * GearmanClient::doLowBackground


id: GearmanClient::doBackground
type: function
doc:
<comment>Description:</comment>
  Run a task in the background
  
  Runs a task in the background, returning a job handle which can be used to get the status of the
  running task.

<comment>Param:</comment>
  <info>string</info>       <strong>$function</strong>  Uma função registrada que o worker deve executar
  <info>string</info>       <strong>$workload</strong>  Dados serializados a serem processados
  <info>string|null</info>  <strong>$unique</strong>    Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  The job handle for the submitted task.

<comment>See Also:</comment>
   * GearmanClient::doNormal
   * GearmanClient::doHigh
   * GearmanClient::doLow
   * GearmanClient::doHighBackground
   * GearmanClient::doLowBackground


id: GearmanClient::doHigh
type: function
doc:
<comment>Description:</comment>
  Run a single high priority task
  
  Runs a single high priority task and returns a string representation of the result.  It is up to
  the <class>GearmanClient</class> and <class>GearmanWorker</class> to agree on the format of the result.  High priority tasks
  will get precedence over normal and low priority tasks in the job queue.

<comment>Param:</comment>
  <info>string</info>       <strong>$function</strong>  Uma função registrada que o worker deve executar
  <info>string</info>       <strong>$workload</strong>  Dados serializados a serem processados
  <info>string|null</info>  <strong>$unique</strong>    Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  A string representing the results of running a task.

<comment>See Also:</comment>
   * GearmanClient::doNormal
   * GearmanClient::doLow
   * GearmanClient::doBackground
   * GearmanClient::doHighBackground
   * GearmanClient::doLowBackground


id: GearmanClient::doHighBackground
type: function
doc:
<comment>Description:</comment>
  Run a high priority task in the background
  
  Runs a high priority task in the background, returning a job handle which can be used to get the
  status of the running task.  High priority tasks take precedence over normal and low priority
  tasks in the job queue.

<comment>Param:</comment>
  <info>string</info>       <strong>$function</strong>  Uma função registrada que o worker deve executar
  <info>string</info>       <strong>$workload</strong>  Dados serializados a serem processados
  <info>string|null</info>  <strong>$unique</strong>    Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  The job handle for the submitted task.

<comment>See Also:</comment>
   * GearmanClient::doNormal
   * GearmanClient::doHigh
   * GearmanClient::doLow
   * GearmanClient::doBackground
   * GearmanClient::doLowBackground


id: GearmanClient::doJobHandle
type: function
doc:
<comment>Description:</comment>
  Get the job handle for the running task
  
  Gets that job handle for a running task.  This should be used between repeated
  GearmanClient::doNormal calls.  The job handle can then be used to get information on the task.

<comment>Return:</comment>
  <info>string</info>  The job handle for the running task.

<comment>See Also:</comment>
   * GearmanClient::jobStatus


id: GearmanClient::doLow
type: function
doc:
<comment>Description:</comment>
  Run a single low priority task
  
  Runs a single low priority task and returns a string representation of the result.  It is up to
  the <class>GearmanClient</class> and <class>GearmanWorker</class> to agree on the format of the result.  Normal and high
  priority tasks will get precedence over low priority tasks in the job queue.

<comment>Param:</comment>
  <info>string</info>       <strong>$function</strong>  Uma função registrada que o worker deve executar
  <info>string</info>       <strong>$workload</strong>  Dados serializados a serem processados
  <info>string|null</info>  <strong>$unique</strong>    Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  A string representing the results of running a task.

<comment>See Also:</comment>
   * GearmanClient::doNormal
   * GearmanClient::doHigh
   * GearmanClient::doBackground
   * GearmanClient::doHighBackground
   * GearmanClient::doLowBackground


id: GearmanClient::doLowBackground
type: function
doc:
<comment>Description:</comment>
  Run a low priority task in the background
  
  Runs a low priority task in the background, returning a job handle which can be used to get the
  status of the running task.  Normal and high priority tasks take precedence over low priority
  tasks in the job queue.

<comment>Param:</comment>
  <info>string</info>       <strong>$function</strong>  Uma função registrada que o worker deve executar
  <info>string</info>       <strong>$workload</strong>  Dados serializados a serem processados
  <info>string|null</info>  <strong>$unique</strong>    Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  The job handle for the submitted task.

<comment>See Also:</comment>
   * GearmanClient::doNormal
   * GearmanClient::doHigh
   * GearmanClient::doLow
   * GearmanClient::doBackground
   * GearmanClient::doHighBackground


id: GearmanClient::doNormal
type: function
doc:
<comment>Description:</comment>
  Run a single task and return a result
  
  Runs a single task and returns a string representation of the result.  It is up to the
  <class>GearmanClient</class> and <class>GearmanWorker</class> to agree on the format of the result.

<comment>Param:</comment>
  <info>string</info>       <strong>$function</strong>  Uma função registrada que o worker deve executar
  <info>string</info>       <strong>$workload</strong>  Dados serializados a serem processados
  <info>string|null</info>  <strong>$unique</strong>    Um identificador único usado para identificar uma tarefa específica

<comment>Return:</comment>
  <info>string</info>  A string representing the results of running a task.

<comment>See Also:</comment>
   * GearmanClient::doHigh
   * GearmanClient::doLow
   * GearmanClient::doBackground
   * GearmanClient::doHighBackground
   * GearmanClient::doLowBackground


id: GearmanClient::doStatus
type: function
doc:
<comment>Description:</comment>
  Get the status for the running task
  
  Returns the status for the running task.  This should be used between repeated
  GearmanClient::doNormal calls.

<comment>Return:</comment>
  <info>array</info>  An array representing the percentage completion given as a fraction, with the first element
         the numerator and the second element the denomintor.

<comment>See Also:</comment>
   * GearmanClient::doNormal
   * GearmanJob::status


id: GearmanClient::echo
type: function
doc:
<comment>Description:</comment>
  Send data to all job servers to see if they echo it back [deprecated]
  
  The GearmanClient::echo method is deprecated as of pecl/gearman 1.0.0. Use GearmanClient::ping.

<comment>Param:</comment>
  <info>string</info>  <strong>$workload</strong>  Some arbitrary serialized data to be echo back

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: GearmanClient::error
type: function
doc:
<comment>Description:</comment>
  Returns an error string for the last error encountered
  
  Returns an error string for the last error encountered.

<comment>Return:</comment>
  <info>string|false</info>  A human readable error string, or <info>false</info> if there is no error message available.

<comment>See Also:</comment>
   * GearmanClient::getErrno


id: GearmanClient::getErrno
type: function
doc:
<comment>Description:</comment>
  Get an errno value
  
  Value of errno in the case of a GEARMAN_ERRNO return value.

<comment>Return:</comment>
  <info>int</info>  A valid Gearman errno.

<comment>See Also:</comment>
   * GearmanClient::error


id: GearmanClient::jobStatus
type: function
doc:
<comment>Description:</comment>
  Get the status of a background job
  
  Estilo orientado a objetos (method):
  
  Gets the status for a background job given a job handle.  The status information will specify
  whether the job is known, whether the job is currently running, and the percentage completion.

<comment>Param:</comment>
  <info>string</info>  <strong>$job_handle</strong>  O manipulador de trabalho atribuído pelo servidor Gearman

<comment>Return:</comment>
  <info>array</info>  An array containing status information for the job corresponding to the supplied job
         handle.  The first array element is a boolean indicating whether the job is even known, the
         second is a boolean indicating whether the job is still running, and the third and fourth
         elements correspond to the numerator and denominator of the fractional completion
         percentage, respectively.

<comment>See Also:</comment>
   * GearmanClient::doStatus


id: GearmanClient::ping
type: function
doc:
<comment>Description:</comment>
  Send data to all job servers to see if they echo it back
  
  Sends some arbitrary data to all job servers to see if they echo it back.  The data sent is not
  used or processed in any other way.  Primarily used for testing and debugging.

<comment>Param:</comment>
  <info>string</info>  <strong>$workload</strong>  Some arbitrary serialized data to be echo back

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: GearmanClient::removeOptions
type: function
doc:
<comment>Description:</comment>
  Remove client options
  
  Removes (unsets) one or more options.

<comment>Param:</comment>
  <info>int</info>  <strong>$option</strong>  The options to be removed (unset)

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.


id: GearmanClient::returnCode
type: function
doc:
<comment>Description:</comment>
  Get the last Gearman return code
  
  Returns the last Gearman return code.

<comment>Return:</comment>
  <info>int</info>  A valid Gearman return code.


id: GearmanClient::runTasks
type: function
doc:
<comment>Description:</comment>
  Run a list of tasks in parallel
  
  For a set of tasks previously added with GearmanClient::addTask, GearmanClient::addTaskHigh,
  GearmanClient::addTaskLow, GearmanClient::addTaskBackground, GearmanClient::addTaskHighBackground,
  or GearmanClient::addTaskLowBackground, this call starts running the tasks in parallel.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::addTask


id: GearmanClient::setClientCallback
type: function
doc:
<comment>Description:</comment>
  Callback function when there is a data packet for a task (deprecated)
  
  Sets the callback function for accepting data packets for a task. The callback function should
  take a single argument, a <class>GearmanTask</class> object.
  
  This method has been replaced by GearmanClient::setDataCallback in the 0.6.0 release of the
  Gearman extension.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  A function or method to call

<comment>Return:</comment>
  <info>void</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setDataCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setCompleteCallback
type: function
doc:
<comment>Description:</comment>
  Set a function to be called on task completion
  
  Use to set a function to be called when a <class>GearmanTask</class> is completed, or when
  GearmanJob::sendComplete is invoked by a worker (whichever happens first).
  
  This callback executes only when executing a <class>GearmanTask</class> using GearmanClient::runTasks. It is not
  used for individual jobs.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function to be called

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setContext
type: function
doc:
<comment>Description:</comment>
  Set application context
  
  Sets an arbitrary string to provide application context that can later be retrieved by
  GearmanClient::context.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Arbitrary context data

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * GearmanClient::context


id: GearmanClient::setCreatedCallback
type: function
doc:
<comment>Description:</comment>
  Set a callback for when a task is queued
  
  Sets a function to be called when a task is received and queued by the Gearman job server. The
  callback should accept a single argument, a <class>GearmanTask</class> object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function to call

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setData
type: function
doc:
<comment>Description:</comment>
  Set application data (deprecated)
  
  Sets some arbitrary application data that can later be retrieved by  GearmanClient::data.
  
  This method has been replaced by GearmanCient::setContext in the 0.6.0 release of the Gearman
  extension.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * GearmanClient::data


id: GearmanClient::setDataCallback
type: function
doc:
<comment>Description:</comment>
  Callback function when there is a data packet for a task
  
  Sets the callback function for accepting data packets for a task. The callback function should
  take a single argument, a <class>GearmanTask</class> object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function or method to call

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setExceptionCallback
type: function
doc:
<comment>Description:</comment>
  Set a callback for worker exceptions
  
  Specifies a function to call when a worker for a task sends an exception.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  Function to call when the worker throws an exception

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setFailCallback
type: function
doc:
<comment>Description:</comment>
  Set callback for job failure
  
  Sets the callback function to be used when a task does not complete successfully.  The function
  should accept a single argument, a <class>GearmanTask</class> object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function to call

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setOptions
type: function
doc:
<comment>Description:</comment>
  Set client options
  
  Sets one or more client options.

<comment>Param:</comment>
  <info>int</info>  <strong>$option</strong>  The options to be set

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.


id: GearmanClient::setStatusCallback
type: function
doc:
<comment>Description:</comment>
  Set a callback for collecting task status
  
  Sets a callback function used for getting updated status information from a worker.  The function
  should accept a single argument, a <class>GearmanTask</class> object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function to call

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setWarningCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setTimeout
type: function
doc:
<comment>Description:</comment>
  Set socket I/O activity timeout
  
  Sets the timeout for socket I/O activity.

<comment>Param:</comment>
  <info>int</info>  <strong>$timeout</strong>  An interval of time in milliseconds

<comment>Return:</comment>
  <info>bool</info>  Always returns <info>true</info>.


id: GearmanClient::setWarningCallback
type: function
doc:
<comment>Description:</comment>
  Set a callback for worker warnings
  
  Sets a function to be called when a worker sends a warning.  The callback should accept a single
  argument, a <class>GearmanTask</class> object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function to call

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWorkloadCallback


id: GearmanClient::setWorkloadCallback
type: function
doc:
<comment>Description:</comment>
  Set a callback for accepting incremental data updates
  
  Sets a function to be called when a worker needs to send back data prior to job completion. A
  worker can do this when it needs to send updates, send partial results, or flush data during long
  running jobs.  The callback should accept a single argument, a  <class>GearmanTask</class> object.

<comment>Param:</comment>
  <info>callable</info>  <strong>$function</strong>  A function to call

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::setDataCallback
   * GearmanClient::setCompleteCallback
   * GearmanClient::setCreatedCallback
   * GearmanClient::setExceptionCallback
   * GearmanClient::setFailCallback
   * GearmanClient::setStatusCallback
   * GearmanClient::setWarningCallback


id: GearmanClient::timeout
type: function
doc:
<comment>Description:</comment>
  Get current socket I/O activity timeout value
  
  Returns the timeout in milliseconds to wait for I/O activity.

<comment>Return:</comment>
  <info>int</info>  Timeout in milliseconds to wait for I/O activity.  A negative value means an infinite
       timeout.

<comment>See Also:</comment>
   * GearmanClient::setTimeout


id: GearmanClient::wait
type: function
doc:
<comment>Description:</comment>
  Wait for I/O activity on all connections in a client
  
  This waits for activity from any one of the connected servers.

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> on success <info>false</info> on an error.

<comment>See Also:</comment>
   * GearmanWorker::wait


id: GearmanJob::__construct
type: function
doc:
<comment>Description:</comment>
  Create a GearmanJob instance
  
  Creates a <class>GearmanJob</class> instance representing a job the worker is to complete.

<comment>Return:</comment>
  <info>unknown</info>  A <class>GearmanJob</class> object.


id: GearmanJob::complete
type: function
doc:
<comment>Description:</comment>
  Send the result and complete status (deprecated)
  
  Sends result data and the complete status update for this job.
  
  This method has been replaced by GearmanJob::sendComplete in the 0.6.0 release of the Gearman
  extension.

<comment>Param:</comment>
  <info>string</info>  <strong>$result</strong>  Serialized result data.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::sendFail
   * GearmanJob::setReturn


id: GearmanJob::data
type: function
doc:
<comment>Description:</comment>
  Send data for a running job (deprecated)
  
  Sends data to the job server (and any listening clients) for this job.
  
  This method has been replaced by GearmanJob::sendData in the 0.6.0 release of the Gearman
  extension.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Arbitrary serialized data.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::workload
   * GearmanTask::data


id: GearmanJob::exception
type: function
doc:
<comment>Description:</comment>
  Send exception for running job (deprecated)
  
  Sends the supplied exception when this job is running.
  
  This method has been replaced by GearmanJob::sendException in the 0.6.0 release of the Gearman
  extension.

<comment>Param:</comment>
  <info>string</info>  <strong>$exception</strong>  An exception description.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::setReturn
   * GearmanJob::sendStatus
   * GearmanJob::sendWarning


id: GearmanJob::fail
type: function
doc:
<comment>Description:</comment>
  Send fail status (deprecated)
  
  Sends failure status for this job, indicating that the job failed in a known way (as opposed to
  failing due to a thrown exception).
  
  This method has been replaced by GearmanJob::sendFail in the  0.6.0 release of the Gearman
  extension.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::sendException
   * GearmanJob::setReturn
   * GearmanJob::sendStatus
   * GearmanJob::sendWarning


id: GearmanJob::functionName
type: function
doc:
<comment>Description:</comment>
  Get function name
  
  Returns the function name for this job.  This is the function the work will execute to perform the
  job.

<comment>Return:</comment>
  <info>false|string</info>  The name of a function, or <info>false</info> if the job has not yet been initialized.

<comment>See Also:</comment>
   * GearmanTask::function


id: GearmanJob::handle
type: function
doc:
<comment>Description:</comment>
  Get the job handle
  
  Returns the opaque job handle assigned by the job server.

<comment>Return:</comment>
  <info>false|string</info>  An opaque job handle, or <info>false</info> if the job has not yet been initialized.

<comment>See Also:</comment>
   * GearmanTask::jobHandle


id: GearmanJob::returnCode
type: function
doc:
<comment>Description:</comment>
  Get last return code
  
  Returns the last return code issued by the job server.

<comment>Return:</comment>
  <info>int</info>  A valid Gearman return code.

<comment>See Also:</comment>
   * GearmanTask::returnCode


id: GearmanJob::sendComplete
type: function
doc:
<comment>Description:</comment>
  Send the result and complete status
  
  Sends result data and the complete status update for this job.

<comment>Param:</comment>
  <info>string</info>  <strong>$result</strong>  Serialized result data.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::sendFail
   * GearmanJob::setReturn


id: GearmanJob::sendData
type: function
doc:
<comment>Description:</comment>
  Send data for a running job
  
  Sends data to the job server (and any listening clients) for this job.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Arbitrary serialized data.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::workload
   * GearmanTask::data


id: GearmanJob::sendException
type: function
doc:
<comment>Description:</comment>
  Send exception for running job (exception)
  
  Sends the supplied exception when this job is running.

<comment>Param:</comment>
  <info>string</info>  <strong>$exception</strong>  An exception description.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::setReturn
   * GearmanJob::sendStatus
   * GearmanJob::sendWarning


id: GearmanJob::sendFail
type: function
doc:
<comment>Description:</comment>
  Send fail status
  
  Sends failure status for this job, indicating that the job failed in a known way (as opposed to
  failing due to a thrown exception).

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::sendException
   * GearmanJob::setReturn
   * GearmanJob::sendStatus
   * GearmanJob::sendWarning


id: GearmanJob::sendStatus
type: function
doc:
<comment>Description:</comment>
  Send status
  
  Sends status information to the job server and any listening clients.  Use this to specify what
  percentage of the job has been completed.

<comment>Param:</comment>
  <info>int</info>  <strong>$numerator</strong>    The numerator of the precentage completed expressed as a fraction.
  <info>int</info>  <strong>$denominator</strong>  The denominator of the precentage completed expressed as a fraction.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::jobStatus
   * GearmanTask::taskDenominator
   * GearmanTask::taskNumerator


id: GearmanJob::sendWarning
type: function
doc:
<comment>Description:</comment>
  Send a warning
  
  Sends a warning for this job while it is running.

<comment>Param:</comment>
  <info>string</info>  <strong>$warning</strong>  A warning message.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::sendComplete
   * GearmanJob::sendException
   * GearmanJob::sendFail


id: GearmanJob::setReturn
type: function
doc:
<comment>Description:</comment>
  Set a return value
  
  Sets the return value for this job, indicates how the job completed.

<comment>Param:</comment>
  <info>int</info>  <strong>$gearman_return_t</strong>  A valid Gearman return value.

<comment>Return:</comment>
  <info>bool</info>  Description...


id: GearmanJob::status
type: function
doc:
<comment>Description:</comment>
  Send status (deprecated)
  
  Sends status information to the job server and any listening clients.  Use this to specify what
  percentage of the job has been completed.
  
  This method has been replaced by GearmanJob::sendStatus in the 0.6.0 release of the Gearman
  extenstion.

<comment>Param:</comment>
  <info>int</info>  <strong>$numerator</strong>    The numerator of the precentage completed expressed as a fraction.
  <info>int</info>  <strong>$denominator</strong>  The denominator of the precentage completed expressed as a fraction.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::jobStatus
   * GearmanTask::taskDenominator
   * GearmanTask::taskNumerator


id: GearmanJob::unique
type: function
doc:
<comment>Description:</comment>
  Get the unique identifier
  
  Returns the unique identifier for this job.  The identifier is assigned by the client.

<comment>Return:</comment>
  <info>false|string</info>  An opaque unique identifier, or <info>false</info> if the job has not yet been initialized.

<comment>See Also:</comment>
   * GearmanClient::do
   * GearmanTask::uuid


id: GearmanJob::warning
type: function
doc:
<comment>Description:</comment>
  Send a warning (deprecated)
  
  Sends a warning for this job while it is running.
  
  This method has been replaced by GearmanJob::sendWarning in the 0.6.0 release of the Gearman
  extension.

<comment>Param:</comment>
  <info>string</info>  <strong>$warning</strong>  A warning messages.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanJob::sendComplete
   * GearmanJob::sendException
   * GearmanJob::sendFail


id: GearmanJob::workload
type: function
doc:
<comment>Description:</comment>
  Get workload
  
  Returns the workload for the job.  This is serialized data that is to be processed by the worker.

<comment>Return:</comment>
  <info>string</info>  Serialized data.

<comment>See Also:</comment>
   * GearmanClient::do
   * GearmanJob::workloadSize


id: GearmanJob::workloadSize
type: function
doc:
<comment>Description:</comment>
  Get size of work load
  
  Returns the size of the job's work load (the data the worker is to process) in bytes.

<comment>Return:</comment>
  <info>int</info>  The size in bytes.

<comment>See Also:</comment>
   * GearmanJob::workload


id: GearmanTask::__construct
type: function
doc:
<comment>Description:</comment>
  Create a GearmanTask instance
  
  Creates a <class>GearmanTask</class> instance representing a task to be submitted to a job server.

<comment>Return:</comment>
  <info>unknown</info>  A <class>GearmanTask</class> object.


id: GearmanTask::create
type: function
doc:
<comment>Description:</comment>
  Create a task (deprecated)
  
  Returns a new <class>GearmanTask</class> object.
  
  This method was removed in the 0.6.0 version of the Gearman extension.

<comment>Return:</comment>
  <info>GearmanTask|false</info>  A <class>GearmanTask</class> oject ou <info>false</info> em caso de falha.


id: GearmanTask::data
type: function
doc:
<comment>Description:</comment>
  Get data returned for a task
  
  Returns data being returned for a task by a worker.

<comment>Return:</comment>
  <info>false|string</info>  The serialized data, or <info>false</info> if no data is present.

<comment>See Also:</comment>
   * GearmanTask::dataSize


id: GearmanTask::dataSize
type: function
doc:
<comment>Description:</comment>
  Get the size of returned data
  
  Returns the size of the data being returned for a task.

<comment>Return:</comment>
  <info>int|false</info>  The data size, or <info>false</info> if there is no data.

<comment>See Also:</comment>
   * GearmanTask::data


id: GearmanTask::function
type: function
doc:
<comment>Description:</comment>
  Get associated function name (deprecated)
  
  Returns the name of the function this task is associated with, i.e., the function the Gearman
  worker calls.
  
  This method has been replaced by GearmanTask::functionName in the 0.6.0 release of the Gearman
  extension.

<comment>Return:</comment>
  <info>string</info>  A function name.


id: GearmanTask::functionName
type: function
doc:
<comment>Description:</comment>
  Get associated function name
  
  Returns the name of the function this task is associated with, i.e., the function the Gearman
  worker calls.

<comment>Return:</comment>
  <info>false|string</info>  A function name, or <info>false</info> if the task has not yet been created.


id: GearmanTask::isKnown
type: function
doc:
<comment>Description:</comment>
  Determine if task is known
  
  Gets the status information for whether or not this task is known to the job server.

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> if the task is known, <info>false</info> otherwise.


id: GearmanTask::isRunning
type: function
doc:
<comment>Description:</comment>
  Test whether the task is currently running
  
  Indicates whether or not this task is currently running.

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> if the task is running, <info>false</info> otherwise.


id: GearmanTask::jobHandle
type: function
doc:
<comment>Description:</comment>
  Get the job handle
  
  Returns the job handle for this task.

<comment>Return:</comment>
  <info>false|string</info>  The opaque job handle, or <info>false</info> if the task has not yet been created.

<comment>See Also:</comment>
   * GearmanClient::doJobHandle


id: GearmanTask::recvData
type: function
doc:
<comment>Description:</comment>
  Read work or result data into a buffer for a task
  
  Esta função é
  EXPERIMENTAL. O comportamento desta função, seu nome e
  documentação poderão mudar sem aviso prévio em futuras versões do PHP.
  Use por sua conta e risco.

<comment>Param:</comment>
  <info>int</info>  <strong>$data_len</strong>  Length of data to be read.

<comment>Return:</comment>
  <info>false|array</info>  An array whose first element is the length of data read and the second is the data
               buffer. Returns <info>false</info> if the read failed.

<comment>See Also:</comment>
   * GearmanTask::sendData


id: GearmanTask::returnCode
type: function
doc:
<comment>Description:</comment>
  Get the last return code
  
  Returns the last Gearman return code for this task.

<comment>Return:</comment>
  <info>int</info>  A valid Gearman return code.

<comment>See Also:</comment>
   * GearmanClient::returnCode


id: GearmanTask::sendData
type: function
doc:
<comment>Description:</comment>
  Send data for a task (deprecated)
  
  Esta função é
  EXPERIMENTAL. O comportamento desta função, seu nome e
  documentação poderão mudar sem aviso prévio em futuras versões do PHP.
  Use por sua conta e risco.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Data to send to the worker.

<comment>Return:</comment>
  <info>int</info>  The length of data sent, or <info>false</info> if the send failed.

<comment>See Also:</comment>
   * GearmanTask::recvData


id: GearmanTask::sendWorkload
type: function
doc:
<comment>Description:</comment>
  Send data for a task
  
  Esta função é
  EXPERIMENTAL. O comportamento desta função, seu nome e
  documentação poderão mudar sem aviso prévio em futuras versões do PHP.
  Use por sua conta e risco.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Data to send to the worker.

<comment>Return:</comment>
  <info>int|false</info>  The length of data sent, or <info>false</info> if the send failed.

<comment>See Also:</comment>
   * GearmanTask::recvData


id: GearmanTask::taskDenominator
type: function
doc:
<comment>Description:</comment>
  Get completion percentage denominator
  
  Returns the denominator of the percentage of the task that is complete expressed as a fraction.

<comment>Return:</comment>
  <info>false|int</info>  A number between 0 and 100, or <info>false</info> if cannot be determined.

<comment>See Also:</comment>
   * GearmanTask::taskNumerator


id: GearmanTask::taskNumerator
type: function
doc:
<comment>Description:</comment>
  Get completion percentage numerator
  
  Returns the numerator of the percentage of the task that is complete expressed as a fraction.

<comment>Return:</comment>
  <info>false|int</info>  A number between 0 and 100, or <info>false</info> if cannot be determined.

<comment>See Also:</comment>
   * GearmanTask::taskDenominator


id: GearmanTask::unique
type: function
doc:
<comment>Description:</comment>
  Get the unique identifier for a task
  
  Returns the unique identifier for this task.  This is assigned by the <class>GearmanClient</class>, as opposed to
  the job handle which is set by the Gearman job server.

<comment>Return:</comment>
  <info>false|string</info>  The unique identifier, or <info>false</info> if no identifier is assigned.

<comment>See Also:</comment>
   * GearmanClient::do
   * GearmanClient::addTask


id: GearmanTask::uuid
type: function
doc:
<comment>Description:</comment>
  Get the unique identifier for a task (deprecated)
  
  Returns the unique identifier for this task.  This is assigned by the <class>GearmanClient</class>, as opposed to
  the job handle which is set by the Gearman job server.
  
  This method has been replaced by GearmanTask::unique in the 0.6.0 release of the Gearman
  extension.

<comment>Return:</comment>
  <info>string</info>  The unique identifier, or <info>false</info> if no identifier is assigned.

<comment>See Also:</comment>
   * GearmanClient::do
   * GearmanClient::addTask


id: GearmanWorker::__construct
type: function
doc:
<comment>Description:</comment>
  Create a GearmanWorker instance
  
  Creates a <class>GearmanWorker</class> instance representing a worker that connects to the job server and accepts
  tasks to run.

<comment>Return:</comment>
  <info>unknown</info>  A <class>GearmanWorker</class> object

<comment>See Also:</comment>
   * GearmanWorker::clone


id: GearmanWorker::addFunction
type: function
doc:
<comment>Description:</comment>
  Register and add callback function
  
  Registers a function name with the job server and specifies a callback corresponding to that
  function.  Optionally specify extra application context data to be used when the callback is
  called and a timeout.

<comment>Param:</comment>
  <info>string</info>    <strong>$function_name</strong>  The name of a function to register with the job server
  <info>callable</info>  <strong>$function</strong>       A callback that gets called when a job for the registered function name
                            is submitted
  <info>mixed</info>     <strong>$context</strong>        A reference to arbitrary application context data that can be modified
                            by the worker function
  <info>int</info>       <strong>$timeout</strong>        An interval of time in seconds

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanClient::do


id: GearmanWorker::addOptions
type: function
doc:
<comment>Description:</comment>
  Add worker options
  
  Adds one or more options to the options previously set.

<comment>Param:</comment>
  <info>int</info>  <strong>$option</strong>  The options to be added

<comment>Return:</comment>
  <info>true</info>  Sempre retorna <info>true</info>.

<comment>See Also:</comment>
   * GearmanWorker::options
   * GearmanClient::setOptions
   * GearmanClient::removeOptions


id: GearmanWorker::addServer
type: function
doc:
<comment>Description:</comment>
  Add a job server
  
  Adds a job server to this worker.  This goes into a list of servers than can be used to run jobs.
  No socket I/O happens here.

<comment>Param:</comment>
  <info>string</info>  <strong>$host</strong>  O nome do servidor de trabalho.
  <info>int</info>     <strong>$port</strong>  A porta do servidor de trabalho.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanWorker::addServers


id: GearmanWorker::addServers
type: function
doc:
<comment>Description:</comment>
  Add job servers
  
  Adds one or more job servers to this worker.  These go into a list of servers that can be used to
  run jobs.  No socket I/O happens here.

<comment>Param:</comment>
  <info>string</info>  <strong>$servers</strong>  A comma separated list of job servers in the format host:port. If no port is
                    specified, it defaults to 4730.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanWorker::addServer


id: GearmanWorker::clone
type: function
doc:
<comment>Description:</comment>
  Create a copy of the worker
  
  Creates a copy of the worker.

<comment>Return:</comment>
  <info>void</info>  A <class>GearmanWorker</class> object


id: GearmanWorker::echo
type: function
doc:
<comment>Description:</comment>
  Test job server response
  
  Sends data to all job servers to see if they echo it back.  This is a test function to see if job
  servers are responding properly.

<comment>Param:</comment>
  <info>string</info>  <strong>$workload</strong>  Arbitrary serialized data

<comment>Return:</comment>
  <info>bool</info>  Standard Gearman return value.

<comment>See Also:</comment>
   * GearmanClient::echo


id: GearmanWorker::error
type: function
doc:
<comment>Description:</comment>
  Get the last error encountered
  
  Returns an error string for the last error encountered.

<comment>Return:</comment>
  <info>string|false</info>  A human readable error string, or <info>false</info> if there is no error message available.

<comment>See Also:</comment>
   * GearmanWorker::getErrno


id: GearmanWorker::getErrno
type: function
doc:
<comment>Description:</comment>
  Get errno
  
  Returns the value of errno in the case of a GEARMAN_ERRNO return value.

<comment>Return:</comment>
  <info>int</info>  A valid errno.

<comment>See Also:</comment>
   * GearmanWorker::error


id: GearmanWorker::options
type: function
doc:
<comment>Description:</comment>
  Get worker options
  
  Gets the options previously set for the worker.

<comment>Return:</comment>
  <info>int</info>  The options currently set for the worker.

<comment>See Also:</comment>
   * GearmanWorker::setOptions


id: GearmanWorker::register
type: function
doc:
<comment>Description:</comment>
  Register a function with the job server
  
  Registers a function name with the job server with an optional timeout.  The timeout specifies how
  many seconds the server will wait before marking a job as failed. If the timeout is set to zero,
  there is no timeout.

<comment>Param:</comment>
  <info>string</info>  <strong>$function_name</strong>  The name of a function to register with the job server
  <info>int</info>     <strong>$timeout</strong>        An interval of time in seconds

<comment>Return:</comment>
  <info>bool</info>  A standard Gearman return value.

<comment>See Also:</comment>
   * GearmanWorker::unregister
   * GearmanWorker::unregisterAll


id: GearmanWorker::removeOptions
type: function
doc:
<comment>Description:</comment>
  Remove worker options
  
  Removes (unsets) one or more worker options.

<comment>Param:</comment>
  <info>int</info>  <strong>$option</strong>  The options to be removed (unset)

<comment>Return:</comment>
  <info>true</info>  Sempre retorna <info>true</info>.

<comment>See Also:</comment>
   * GearmanWorker::options
   * GearmanWorker::setOptions
   * GearmanWorker::addOptions


id: GearmanWorker::returnCode
type: function
doc:
<comment>Description:</comment>
  Get last Gearman return code
  
  Returns the last Gearman return code.

<comment>Return:</comment>
  <info>int</info>  A valid Gearman return code.

<comment>See Also:</comment>
   * GearmanWorker::error
   * GearmanWorker::getErrno


id: GearmanWorker::setId
type: function
doc:
<comment>Description:</comment>
  Give the worker an identifier so it can be tracked when asking gearmand for the list of available
  workers
  
  Assigns the worker an identifier.

<comment>Param:</comment>
  <info>string</info>  <strong>$id</strong>  A string identifier.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: GearmanWorker::setOptions
type: function
doc:
<comment>Description:</comment>
  Set worker options
  
  Sets one or more options to the supplied value.

<comment>Param:</comment>
  <info>int</info>  <strong>$option</strong>  The options to be set

<comment>Return:</comment>
  <info>true</info>  Sempre retorna <info>true</info>.

<comment>See Also:</comment>
   * GearmanWorker::options
   * GearmanWorker::addOptions
   * GearmanWorker::removeOptions
   * GearmanClient::setOptions


id: GearmanWorker::setTimeout
type: function
doc:
<comment>Description:</comment>
  Set socket I/O activity timeout
  
  Sets the interval of time to wait for socket I/O activity.

<comment>Param:</comment>
  <info>int</info>  <strong>$timeout</strong>  An interval of time in milliseconds.  A negative value indicates an infinite
                 timeout.

<comment>Return:</comment>
  <info>true</info>  Sempre retorna <info>true</info>.

<comment>See Also:</comment>
   * GearmanWorker::timeout


id: GearmanWorker::timeout
type: function
doc:
<comment>Description:</comment>
  Get socket I/O activity timeout
  
  Returns the current time to wait, in milliseconds, for socket I/O activity.

<comment>Return:</comment>
  <info>int</info>  A time period is milliseconds.  A negative value indicates an infinite timeout.

<comment>See Also:</comment>
   * GearmanWorker::setTimeout


id: GearmanWorker::unregister
type: function
doc:
<comment>Description:</comment>
  Unregister a function name with the job servers
  
  Unregisters a function name with the job servers ensuring that no more jobs (for that function)
  are sent to this worker.

<comment>Param:</comment>
  <info>string</info>  <strong>$function_name</strong>  The name of a function to register with the job server

<comment>Return:</comment>
  <info>bool</info>  A standard Gearman return value.

<comment>See Also:</comment>
   * GearmanWorker::register
   * GearmanWorker::unregisterAll


id: GearmanWorker::unregisterAll
type: function
doc:
<comment>Description:</comment>
  Unregister all function names with the job servers
  
  Unregisters all previously registered functions, ensuring that no more jobs are sent to this
  worker.

<comment>Return:</comment>
  <info>bool</info>  A standard Gearman return value.

<comment>See Also:</comment>
   * GearmanWorker::register
   * GearmanWorker::unregister


id: GearmanWorker::wait
type: function
doc:
<comment>Description:</comment>
  Wait for activity from one of the job servers
  
  Causes the worker to wait for activity from one of the Gearman job servers when operating in
  non-blocking I/O mode.  On failure, issues a <info>E_WARNING</info> with the last Gearman error encountered.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanWorker::work


id: GearmanWorker::work
type: function
doc:
<comment>Description:</comment>
  Wait for and perform jobs
  
  Waits for a job to be assigned and then calls the appropriate callback function. Issues an
  <info>E_WARNING</info> with the last Gearman error if the return code is not one of <info>GEARMAN_SUCCESS</info>,
  <info>GEARMAN_IO_WAIT</info>, or <info>GEARMAN_WORK_FAIL</info>.

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.

<comment>See Also:</comment>
   * GearmanWorker::addFunction


id: Gender\Gender::__construct
type: function
doc:
<comment>Description:</comment>
  Construct the Gender object
  
  Create a Gender object optionally connecting to an external name dictionary. When no external
  database was given, compiled in data will be used.

<comment>Param:</comment>
  <info>string</info>  <strong>$dsn</strong>  DSN to open.


id: Gender\Gender::connect
type: function
doc:
<comment>Description:</comment>
  Connect to an external name dictionary
  
  Connect to an external name dictionary. Currently only streams are supported.

<comment>Param:</comment>
  <info>string</info>  <strong>$dsn</strong>  DSN to open.

<comment>Return:</comment>
  <info>bool</info>  Boolean as success of failure.


id: Gender\Gender::country
type: function
doc:
<comment>Description:</comment>
  Get textual country representation
  
  Returns the textual representation of a country from a Gender class constant.

<comment>Param:</comment>
  <info>int</info>  <strong>$country</strong>  A country ID specified by a <class>Gender\Gender</class> class constant.

<comment>Return:</comment>
  <info>array|false</info>  Returns an array with the short and full names of the country on success ou <info>false</info> em
               caso de falha.


id: Gender\Gender::get
type: function
doc:
<comment>Description:</comment>
  Get gender of a name
  
  Get the gender of the name in a particular country.

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>     Name to check.
  <info>int</info>     <strong>$country</strong>  Country id identified by Gender class constant.

<comment>Return:</comment>
  <info>int</info>  Returns gender of the name.


id: Gender\Gender::isNick
type: function
doc:
<comment>Description:</comment>
  Check if the name0 is an alias of the name1
  
  Check whether the name0 is a nick of the name1.

<comment>Param:</comment>
  <info>string</info>  <strong>$name0</strong>    Name to check.
  <info>string</info>  <strong>$name1</strong>    Name to check.
  <info>int</info>     <strong>$country</strong>  Country id identified by Gender class constant. If ommited ANY_COUNTRY is used.

<comment>Return:</comment>
  <info>array</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: Gender\Gender::similarNames
type: function
doc:
<comment>Description:</comment>
  Get similar names
  
  Get similar names for the given name and country.

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>     Name to check.
  <info>int</info>     <strong>$country</strong>  Country id identified by Gender class constant. If ommited ANY_COUNTRY is used.

<comment>Return:</comment>
  <info>array</info>  Returns an array with the similar names found.


id: Generator
type: class
doc:
<comment>Description:</comment>
  Os objetos <class>Generator</class>são retornados por geradores.
  
  Os objetos <class>Generator</class> não podem ser instanciados através do construtor new.


id: Generator::__wakeup
type: function
doc:
<comment>Description:</comment>
  Serializa o gerador (sempre falha)
  
  Lança uma exceção, já que geradores não podem ser serializados.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Generator::current
type: function
doc:
<comment>Description:</comment>
  Obtém o valor gerado

<comment>Return:</comment>
  <info>mixed</info>  Retorna o valor gerado.


id: Generator::getReturn
type: function
doc:
<comment>Description:</comment>
  Obtém o valor de retorno de um gerador

<comment>Return:</comment>
  <info>mixed</info>  Retorna o valor de retorno de um gerador, assim que finalizada sua execução.


id: Generator::key
type: function
doc:
<comment>Description:</comment>
  Obtém o chave gerada
  
  Obtém a chave do valor gerado.

<comment>Return:</comment>
  <info>mixed</info>  Retorna a chave gerada.


id: Generator::next
type: function
doc:
<comment>Description:</comment>
  Continua a execução do gerador
  
  Chamar Generator::next tem o mesmo efeito que chamar Generator::send com o argumento <info>null</info>.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Generator::rewind
type: function
doc:
<comment>Description:</comment>
  Reinicia o iterador
  
  Se uma iteração já tiver sido inicializada, lançará uma exceção.

<comment>Return:</comment>
  <info>void</info>  Nenhum valor é retornado.


id: Generator::send
type: function
doc:
<comment>Description:</comment>
  Envia um valor ao gerador
  
  Envia o valor informado ao gerador como resultado da expressão yield corrente e retorna a execução
  do gerador.
  
  Se o gerador não estiver na expressão yield quando o método for chamado, primeiro será deixado
  avançar para a primeira expressão yield antes de enviar o valor. Assim como não é necessário
  "forçar" os geradores do PHP com uma chamada ao método Generator::next (como é feito em Python).

<comment>Param:</comment>
  <info>mixed</info>  <strong>$value</strong>  Valor a ser enviado ao gerador. Este valor será o retornado pela expressão yield em
                 que o gerador estiver.

<comment>Return:</comment>
  <info>mixed</info>  Retorna o valor gerado.


id: Generator::throw
type: function
doc:
<comment>Description:</comment>
  Lança uma exceção no gerador
  
  Lança uma exceção no gerador e retorna a execução do gerador. O comportamento será o mesmo como se
  a expressão yield corrente fosse substituída por uma declaração <return>throw $exception</return>.
  
  Se o gerador já tiver sido fechado ao invocar este método, a exceção será lançada no contexto
  daquele que o chamou.

<comment>Param:</comment>
  <info>Throwable</info>  <strong>$exception</strong>  Exceção a ser lançada no gerador.

<comment>Return:</comment>
  <info>mixed</info>  Retorna o valor gerado.


id: Generator::valid
type: function
doc:
<comment>Description:</comment>
  Verifica se o gerador está ativo

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>false</info> se o gerador foi fechado. Caso contrário retornará <info>true</info>.


id: GlobIterator
type: class
doc:
<comment>Description:</comment>
  Iterates through a file system in a similar fashion to  <strong>glob()</strong>.


id: GlobIterator::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a directory using glob
  
  Constructs a new directory iterator from a glob expression.

<comment>Param:</comment>
  <info>string</info>  <strong>$pattern</strong>  A <strong>glob()</strong> pattern.
  <info>int</info>     <strong>$flags</strong>    Option flags, the flags may be a bitmask of the  <class>FilesystemIterator</class> constants.

<comment>See Also:</comment>
   * DirectoryIterator::__construct
   * GlobIterator::count
   * <strong>glob()</strong>


id: GlobIterator::count
type: function
doc:
<comment>Description:</comment>
  Get the number of directories and files
  
  Gets the number of directories and files found by the glob expression.

<comment>Return:</comment>
  <info>int</info>  The number of returned directories and files, as an <info>int</info>.

<comment>See Also:</comment>
   * GlobIterator::__construct
   * <strong>count()</strong>
   * <strong>glob()</strong>


id: Gmagick::COMPOSITE_ATOP
type: constant
doc:
<comment>Description:</comment>
  The result is the same shape as image, with composite image obscuring image where the image shapes
  overlap


id: Gmagick::COMPOSITE_BUMPMAP
type: constant
doc:
<comment>Description:</comment>
  The same as COMPOSITE_MULTIPLY, except the source is converted to grayscale first.


id: Gmagick::COMPOSITE_DIFFERENCE
type: constant
doc:
<comment>Description:</comment>
  Subtracts the darker of the two constituent colors from the lighter


id: Gmagick::COMPOSITE_DSTATOP
type: constant
doc:
<comment>Description:</comment>
  The part of the destination lying inside of the source is composited over the source and replaces
  the destination


id: Gmagick::COMPOSITE_EXCLUSION
type: constant
doc:
<comment>Description:</comment>
  Produces an effect similar to that of Gmagick::COMPOSITE_DIFFERENCE, but appears as lower contrast


id: Gmagick::COMPOSITE_HARDLIGHT
type: constant
doc:
<comment>Description:</comment>
  Multiplies or screens the colors, dependent on the source color value


id: Gmagick::COMPOSITE_MODULATE
type: constant
doc:
<comment>Description:</comment>
  Modulates the target brightness, saturation and hue as defined by source


id: Gmagick::COMPOSITE_SCREEN
type: constant
doc:
<comment>Description:</comment>
  The source and destination are complemented and then multiplied and then replace the destination


id: Gmagick::COMPOSITE_SRCATOP
type: constant
doc:
<comment>Description:</comment>
  The part of the source lying inside of the destination is composited onto the destination


id: Gmagick::COMPOSITE_SRCIN
type: constant
doc:
<comment>Description:</comment>
  The part of the source lying inside of the destination replaces the destination


id: Gmagick::COMPOSITE_SRCOUT
type: constant
doc:
<comment>Description:</comment>
  The part of the source lying outside of the destination replaces the destination


id: Gmagick::COMPOSITE_SUBTRACT
type: constant
doc:
<comment>Description:</comment>
  Subtract the colors in the source image from the destination image


id: Gmagick::COMPOSITE_THRESHOLD
type: constant
doc:
<comment>Description:</comment>
  The source is composited on the target as defined by source threshold


id: Gmagick::COMPOSITE_XOR
type: constant
doc:
<comment>Description:</comment>
  The part of the source that lies outside of the destination is combined with the part of the
  destination that lies outside of the source


id: Gmagick::__construct
type: function
doc:
<comment>Description:</comment>
  The Gmagick constructor
  
  The <class>Gmagick</class> constructor.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  The path to an image to load or array of paths.


id: Gmagick::addimage
type: function
doc:
<comment>Description:</comment>
  Adds new image to Gmagick object image list
  
  Adds new image to Gmagick object from the current position of the source object. After the
  operation iterator position is moved at the end of the list.

<comment>Param:</comment>
  <info>Gmagick</info>  <strong>$source</strong>  The source Gmagick object

<comment>Return:</comment>
  <info>Gmagick</info>  The Gmagick object with image added


id: Gmagick::addnoiseimage
type: function
doc:
<comment>Description:</comment>
  Adds random noise to the image
  
  Adds random noise to the image.

<comment>Param:</comment>
  <info>int</info>  <strong>$noise_type</strong>  The type of the noise. Refer to this list of noise constants.

<comment>Return:</comment>
  <info>Gmagick</info>  The Gmagick object with noise added.


id: Gmagick::annotateimage
type: function
doc:
<comment>Description:</comment>
  Annotates an image with text
  
  Annotates an image with text.

<comment>Param:</comment>
  <info>GmagickDraw</info>  <strong>$GmagickDraw</strong>  The <class>GmagickDraw</class> object that contains settings for drawing the text.
  <info>float</info>        <strong>$x</strong>            Horizontal offset in pixels to the left of text.
  <info>float</info>        <strong>$y</strong>            Vertical offset in pixels to the baseline of text.
  <info>float</info>        <strong>$angle</strong>        The angle at which to write the text.
  <info>string</info>       <strong>$text</strong>         The string to draw.

<comment>Return:</comment>
  <info>Gmagick</info>  The <class>Gmagick</class> object with annotation made.


id: Gmagick::blurimage
type: function
doc:
<comment>Description:</comment>
  Adds blur filter to image
  
  Adds blur filter to image.

<comment>Param:</comment>
  <info>float</info>  <strong>$radius</strong>  Blur radius
  <info>float</info>  <strong>$sigma</strong>   Standard deviation

<comment>Return:</comment>
  <info>Gmagick</info>  The blurred <class>Gmagick</class> object


id: Gmagick::borderimage
type: function
doc:
<comment>Description:</comment>
  Surrounds the image with a border
  
  Surrounds the image with a border of the color defined by the bordercolor <class>GmagickPixel</class> object or a
  color string.

<comment>Param:</comment>
  <info>GmagickPixel</info>  <strong>$color</strong>   <class>GmagickPixel</class> object or a string containing the border color.
  <info>int</info>           <strong>$width</strong>   Border width.
  <info>int</info>           <strong>$height</strong>  Border height.

<comment>Return:</comment>
  <info>Gmagick</info>  The <class>Gmagick</class> object with border defined.


id: Gmagick::charcoalimage
type: function
doc:
<comment>Description:</comment>
  Simulates a charcoal drawing
  
  Simulates a charcoal drawing.

<comment>Param:</comment>
  <info>float</info>  <strong>$radius</strong>  The radius of the Gaussian, in pixels, not counting the center pixel.
  <info>float</info>  <strong>$sigma</strong>   The standard deviation of the Gaussian, in pixels.

<comment>Return:</comment>
  <info>Gmagick</info>  The <class>Gmagick</class> object with charcoal simulation.


id: Gmagick::chopimage
type: function
doc:
<comment>Description:</comment>
  Removes a region of an image and trims
  
  Removes a region of an image and collapses the image to occupy the removed portion.

<comment>Param:</comment>
  <info>int</info>  <strong>$width</strong>   Width of the chopped area.
  <info>int</info>  <strong>$height</strong>  Height of the chopped area.
  <info>int</info>  <strong>$x</strong>       X origo of the chopped area.
  <info>int</info>  <strong>$y</strong>       Y origo of the chopped area.

<comment>Return:</comment>
  <info>Gmagick</info>  The chopped <class>Gmagick</class> object.


id: Gmagick::clear
type: function
doc:
<comment>Description:</comment>
  Clears all resources associated to Gmagick object
  
  Clears all resources associated to <class>Gmagick</class> object.

<comment>Return:</comment>
  <info>Gmagick</info>  The cleared <class>Gmagick</class> object.


id: Gmagick::commentimage
type: function
doc:
<comment>Description:</comment>
  Adds a comment to your image
  
  Adds a comment to your image.

<comment>Param:</comment>
  <info>string</info>  <strong>$comment</strong>  The comment to add.

<comment>Return:</comment>
  <info>Gmagick</info>  The <class>Gmagick</class> object with comment added.


id: Gmagick::compositeimage
type: function
doc:
<comment>Description:</comment>
  Composite one image onto another
  
  Composite one image onto another at the specified offset.

<comment>Param:</comment>
  <info>Gmagick</info>  <strong>$source</strong>   <class>Gmagick</class> object which holds the composite image.
  <info></info>         <strong>$compose</strong>  Composite operator.
  <info>int</info>      <strong>$x</strong>        The column offset of the composited image.
  <info>int</info>      <strong>$y</strong>        The row offset of the composited image.

<comment>Return:</comment>
  <info>Gmagick</info>  The <class>Gmagick</class> object with compositions.


id: Gmagick::cropimage
type: function
doc:
<comment>Description:</comment>
  Extracts a region of the image
  
  Extracts a region of the image.

<comment>Param:</comment>
  <info>int</info>  <strong>$width</strong>   The width of the crop.
  <info>int</info>  <strong>$height</strong>  The height of the crop.
  <info>int</info>  <strong>$x</strong>       The X coordinate of the cropped region's top left corner.
  <info>int</info>  <strong>$y</strong>       The Y coordinate of the cropped region's top left corner.

<comment>Return:</comment>
  <info>Gmagick</info>  The cropped <class>Gmagick</class> object.


id: Gmagick::cropthumbnailimage
type: function
doc:
<comment>Description:</comment>
  Creates a crop thumbnail
  
  Creates a fixed size thumbnail by first scaling the image down and cropping a specified area from
  the center.

<comment>Param:</comment>
  <info>int</info>  <strong>$width</strong>   The width of the thumbnail.
  <info>int</info>  <strong>$height</strong>  The Height of the thumbnail.

<comment>Return:</comment>
  <info>Gmagick</info>  The cropped <class>Gmagick</class> object.


id: Gmagick::current
type: function
doc:
<comment>Description:</comment>
  The current purpose
  
  Returns reference to the current gmagick object with image pointer at the correct sequence.

<comment>Return:</comment>
  <info>Gmagick</info>  Returns self on success.


id: Gmagick::cyclecolormapimage
type: function
doc:
<comment>Description:</comment>
  Displaces an image's colormap
  
  Displaces an image's colormap by a given number of positions. If you cycle the colormap a number
  of times you can
  produce a psychedelic effect.

<comment>Param:</comment>
  <info>int</info>  <strong>$displace</strong>  The amount to displace the colormap.

<comment>Return:</comment>
  <info>Gmagick</info>  Returns self on success.


id: Gmagick::deconstructimages
type: function
doc:
<comment>Description:</comment>
  Returns certain pixel differences between images
  
  Compares each image with the next in a sequence and returns the maximum bounding region of any
  pixel differences it discovers.

<comment>Return:</comment>
  <info>Gmagick</info>  Returns a new <class>Gmagick</class> object.


id: Gmagick::despeckleimage
type: function
doc:
<comment>Description:</comment>
  The despeckleimage purpose
  
  Reduces the speckle noise in an image while preserving the edges of the original image.

<comment>Return:</comment>
  <info>Gmagick</info>  The despeckled <class>Gmagick</class> object.


id: Gmagick::destroy
type: function
doc:
<comment>Description:</comment>
  The destroy purpose
  
  Destroys the <class>Gmagick</class> object and frees all resources associated with it

<comment>Return:</comment>
  <info>bool</info>  Retorna <info>true</info> em caso de sucesso ou <info>false</info> em caso de falha.


id: Gmagick::drawimage
type: function
doc:
<comment>Description:</comment>
  Renders the GmagickDraw object on the current image
  
  Renders the <class>GmagickDraw</class> object on the current image.

<comment>Param:</comment>
  <info>GmagickDraw</info>  <strong>$GmagickDraw</strong>  The drawing operations to render on the image.

<comment>Return:</comment>
  <info>Gmagick</info>  The drawn <class>Gmagick</class> object.


id: Gmagick::edgeimage
type: function
doc:
<comment>Description:</comment>
  Enhance edges within the image
  
  Enhance edges within the image with a convolution filter of the given radius. Use radius 0 and it
  will be auto-selected.

<comment>Param:</comment>
  <info>float</info>  <strong>$radius</strong>  The radius of the operation.

<comment>Return:</comment>
  <info>Gmagick</info>  The <class>Gmagick</class> object with edges enhanced.


id: Gmagick::embossimage
type: function
doc:
<comment>Description:</comment>
  Returns a grayscale image with a three-dimensional effect
  
  Returns a grayscale image with a three-dimensional effect. We convolve the image with a Gaussian
  operator of the given radius and standard deviation (sigma). For reasonable results, radius should
  be larger than sigma. Use a radius of 0 and it will choose a suitable radius for you.

<comment>Param:</comment>
  <info>float</info>  <strong>$radius</strong>  The radius of the effect.
  <info>float</info>  <strong>$sigma</strong>   The sigma of the effect.

<comment>Return:</comment>
  <info>Gmagick</info>  The embossed <class>Gmagick</class> object.


id: Gmagick::enhanceimage
type: function
doc:
<comment>Description:</comment>
  Improves the quality of a noisy image
  
  Applies a digital filter that improves the quality of a noisy image.

<comment>Return:</comment>
  <info>Gmagick</info>  The enhanced <class>Gmagick</class> object.


id: Gmagick::equalizeimage
type: function
doc:
<comment>Description:</comment>
  Equalizes the image histogram
  
  Equalizes the image histogram.

<comment>Return:</comment>
  <info>Gmagick</info>  The equalized <class>Gmagick</class> object.


id: Gmagick::flipimage
type: function
doc:
<comment>Description:</comment>
  Creates a vertical mirror image
  
  Creates a vertical mirror image by reflecting the pixels around the central x-axis.

<comment>Return:</comment>
  <info>Gmagick</info>  The flipped <class>Gmagick</class> object.

<comment>See Also:</comment>
   * <strong>Gmagick::flopimage()</strong>


id: Gmagick::flopimage
type: function
doc:
<comment>Description:</comment>
  Creates a horizontal mirror image
  
  Creates a horizontal mirror image by reflecting the pixels around the central y-axis.

<comment>Return:</comment>
  <info>Gmagick</info>  The flopped <class>Gmagick</class> object.

<comment>See Also:</comment>
   * <strong>Gmagick::flipimage()</strong>


id: Gmagick::frameimage
type: function
doc:
<comment>Description:</comment>
  Adds a simulated three-dimensional border
  
  Adds a simulated three-dimensional border around the image. The width and height specify the
  border width of the vertical and horizontal sides of the frame. The inner and outer bevels
  indicate the width of the inner and outer shadows of the frame.

<comment>Param:</comment>
  <info>GmagickPixel</info>  <strong>$color</strong>        <class>GmagickPixel</class> object or a float representing the matte color.
  <info>int</info>           <strong>$width</strong>        The width of the border.
  <info>int</info>           <strong>$height</strong>       The height of the border.
  <info>int</info>           <strong>$inner_bevel</strong>  The inner bevel width.
  <info>int</info>           <strong>$outer_bevel</strong>  The outer bevel width.

<comment>Return:</comment>
  <info>Gmagick</info>  The framed <class>Gmagick</class> object.


id: Gmagick::gammaimage
type: function
doc:
<comment>Description:</comment>
  Gamma-corrects an image
  
  Gamma-corrects an image. The same image viewed on different devices will have perceptual
  differences in the way the image's intensities are represented on the screen. Specify individual
  gamma levels for the red, green, and blue channels, or adjust all three with the gamma parameter.
  Values typically range from 0.8 to 2.3.

<comment>Param:</comment>
  <info>float</info>  <strong>$gamma</strong>  The amount of gamma-correction.

<comment>Return:</comment>
  <info>Gmagick</info>  The gamma corrected <class>Gmagick</class> object.


id: Gmagick::getcopyright
type: function
doc:
<comment>Description:</comment>
  Returns the GraphicsMagick API copyright as a string
  
  Returns the GraphicsMagick API copyright as a string.

<comment>Return:</comment>
  <info>string</info>  Returns a string containing the copyright notice of GraphicsMagick and Magickwand C API.


id: Gmagick::getfilename
type: function
doc:
<comment>Description:</comment>
  The filename associated with an image sequence
  
  Returns the filename associated with an image sequence.

<comment>Return:</comment>
  <info>string</info>  Returns a string on success.


id: Gmagick::getimagebackgroundcolor
type: function
doc:
<comment>Description:</comment>
  Returns the image background color
  
  Returns the image background color.

<comment>Return:</comment>
  <info>GmagickPixel</info>  Returns an GmagickPixel set to the background color of the image.


id: Gmagick::getimageblueprimary
type: function
doc:
<comment>Description:</comment>
  Returns the chromaticy blue primary point
  
  Returns the chromaticity blue primary point for the image.

<comment>Param:</comment>
  <info></info>  <strong>$x</strong>  The chromaticity blue primary x-point.
  <info></info>  <strong>$y</strong>  The chromaticity blue primary y-point.

<comment>Return:</comment>
  <info>array</info>  Array consisting of "x" and "y" coordinates of point.


id: Gmagick::getimagebordercolor
type: function
doc:
<comment>Description:</comment>
  Returns the image border color
  
  Returns the image border color.

<comment>Return:</comment>
  <info>GmagickPixel</info>  <class>GmagickPixel</class> object representing the color of the border.


id: Gmagick::getimagechanneldepth
type: function
doc:
<comment>Description:</comment>
  Gets the depth for a particular image channel
  
  Gets the depth for a particular image channel.

<comment>Return:</comment>
  <info>int</info>  Depth of image channel


id: Gmagick::getimagecolors
type: function
doc:
<comment>Description:</comment>
  Returns the color of the specified colormap index
  
  Returns the color of the specified colormap index.

<comment>Return:</comment>
  <info>int</info>  The number of colors in image.


id: Gmagick::getimagecolorspace
type: function
doc:
<comment>Description:</comment>
  Gets the image colorspace
  
  Gets the image colorspace.

<comment>Return:</comment>
  <info>int</info>  Colorspace


id: Gmagick::getimagecompose
type: function
doc:
<comment>Description:</comment>
  Returns the composite operator associated with the image
  
  Returns the composite operator associated with the image.

<comment>Return:</comment>
  <info>int</info>  Returns the composite operator associated with the image.


id: Gmagick::getimagedelay
type: function
doc:
<comment>Description:</comment>
  Gets the image delay
  
  Gets the image delay

<comment>Return:</comment>
  <info>int</info>  Returns the composite operator associated with the image.


id: Gmagick::getimagedepth
type: function
doc:
<comment>Description:</comment>
  Gets the depth of the image
  
  Gets the depth of the image.

<comment>Return:</comment>
  <info>int</info>  Image depth


id: Gmagick::getimagedispose
type: function
doc:
<comment>Description:</comment>
  Gets the image disposal method
  
  Gets the image disposal method

<comment>Return:</comment>
  <info>int</info>  Returns the dispose method on success.


id: Gmagick::getimageextrema
type: function
doc:
<comment>Description:</comment>
  Gets the extrema for the image
  
  Returns an associative array with the keys "min" and "max". Lança uma exceção
  <class>GmagickException</class> em caso de erro.

<comment>Return:</comment>
  <info>array</info>  Returns an associative array with the keys "min" and "max".


id: Gmagick::getimagefilename
type: function
doc:
<comment>Description:</comment>
  Returns the filename of a particular image in a sequence
  
  Returns the filename of a particular image in a sequence

<comment>Return:</comment>
  <info>string</info>  Returns a string with the filename of the image


