I18N_Arabic

# Class: I18N_Arabic_Salat

Source Location: /Arabic/Salat.php

### Class Overview

This PHP class calculate the time of Muslim prayer according to the geographic location.

#### Author(s):

- Khaled Al-Sham'aa <khaled@ar-php.org>

#### Copyright:

- 2006-2016 Khaled Al-Sham'aa

### Methods

- coordinate2deg
- getPrayTime
- getPrayTime2
- getQibla
- setConf
- setDate
- setLocation

### Class Details

[line 170]
This PHP class calculate the time of Muslim prayer according to the geographic location.

#### Tags:

author: | Khaled Al-Sham'aa <khaled@ar-php.org>
copyright: | 2006-2016 Khaled Al-Sham'aa
link: | http://www.ar-php.org
license: | LGPL

[ Top ]

### Class Methods

### method coordinate2deg [line 637]

`float coordinate2deg( string $value)`

Convert coordinates presented in degrees, minutes and seconds (i.e. 12°34'56"S formula) into usual float number in degree unit scale (i.e. -12.5822 value)

#### Tags:

return: | Equivalent float number in degree unit scale (i.e. -12.5822 value)
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $value | Coordinate presented in degrees, minutes and seconds (i.e. 12°34'56"S formula)

[ Top ]

### method getPrayTime [line 393]

`array getPrayTime( )`

Alias for getPrayTime2 method

#### Tags:

return: | of Salat times + sun rise in the following format hh:mm where hh is the hour in local format and 24 mode mm is minutes with leading zero to be 2 digits always array items is [$Fajr, $Sunrise, $Dhuhr, $Asr, $Maghrib, $Isha, $Sunset, $Midnight, $Imsak, array $timestamps]
author: | Hamid Zarrabi-Zadeh <zarrabi@scs.carleton.ca>
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
source: | http://praytimes.org/calculation
access: | public

[ Top ]

### method getPrayTime2 [line 413]

`array getPrayTime2( )`

Calculate Salat times for the date set in setSalatDate methode, and location set in setSalatLocation.

#### Tags:

return: | of Salat times + sun rise in the following format hh:mm where hh is the hour in local format and 24 mode mm is minutes with leading zero to be 2 digits always array items is [$Fajr, $Sunrise, $Dhuhr, $Asr, $Maghrib, $Isha, $Sunset, $Midnight, $Imsak, array $timestamps]
author: | Hamid Zarrabi-Zadeh <zarrabi@scs.carleton.ca>
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
source: | http://praytimes.org/calculation
access: | public

[ Top ]

### method getQibla [line 601]

`float getQibla( )`

Determine Qibla direction using basic spherical trigonometric formula

#### Tags:

return: | Qibla Direction (from the north direction) in degrees
author: | S. Kamal Abdali <k.abdali@acm.org>
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
source: | http://www.patriot.net/users/abdali/ftp/qibla.pdf
access: | public

[ Top ]

### method setConf [line 352]

`object setConf( [string $sch = 'Shafi'], [decimal $sunriseArc = -0.833333], [decimal $ishaArc = -17.5], [decimal $fajrArc = -19.5], [string $view = 'Sunni'])`

Setting rest of Salat calculation configuration

Convention Fajr Angle Isha Angle

Muslim World League -18 -17

Islamic Society of North America (ISNA) -15 -15

Egyptian General Authority of Survey -19.5 -17.5

Umm al-Qura University, Makkah -18.5 Isha 90 min after Maghrib, 120 min during Ramadan

University of Islamic Sciences, Karachi -18 -18

Institute of Geophysics, University of Tehran -17.7 -14(*)

Shia Ithna Ashari, Leva Research Institute, Qum -16 -14

(*) Isha angle is not explicitly defined in Tehran method Fajr Angle = $fajrArc, Isha Angle = $ishaArc

- حزب العلماء في لندن لدول

أوروبا في خطوط عرض تزيد على 48

$ishaArc = -17 $fajrArc = -17

#### Tags:

return: | to build a fluent interface
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $sch | [Shafi|Hanafi] to define Muslims Salat calculation method (affect Asr time)
decimal | $sunriseArc | Sun rise arc (default value is -0.833333)
decimal | $ishaArc | Isha arc (default value is -18)
decimal | $fajrArc | Fajr arc (default value is -18)
string | $view | [Sunni|Shia] to define Muslims Salat calculation method (affect Maghrib and Midnight time)

[ Top ]

### method setDate [line 263]

`object setDate( [integer $m = 8], [integer $d = 2], [integer $y = 1975])`

Setting date of day for Salat calculation

#### Tags:

return: | to build a fluent interface
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public

#### Parameters:

integer | $m | Month of date you want to calculate Salat in
integer | $d | Day of date you want to calculate Salat in
integer | $y | Year (four digits) of date you want to calculate Salat in

[ Top ]

### method setLocation [line 291]

`object setLocation( [decimal $l1 = 36.20278], [decimal $l2 = 37.15861], [integer $z = 2], [integer $e = 0])`

Setting location information for Salat calculation

#### Tags:

return: | to build a fluent interface
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public

#### Parameters:

decimal | $l1 | Latitude of location you want to calculate Salat time in
decimal | $l2 | Longitude of location you want to calculate Salat time in
integer | $z | Time Zone, offset from UTC (see also Greenwich Mean Time)
integer | $e | Elevation, it is the observer's height in meters.

[ Top ]

Documentation generated on Fri, 01 Jan 2016 10:26:22 +0200 by phpDocumentor 1.4.0