Skip to content

Instantly share code, notes, and snippets.

@msacar
msacar / Gsm.php
Last active August 9, 2020 16:34
<?php
//Gsm.php ye ekliyoruz
/**
* Managar olan Gsm sınıfında,
* Erişilmeye çalışan static method yoksa;
* Gsm sınıfı kendini instance eder ve kendinden bu method çağr
*
* @param $method
* @param $args
<?php
namespace Managar;
use GuzzleHttp\Client;
class VodafoneDriver
{
protected static $userName = "mustafa";
protected static $password = "acar";
<?php
namespace Managar;
use GuzzleHttp\Client;
class TurkcellDriver
{
protected static $userName = "mustafa";
protected static $password = "acar";
@msacar
msacar / Gsm.php
Last active August 9, 2020 12:45
<?php
namespace Managar;
class Gsm
{
protected static $instance = null;
public $drivers = [];
/**
@msacar
msacar / Gsm.php
Last active August 9, 2020 12:33
<?php
namespace Managar;
class Gsm
{
protected static $instance = null;
public $drivers = [];
/**
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Webpack App</title>
</head>
<body>
<h1>Webpack App!</h1>
<h2>Hatırlatma: Konsolu kontrol et.</h2>
<!-- Oluşturduğumuz javascript dosyasını sayfaya dahil ediyoruz -->
const webpack = require('webpack');
const path = require('path');
const config = {
//Başlangıç noktası olan ana javascript dosyamız
entry: './src/index.js',
mode: 'development',
//Ana dosyanın transpile edilip çıktığı dizin ve dosya adı. /dist/bundle.js
output: {
path: path.resolve(__dirname, 'dist'),
"scripts": {
"build": "webpack --watch",
"start": "webpack-dev-server"
},
@msacar
msacar / index.js
Last active May 1, 2020 16:33
src/index.js
import {Person} from './Person.js';
import {Student} from './Student';
let person = new Person('Ali')
let student = new Student('Veli')
person.work()
student.work()
@msacar
msacar / Teacher.js
Created May 1, 2020 16:24
src/Teacher.js
import {Person} from './Person';
class Teacher extends Person {
constructor(name){
super(name)
this.job = "Teacher"
}
work(){
console.log(`${this.name} Teaching.`)
}