Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: Salat

Source Location: /sub/Salat.class.php

Class Overview


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


Author(s):

Copyright:

  • 2006-2010 Khaled Al-Shamaa

Variables

Methods



Class Details

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



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2006-2010 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Variables

$AB2 =  -0.833333

[line 191]



Tags:

access:  protected

Type:   mixed


[ Top ]

$AG2 =  -18

[line 194]



Tags:

access:  protected

Type:   mixed


[ Top ]

$AJ2 =  -18

[line 197]



Tags:

access:  protected

Type:   mixed


[ Top ]

$day =  2

[line 179]



Tags:

access:  protected

Type:   mixed


[ Top ]

$lat =  36.20278

[line 188]



Tags:

access:  protected

Type:   mixed


[ Top ]

$long =  37.15861

[line 185]



Tags:

access:  protected

Type:   mixed


[ Top ]

$month =  8

[line 176]



Tags:

access:  protected

Type:   mixed


[ Top ]

$school =  'Shafi'

[line 200]



Tags:

access:  protected

Type:   mixed


[ Top ]

$year =  1975

[line 173]



Tags:

access:  protected

Type:   mixed


[ Top ]

$zone =  2

[line 182]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 205]

Salat __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method coordinate2deg [line 522]

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-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

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

[ Top ]

method getPrayTime [line 346]

array getPrayTime( )

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, Zuhr, Asr, Maghrib, Isha]
author:  Mohamad Magdy <mohamad_magdy_egy@hotmail.com>
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source:  http://qasweb.org/qasforum/index.php?showtopic=177&st=0
access:  public


[ Top ]

method getQibla [line 491]

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-Shamaa <khaled.alshamaa@gmail.com>
source:  http://www.patriot.net/users/abdali/ftp/qibla.pdf
access:  public


[ Top ]

method setConf [line 310]

object setConf( [string $sch = 'Shafi'], [decimal $sunriseArc = -0.833333], [decimal $ishaArc = -18], [decimal $fajrArc = -18])

Setting rest of Salat calculation configuration

المدارس الفلكية في حساب زاويتي الفجر والعشاء:

  • جامعة العلوم الأسلامية بكراتشي
$ishaArc = -18 $fajrArc = -18

  • الأتحاد الأسلامي بأمريكا الشمالية
$ishaArc = -15 $fajrArc = -15

  • رابطة العالم الأسلامي
$ishaArc = -17 $fajrArc = -18

  • جامعة أم القرى
$fajrArc = -19 للعشاء، بعد المغرب بساعة ونصف دائماً ، إلا في شهر رمضان فإن العشاء بعد المغرب بساعتين

  • الهيئة المصرية العامة للمساحة
$ishaArc = -17.5 $fajrArc = -19.5

  • حزب العلماء في لندن لدول
أوروبا في خطوط عرض تزيد على 48

$ishaArc = -17 $fajrArc = -17




Tags:

return:  to build a fluent interface
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
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)

[ Top ]

method setDate [line 219]

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

Setting date of day for Salat calculation



Tags:

return:  to build a fluent interface
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

integer   $d   Day of date you want to calculate Salat in
integer   $m   Month 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 246]

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

Setting location information for Salat calculation



Tags:

return:  to build a fluent interface
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

decimal   $l1   Longitude of location you want to calculate Salat time in
decimal   $l2   Latitude of location you want to calculate Salat time in
integer   $z   Time Zone, offset from UTC (see also Greenwich Mean Time)

[ Top ]


Documentation generated on Sat, 14 Aug 2010 13:23:59 -0700 by phpDocumentor 1.4.0