View InterfaceAndTrait.php
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(); | |
} |
View extendingTraits.php
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 | |
{ |
View constructorTrait.php
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; | |
View dci.php
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 | |
{ |
View wp-service-provider.php
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 |
View SassMeister-input.scss
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" | |
); |
View SassMeister-input-HTML.html
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> |
View SassMeister-input-HTML.html
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> |
View SassMeister-input.scss
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) { |
View SassMeister-input-HTML.html
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="container--micro"> | |
<!-- The style attributes only for the purpose of the demo --> | |
<div style="float: left; height: 100px; background: #0f0;"> | |
content | |
</div> | |
<div style="float: left; height: 100px; background: #00f;"> | |
content | |
</div> | |
</div> |
OlderNewer