PHP 클래스 Hermes, horde

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.
저자: Chuck Hagenbuch ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_clients array List of available clients.

공개 메소드들

메소드 설명
canEditTimeslice ( $id ) : Determines if the current user can edit a specific timeslice according to the following rules: 'hermes:review' perms may edit any slice, the current user can edit his/her own slice prior to submitting it. Otherwise no editing allowed.
clearTimer ( integer $id ) Clear a timer
getClientSelect ( string $id, boolean $multi = false, boolean $use_cotext = false ) : string Return the HTML needed to build an enum or multienum for selecting clients.
getCostObjectByID ( string $id, string | boolean $employee = false ) : array Return a cost object hash.
getCostObjectType ( mixed $client_ids = null ) : array Return data for costobjects, optionally filtered by client_ids.
getCostObjects ( $client_ids = null, $external_only = false ) Return a list of cost objects exported by available APIs, optionally filtered by client_ids.
getEmployeesType ( string $enumtype = 'multienum' ) : array Get form control type for users.
getJobTypeData ( $params = [] )
getJobTypeSelect ( string $id, boolean $multi = false, $show_disabled = false ) : string Return HTML needed to build an enum or multienum for jobtype selection.
getTimer ( $id ) : array Return a specific timer.
listClients ( string $name = '' ) : array Returns a list of available clients.
listTimers ( boolean $running_only = false ) : array Return list of current timers.
makeExportHours ( array $hours ) : array Rewrite an hours array into a format useable by Horde_Data::
newTimer ( string $description, stdClass $details = null ) : integer Create a new timer and save it to storage. Timers contain the following values: - name: (string) The descriptive name of the timer.
parseDate ( string $date ) : Horde_Date Parses a complete date-time string into a Horde_Date object.
pauseTimer ( integer $id ) : boolean Pause a timer.
showAjaxView ( ) : boolean Returns true if we are showing the Ajax view.
tabs ( )
updateCostObject ( $slice )
updateTimer ( integer $id, array $timer ) Update an existing timer.
url ( string $view, array $params = [] ) : Horde_Url Return a URL to a specific view, taking self::showAjaxView() into account

메소드 상세

canEditTimeslice() 공개 정적인 메소드

Determines if the current user can edit a specific timeslice according to the following rules: 'hermes:review' perms may edit any slice, the current user can edit his/her own slice prior to submitting it. Otherwise no editing allowed.
public static canEditTimeslice ( $id ) :
$id
리턴

clearTimer() 공개 정적인 메소드

Clear a timer
public static clearTimer ( integer $id )
$id integer The timer id to clear/remove.

getClientSelect() 공개 정적인 메소드

Return the HTML needed to build an enum or multienum for selecting clients.
public static getClientSelect ( string $id, boolean $multi = false, boolean $use_cotext = false ) : string
$id string The DOM id to identify the select list.
$multi boolean Allow multi select?
$use_cotext boolean Instead of 'Select A Client', use 'General Cost Objects' for the top choice.
리턴 string The HTML to render the select element.

getCostObjectByID() 공개 정적인 메소드

Return a cost object hash.
public static getCostObjectByID ( string $id, string | boolean $employee = false ) : array
$id string The cost object id.
$employee string | boolean Employee hint - if known. False otherwise.
리턴 array The cost object hash. Keys differ depending on the API queried, but should always contain: - id: - name:

getCostObjectType() 공개 정적인 메소드

Return data for costobjects, optionally filtered by client_ids.
public static getCostObjectType ( mixed $client_ids = null ) : array
$client_ids mixed A client id or an array of client ids to filter cost obejcts by.
리턴 array An array of cost objects data.

getCostObjects() 공개 정적인 메소드

Return a list of cost objects exported by available APIs, optionally filtered by client_ids.
public static getCostObjects ( $client_ids = null, $external_only = false )

getEmployeesType() 공개 정적인 메소드

What type of control we use depends on whether the Auth driver has list capability.
public static getEmployeesType ( string $enumtype = 'multienum' ) : array
$enumtype string The type to return if we have list capability (should be either 'enum' or 'multienum').
리턴 array A two-element array of the type and the type's parameters.

getJobTypeData() 공개 정적인 메소드

public static getJobTypeData ( $params = [] )

getJobTypeSelect() 공개 정적인 메소드

Return HTML needed to build an enum or multienum for jobtype selection.
public static getJobTypeSelect ( string $id, boolean $multi = false, $show_disabled = false ) : string
$id string The DOM id to identify the select list.
$multi boolean Allow multi select?
리턴 string The HTML needed to render the select element.

getTimer() 공개 정적인 메소드

Return a specific timer.
public static getTimer ( $id ) : array
리턴 array The timer hash.

listClients() 공개 정적인 메소드

Returns a list of available clients.
public static listClients ( string $name = '' ) : array
$name string The string to search for in the client name.
리턴 array A hash of client_id => client_name.

listTimers() 공개 정적인 메소드

Return list of current timers.
public static listTimers ( boolean $running_only = false ) : array
$running_only boolean Only return running timers if true.
리턴 array An array of timer hashes.

makeExportHours() 공개 정적인 메소드

Rewrite an hours array into a format useable by Horde_Data::
public static makeExportHours ( array $hours ) : array
$hours array This is an array of the results from $driver->getHours().
리턴 array an array suitable for Horde_Data::

newTimer() 공개 정적인 메소드

- client_id: (string) The client id. - deliverable_id: (string) The delverable id. - deliverable_text: (string) Descriptive text for deliverable. - jobtype_id: (string) The jobtype id. - time: (integer) Contains the timestamp of the last time this timer was started. Contains zero if paused. - paused: (boolean) Flag to indicate the timer is paused. - elapsed: (integer) Total elapsed time since the timer was created or reset. Updated when timer is paused. - exclusive: (boolean) Whether or not this timer should cause other timers to stop when it is started.
public static newTimer ( string $description, stdClass $details = null ) : integer
$description string The timer description.
$details stdClass Additional, optional details for the ti.
리턴 integer The timer id.

parseDate() 공개 정적인 메소드

Parses a complete date-time string into a Horde_Date object.
public static parseDate ( string $date ) : Horde_Date
$date string The date-time string to parse.
리턴 Horde_Date The parsed date.

pauseTimer() 공개 정적인 메소드

Pause a timer.
public static pauseTimer ( integer $id ) : boolean
$id integer The timer id.
리턴 boolean

showAjaxView() 공개 정적인 메소드

Returns true if we are showing the Ajax view.
public static showAjaxView ( ) : boolean
리턴 boolean

tabs() 공개 정적인 메소드

public static tabs ( )

updateCostObject() 공개 정적인 메소드

public static updateCostObject ( $slice )

updateTimer() 공개 정적인 메소드

Update an existing timer.
public static updateTimer ( integer $id, array $timer )
$id integer The timer id.
$timer array The timer hash.

url() 공개 정적인 메소드

Return a URL to a specific view, taking self::showAjaxView() into account
public static url ( string $view, array $params = [] ) : Horde_Url
$view string The view to link to.
$params array Optional paramaters. - id: A slice id.
리턴 Horde_Url The Url

프로퍼티 상세

$_clients 보호되어 있는 정적으로 프로퍼티

List of available clients.
protected static array $_clients
리턴 array