Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Introduction to Symfony Components and helper components in Drupal 8
1. Introduction to Symfony components
and helper components in Drupal 8
Ankit Babbar
Drupal Developer at Valuebound
Volunteer at SPIC MACAY
twitter: ankitbabbar
2.
3. History of PHP
Functional vs OOPs Programming
Frameworks
3rd Party Libraries
Namespace
PHP-FIG
YAML
Composer
4. Awesome Drupal CMS +
Symfony2 Framework
+ Best PHP Practices from Community
10. HTTP request looks like:
GET /foo.html HTTP/1.1
Host: example.com
Accept: text/html
User-Agent: Mozialla/5.0 (Macintosh)
GET
Retrieve the resource from the
server
POST
Create a resource on the
server
PUT
Update the resource on the
server
DELETE
Delete the resource from the
server
Request
36. class Notifier {
private $mailer;
public function __construct() {
$this->mailer = new Mailer();
}
public function notify() {
…
$this->mailer->send($from, $to, $msg);
…
}
}
37. class Notifier {
private $mailer;
public function __construct(MailInterface $m) {
$this->mailer = $m;
}
public function notify() {
….
$this->mailer->send($from, $to, $msg);
…
}
}
$mailer = new SpecialMailer();
$notifier = new Notifier($mailer);