Skip to content

Lorem Ipsum Service

Configuration

Changing the Lorem Ipsum Service Provider

PROVIDER_LOREM_IPSUM=\Zemit\Provider\LoremIpsum\ServiceProvider

LoremIpsum Configurations Object

<?php
new Config([
    'providers' => [
        \Zemit\Provider\LoremIpsum\ServiceProvider::class => Env::get('PROVIDER_LOREM_IPSUM', \Zemit\Provider\LoremIpsum\ServiceProvider::class),
    ],
]);

Lorem Ipsum Service (loremIpsum)

Lorem Service Provider

Lorem Service Provider (loremIpsum): \Zemit\Provider\Lorem\ServiceProvider

<?php
// Retrieving the service from an Injectable
$lorem = $this->loremIpsum;

// Retrieving the service from the DI
$lorem = $this->di->get('loremIpsum');

// Retrieving the service from the getDI()
$lorem = $this->getDI()->get('loremIpsum');

// Retrieving the service from anywhere
$lorem = Di::getDefault()->get('loremIpsum');