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 | |
foreach ($form['submitted'] as &$value) { | |
$types = array('textfield', 'webform_email', 'textarea'); | |
if (isset($value['#type']) && in_array($value['#type'], $types)) { | |
$value['#attributes']['placeholder'] = $value['#title']; | |
} | |
} |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="author" content="Johnie Hjelm"> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<link rel="stylesheet" type="text/css" href="style.css"> |
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
/** | |
* @author Jonathan Barronville | |
* @example | |
* var color_001 = colorShader( '000000', 255 ); | |
* // color_001 === 'ffffff'; | |
* var color_002 = colorShader( 'ffffff', -255 ); | |
* // color_002 === '000000'; | |
* @param {String} color_hex | |
* @param {Number} amount | |
* @return {String} |
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
/** | |
* jPholdr | |
* Ultra Lightweight Placeholder Plugin for jQuery | |
* | |
* @author: Nicholas Ruunu | |
* @email: nicholas@ruu.nu | |
* @website: http://ruu.nu | |
* | |
* Example: $('#form').jPholdr(); | |
*/ |
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
$(function() { | |
var MyClass = function() { | |
var $this = $(this); | |
var $login_form = $('#login_form'); | |
// Constructor (will always run when loaded) | |
(function() { | |
// Submit login_form |
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 | |
/** | |
* Message + Flash Message class | |
* | |
* Usage: $this->message->success('Your thing was successful', (bool) $is_flash, (string) $group); | |
* $this->message->error('There was an error'); | |
* | |
* @author Nicholas Ruunu | |
*/ |
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 DomainEventProxy | |
{ | |
private $eventMethodMapping = []; | |
private function callMappedMethod(DomainEvent $event, ...$arguments) | |
{ | |
$method = $this->resolveMethod($event); | |
$this->$method($event, ...$arguments); |
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
final class User | |
{ | |
private $password; | |
public function changePassword($string) | |
{ | |
$this->password = new Password($string); | |
} | |
} |
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 | |
namespace Memory\PlayingField; | |
use Memory\PlayingField; | |
final class IncompletePlayingField | |
{ | |
private $cards = array(); | |
private $numberOfCards = 0; |
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
final class DatabaseName implements Name { | |
private $db; | |
private $table; | |
public function __construct(Database $db, string $table) { | |
$this->db = $db; | |
$this->table = $table; | |
} | |
public function rename($name) { |