2017 © Pedro Pelรกez
 

library resource

PHP library which provides Al Quran for your application

image

laraiba/resource

PHP library which provides Al Quran for your application

  • Friday, August 1, 2014
  • by andylibrian
  • Repository
  • 7 Watchers
  • 11 Stars
  • 118 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

PHP Quran Resource

Al Quran Resource Component for PHP., (*1)

Development Master Releases Statistics
Build Status Code Coverage Scrutinizer Code Quality Build Status Latest Stable Version Total Downloads

Installation

Use Composer to install., (*2)

  1. Open a terminal (command line interface) and point to your project directory.
  2. Download Composer by running php -r "readfile('https://getcomposer.org/installer');" | php
  3. Run
php composer.phar require laraiba/resource:dev-master

Usage

1. Get and Show a single ayat

require_once __DIR__ . '/vendor/autoload.php';

$serviceContainer = \Laraiba\Resource\Setup\DefaultService::getServiceContainer();
$ayatRepository   = $serviceContainer->get('laraiba.ayat_repository');

$ayat = $ayatRepository->findOneById('1:7');

echo $ayat->getText();
ุตูุฑูŽูฐุทูŽ ูฑู„ู‘ูŽุฐููŠู†ูŽ ุฃูŽู†ู’ุนูŽู…ู’ุชูŽ ุนูŽู„ูŽูŠู’ู‡ูู…ู’ ุบูŽูŠู’ุฑู ูฑู„ู’ู…ูŽุบู’ุถููˆุจู ุนูŽู„ูŽูŠู’ู‡ูู…ู’ ูˆูŽู„ูŽุง ูฑู„ุถู‘ูŽุงู“ู„ู‘ููŠู†ูŽ

2. Show surat

require_once __DIR__ . '/vendor/autoload.php';

$serviceContainer = \Laraiba\Resource\Setup\DefaultService::getServiceContainer();
$suratRepository  = $serviceContainer->get('laraiba.surat_repository');

$surat = $suratRepository->findOneBySuratNumber(114);

foreach ($surat->getAyatList() as $ayat) {
    echo $ayat->getAyatNumber() . ') ' . $ayat->getText() . "\n";
}
1) ู‚ูู„ู’ ุฃูŽุนููˆุฐู ุจูุฑูŽุจู‘ู ูฑู„ู†ู‘ูŽุงุณู
2) ู…ูŽู„ููƒู ูฑู„ู†ู‘ูŽุงุณู
3) ุฅูู„ูŽูฐู‡ู ูฑู„ู†ู‘ูŽุงุณู
4) ู…ูู† ุดูŽุฑู‘ู ูฑู„ู’ูˆูŽุณู’ูˆูŽุงุณู ูฑู„ู’ุฎูŽู†ู‘ูŽุงุณู
5) ูฑู„ู‘ูŽุฐูู‰ ูŠููˆูŽุณู’ูˆูุณู ููู‰ ุตูุฏููˆุฑู ูฑู„ู†ู‘ูŽุงุณู
6) ู…ูู†ูŽ ูฑู„ู’ุฌูู†ู‘ูŽุฉู ูˆูŽูฑู„ู†ู‘ูŽุงุณู

3. Show translation

Use composer to include a translation to your project:, (*3)

php composer.phar require laraiba/translation-bahasa:*
require_once __DIR__ . '/vendor/autoload.php';

$serviceContainer = \Laraiba\Resource\Setup\DefaultService::getServiceContainer();
$suratRepository  = $serviceContainer->get('laraiba.surat_repository');

$surat = $suratRepository->findOneBySuratNumber(1);

$translationManager = $serviceContainer->get('laraiba.translation_manager');
$translationManager->addTranslation(new \Laraiba\Translation\Bahasa\IndonesianMinistryTranslation());

foreach ($surat->getAyatList() as $ayat) {
    echo $ayat->getAyatNumber() . ') ' . $ayat->getText() . "\n";

    $translatedAyat = $translationManager->translate($ayat);
    echo $translatedAyat->getAyatNumber() . ') ' . $translatedAyat->getText() . "\n";
}
1) ุจูุณู’ู…ู ูฑู„ู„ู‘ูŽู‡ู ูฑู„ุฑู‘ูŽุญู’ู…ูŽูฐู†ู ูฑู„ุฑู‘ูŽุญููŠู…ู
1) Dengan menyebut nama Allah Yang Maha Pemurah lagi Maha Penyayang.
2) ูฑู„ู’ุญูŽู…ู’ุฏู ู„ูู„ู‘ูŽู‡ู ุฑูŽุจู‘ู ูฑู„ู’ุนูŽูฐู„ูŽู…ููŠู†ูŽ
2) Segala puji bagi Allah, Tuhan semesta alam.
3) ูฑู„ุฑู‘ูŽุญู’ู…ูŽูฐู†ู ูฑู„ุฑู‘ูŽุญููŠู…ู
3) Maha Pemurah lagi Maha Penyayang.
4) ู…ูŽูฐู„ููƒู ูŠูŽูˆู’ู…ู ูฑู„ุฏู‘ููŠู†ู
4) Yang menguasai di Hari Pembalasan.
5) ุฅููŠู‘ูŽุงูƒูŽ ู†ูŽุนู’ุจูุฏู ูˆูŽุฅููŠู‘ูŽุงูƒูŽ ู†ูŽุณู’ุชูŽุนููŠู†ู
5) Hanya Engkaulah yang kami sembah, dan hanya kepada Engkaulah kami meminta pertolongan.
6) ูฑู‡ู’ุฏูู†ูŽุง ูฑู„ุตู‘ูุฑูŽูฐุทูŽ ูฑู„ู’ู…ูุณู’ุชูŽู‚ููŠู…ูŽ
6) Tunjukilah kami jalan yang lurus,
7) ุตูุฑูŽูฐุทูŽ ูฑู„ู‘ูŽุฐููŠู†ูŽ ุฃูŽู†ู’ุนูŽู…ู’ุชูŽ ุนูŽู„ูŽูŠู’ู‡ูู…ู’ ุบูŽูŠู’ุฑู ูฑู„ู’ู…ูŽุบู’ุถููˆุจู ุนูŽู„ูŽูŠู’ู‡ูู…ู’ ูˆูŽู„ูŽุง ูฑู„ุถู‘ูŽุงู“ู„ู‘ููŠู†ูŽ
7) (yaitu) Jalan orang-orang yang telah Engkau beri nikmat kepada mereka; bukan (jalan) mereka yang dimurkai dan bukan (pula jalan) mereka yang sesat.

Services

Service Interface
laraiba.ayat_repository Laraiba\Resource\Ayat\Repository\AyatRepositoryInterface
laraiba.surat_repository Laraiba\Resource\Surat\Repository\SuratRepositoryInterface
laraiba.translation_manager Laraiba\Resource\Translation\TranslationManagerInterface
require_once __DIR__ . '/vendor/autoload.php';

$serviceContainer    = \Laraiba\Resource\Setup\DefaultService::getServiceContainer();

$ayatRepository      = $serviceContainer->get('laraiba.ayat_repository');
$suratRepository     = $serviceContainer->get('laraiba.surat_repository');
$translationManager  = $serviceContainer->get('laraiba.translation_manager');

Glossary

  • Surat number = Surat number or Surat Index, ranging from 1 to 114.
  • Ayat number = Ayat number of a surat, ranging from 1 to the end of a surat, eg. 7 for surat Al fatihah.
  • Ayat Id = Ayat ID is a combination of Surat number and Ayat number, divided by a semicolon. eg. 1:7, 2:5, 112:3

The Versions

01/08 2014

dev-master

9999999-dev https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

 

The Development Requires

quran muslim islam al quran moslem

01/08 2014

dev-development

dev-development https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

 

The Development Requires

quran muslim islam al quran moslem

01/08 2014

v0.0.4

0.0.4.0 https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

 

The Development Requires

quran muslim islam al quran moslem

30/07 2014

v0.0.3

0.0.3.0 https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

 

The Development Requires

quran muslim islam al quran moslem

30/07 2014

dev-try-readme

dev-try-readme https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

 

The Development Requires

quran muslim islam al quran moslem

29/07 2014

v0.0.2

0.0.2.0 https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

 

The Development Requires

quran muslim islam al quran moslem

29/07 2014

v0.0.1

0.0.1.0 https://github.com/laraiba/php-quran-resource

PHP library which provides Al Quran for your application

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

quran muslim islam al quran moslem