Skip to content

Instantly share code, notes, and snippets.

@whisperity
Last active December 12, 2015 08:48
Show Gist options
  • Save whisperity/4746391 to your computer and use it in GitHub Desktop.
Save whisperity/4746391 to your computer and use it in GitHub Desktop.
This just happened.
<?php
class TypedKeyValuePair_Tokn_Stor
{
private $_key;
private $_value;
public function __construct(&$key, &$value)
{
$this->setKey(&$key);
$this->setValue(&$value);
}
public function getKey()
{
return $_key;
}
public function setKey(&$key)
{
if ($key instanceof Tokn)
$this->_key = &$key;
else
throw new Exception("ArgumentException: Key is not Tokn");
}
public function getValue()
{
return $_value;
}
public function setValue(&$value)
{
if ($value instanceof Stor)
$this->_value = &$value;
else
throw new Exception("ArgumentException: Value is not Stor");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment