phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.asyncservice.inc.php,1.1.2.4


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.asyncservice.inc.php,1.1.2.4,1.1.2.5
Date: Sat, 14 Jun 2003 11:47:20 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv13285

Modified Files:
      Tag: Version-0_9_16-branch
        class.asyncservice.inc.php 
Log Message:
updated some of the inline docs

Index: class.asyncservice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.asyncservice.inc.php,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** class.asyncservice.inc.php  4 Jun 2003 19:14:35 -0000       1.1.2.4
--- class.asyncservice.inc.php  14 Jun 2003 15:47:18 -0000      1.1.2.5
***************
*** 16,19 ****
--- 16,26 ----
        /* $Id$ */
  
+       /*!
+       @class asyncservice
+       @author Ralf Becker
+       @copyright GPL - GNU General Public License
+       @abstract The class implements a general phpGW service to execute 
callbacks at a given time.
+       @discussion see http://www.phpgroupware.org/wiki/TimedAsyncServices
+       */
        class asyncservice
        {
***************
*** 33,36 ****
--- 40,47 ----
                var $debug = 0;
                
+               /*!
+               @function asyncservice
+               @abstract constructor of the class
+               */
                function asyncservice()
                {
***************
*** 44,60 ****
                /*!
                @function set_timer
!               @abstract calculates the next run of the timer and puts that 
with the rest of the data in the db
                @syntax set_timer($times,$id,$method,$data)
!               @param $times unix timestamp or 
array('min','hour','dow','day','month','year') with execution time. \
!                       Repeated events are possible to shedule by setting the 
array only partly, eg. \
!                       array('day' => 1) for first day in each month 0am or 
array('min' => '* /5', 'hour' => '9-17') \
                        for every 5mins in the time from 9am to 5pm.
!               @param $id unique id to cancel the request later, if necessary. 
Should be in a form like \
                        eg. '<app><id>X' where id is the internal id of app and 
X might indicate the action.
!               @param $method Method to be called via 
ExecMethod($method,$data). $method has the form \
                        '<app>.<class>.<public function>'.
!               @param $data This data is passed back when the method is 
called. It might simply be an \
                        integer id, but it can also be a complete array.
!               @Returns False if $id already exists, else True 
                */
                function set_timer($times,$id,$method,$data)
--- 55,71 ----
                /*!
                @function set_timer
!               @abstract calculates the next run of the timer and puts that 
with the rest of the data in the db for later execution.
                @syntax set_timer($times,$id,$method,$data)
!               @param $times unix timestamp or 
array('min','hour','dow','day','month','year') with execution time. 
!                       Repeated events are possible to shedule by setting the 
array only partly, eg. 
!                       array('day' => 1) for first day in each month 0am or 
array('min' => '* /5', 'hour' => '9-17') 
                        for every 5mins in the time from 9am to 5pm.
!               @param $id unique id to cancel the request later, if necessary. 
Should be in a form like 
                        eg. '<app><id>X' where id is the internal id of app and 
X might indicate the action.
!               @param $method Method to be called via 
ExecMethod($method,$data). $method has the form 
                        '<app>.<class>.<public function>'.
!               @param $data This data is passed back when the method is 
called. It might simply be an 
                        integer id, but it can also be a complete array.
!               @result False if $id already exists, else True  
                */
                function set_timer($times,$id,$method,$data)
***************
*** 79,91 ****
                /*!
                @function next_run
!               @abstract calculates the next execution time for $time
!               @syntax next_run($time)
!               @param $times unix timestamp or 
array('year'=>$year,'month'=>$month,'dow'=>$dow,'day'=>$day,'hour'=>$hour,'min'=>$min)
 \
!                       with execution time. Repeated execution is possible to 
shedule by setting the array only partly, \
!                       eg. array('day' => 1) for first day in each month 0am 
or array('min' => '/5', 'hour' => '9-17') \
!                       for every 5mins in the time from 9am to 5pm. All not 
set units before the smallest one set, \
                        are taken into account as every possible value, all 
after as the smallest possible value. 
                @param $debug if True some debug-messages about syntax-errors 
in $times are echoed
!               @returns a unix timestamp of the next execution time or False 
if no more executions
                */
                function next_run($times,$debug=False)
--- 90,102 ----
                /*!
                @function next_run
!               @abstract calculates the next execution time for $times
!               @syntax next_run($times)
!               @param $times unix timestamp or 
array('year'=>$year,'month'=>$month,'dow'=>$dow,'day'=>$day,'hour'=>$hour,'min'=>$min)
!                       with execution time. Repeated execution is possible to 
shedule by setting the array only partly, 
!                       eg. array('day' => 1) for first day in each month 0am 
or array('min' => '/5', 'hour' => '9-17') 
!                       for every 5mins in the time from 9am to 5pm. All not 
set units before the smallest one set, 
                        are taken into account as every possible value, all 
after as the smallest possible value. 
                @param $debug if True some debug-messages about syntax-errors 
in $times are echoed
!               @result a unix timestamp of the next execution time or False if 
no more executions
                */
                function next_run($times,$debug=False)
***************
*** 301,305 ****
                @syntax cancel_timer($id)
                @param $id has to be the one used to set it.
!               @returns True if the timer exists and is not expired.
                */
                function cancel_timer($id)
--- 312,316 ----
                @syntax cancel_timer($id)
                @param $id has to be the one used to set it.
!               @result True if the timer exists and is not expired.
                */
                function cancel_timer($id)
***************
*** 313,317 ****
                @param $semaphore if False only check, if true try to 
set/release the semaphore
                @param $release if $semaphore == True, tells if we should set 
or release the semaphore
!               @returns if !$set array('start' => $start,'end' => $end) with 
timestamps of last check_run start and end,  \
                        !$end means check_run is just running. If $set returns 
True if it was able to get the semaphore, else False
                */
--- 324,328 ----
                @param $semaphore if False only check, if true try to 
set/release the semaphore
                @param $release if $semaphore == True, tells if we should set 
or release the semaphore
!               @result if !$set array('start' => $start,'end' => $end) with 
timestamps of last check_run start and end,  \
                        !$end means check_run is just running. If $set returns 
True if it was able to get the semaphore, else False
                */
***************
*** 414,418 ****
                @param $id =0 reads all expired rows / jobs ready to run\
                        != 0 reads all rows/jobs matching $id (sql-wildcards 
'%' and '_' can be used)
!               @returns db-rows / jobs as array or False if no matches
                */
                function read($id=0)
--- 425,429 ----
                @param $id =0 reads all expired rows / jobs ready to run\
                        != 0 reads all rows/jobs matching $id (sql-wildcards 
'%' and '_' can be used)
!               @result db-rows / jobs as array or False if no matches
                */
                function read($id=0)
***************
*** 482,486 ****
                @function delete
                @abstract delete db-row / job with $id
!               @returns False if $id not found else True
                */
                function delete($id)
--- 493,497 ----
                @function delete
                @abstract delete db-row / job with $id
!               @result False if $id not found else True
                */
                function delete($id)
***************
*** 544,548 ****
                @abstract checks if phpgwapi/cron/asyncservices.php is 
installed as cron-job
                @syntax installed()
!               @returns the times asyncservices are run (normaly 'min'=>'* 
/5') or False if not installed or 0 if crontab not found
                @note Not implemented for Windows at the moment, always returns 0
                */
--- 555,559 ----
                @abstract checks if phpgwapi/cron/asyncservices.php is 
installed as cron-job
                @syntax installed()
!               @result the times asyncservices are run (normaly 'min'=>'* /5') 
or False if not installed or 0 if crontab not found
                @note Not implemented for Windows at the moment, always returns 0
                */
***************
*** 600,604 ****
                @syntax install($times)
                @param $times array with keys 'min','hour','day','month','dow', 
not set is equal to '*'
!               @returns the times asyncservices are run or False if they are 
not installed or 0 if crontab not found
                @note Not implemented for Windows at the moment, always returns 0
                */
--- 611,615 ----
                @syntax install($times)
                @param $times array with keys 'min','hour','day','month','dow', 
not set is equal to '*'
!               @result the times asyncservices are run or False if they are 
not installed or 0 if crontab not found
                @note Not implemented for Windows at the moment, always returns 0
                */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]