This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait FirstTrait | |
{ | |
public function firstMethod() { | |
echo 'This is the firstMethod()' . PHP_EOL; | |
} | |
} | |
trait SecondTrait | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface FlyableThingInterface | |
{ | |
public function fly(); | |
} | |
interface AnimalInterface | |
{ | |
public function eat(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface PersonInterface | |
{ | |
public function getFullname(); | |
} | |
trait PersonTrait | |
{ | |
private $name; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface AccountInterface | |
{ | |
public function getBalance(); | |
public function increase($money); | |
public function decrease($money); | |
} | |
trait AccountTrait | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is just an example FOR WORDPRESS USERS. | |
// | |
// To make this better: | |
// * use namespace/class/closure etc. | |
// * use autoloader | |
// * create & use service provider classes | |
// * create & use factory for WP_Query, WP_User etc. | |
// interface ContainerInterface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.1) | |
// Compass (v1.0.1) | |
// ---- | |
// A property map | |
$properties: ( | |
prop-1: "raw-prop-1-value", | |
prop-2: "raw-prop-2-value" | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="collection"> | |
<div class="collection__item">Item 1</div> | |
<div class="collection__item">Item 2</div> | |
<div class="collection__item">Item 3</div> | |
</div> | |
<ul class="collection"> | |
<li class="collection__item">Item 1</li> | |
<li class="collection__item">Item 2</li> | |
<li class="collection__item">Item 3</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="button" href="#"><a> button</a> | |
<button class="button"><button> button</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.1) | |
// Compass (v1.0.1) | |
// ---- | |
// Sass: Typed value factory & validator using Map | |
// Direction type that accepts only top, right, left, bottom | |
// Direction type factory | |
@function dir-new($dir) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="button">An example link</a> | |
<a class="button--ghost">An example link</a> |
OlderNewer