Skip to content

Instantly share code, notes, and snippets.

@eS-IT
Last active January 12, 2017 16:52
Show Gist options
  • Save eS-IT/fb19e91343c6187837d68ef2f12b174e to your computer and use it in GitHub Desktop.
Save eS-IT/fb19e91343c6187837d68ef2f12b174e to your computer and use it in GitHub Desktop.
Contao 4: Dependency Injection - AcmeGreeter.php
<?php
# src/Acme/TestBundle/classes/AcmeGreeter.php
namespace Acme\TestBundle\classes;
class AcmeGreeter
{
protected $text = '';
public function __construct($text)
{
$this->text = $text;
}
public function greet()
{
echo $this->text;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment