Skip to content

Symfony LotteryResultBundle with Curl on millipiyango.gov.tr for Turkey lottery

License

Notifications You must be signed in to change notification settings

sanssendecom/lottery-result-bundle

Repository files navigation

lottery-result-bundle

Symfony LotteryResultBundle with Curl on millipiyango.gov.tr for Turkey lottery

###http://www.sanssende.com tarafından oluşturulmuş ve geliştirilen bir symfony bundle'ıdır.

Şu anki sürüm unstable (kararsız) bir sürümdür, tüm yapı çalışıyor olsa dahi class ve/veya method isimlerinde tutarsızlıklar olabilir. Daha sonraki güncellemelerde class ve/veya method isimler değişmesi muhtemeldir. Kararlı bir sürüme geçildiğinde nasıl çalıştığı paylaşılacaktır.

Composer ile Kurulum

composer.json dosyasında require anahtarının altına aşağıdaki tanımlamayı yapmanız yeterlidir.

# composer.json

"require": {
        "sanssendecom/lottery-result-bundle": "1.0.*@dev"
    },

Bundle aktifleştirmek için

# app/AppKernel.php

$bundles = array(
            new Sanssendecom\LotteryResultBundle\LotteryResultBundle()
        );

Servis kullanımı için

# app/config/services.yml

imports:
    - { resource: @LotteryResultBundle/Resources/config/services.yml }

yukarıdaki dosyayı import ettiğinizde servise erişebilirsiniz, alt satırda kullanım örneği mevcuttur.

$lottery = $this->get('lottery');
$sayisallotoResult  = $lottery->setOption('SAYISALLOTO', new \DateTime('2015-04-25'))->getResultClass();
$sanstopuResult     = $lottery->setOption('SANSTOPU', new \DateTime('2015-05-06'))->getResultClass()

Piyango bileti çekilişi

Milli piyango bileti çekiliş sonuçlarını aşağıda örnekteki gibi alabilirsiniz.

$lottery = $this->get('lottery');

$result = $lottery->setOption('PIYANGO', new \DateTime('2015-05-09'))->getResultClass();

Controller erişimi

Aşağıdaki gibi bir tanımlama yaparak "/lottery" adresinden index sayfasına erişerek bundle'ı test edebilirsiniz.

# app/config/routing.yml

_lottey_result_bundle:
    resource: "@LotteryResultBundle/Resources/config/routing.yml"

About

Symfony LotteryResultBundle with Curl on millipiyango.gov.tr for Turkey lottery

Resources

License

Stars

Watchers

Forks

Packages

No packages published