Created
March 10, 2016 13:48
-
-
Save ScullWM/31d3920e9f49df553e6e to your computer and use it in GitHub Desktop.
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 | |
class test { | |
$typeAssoc = [ | |
DocumentInterface::TYPE_QUOTATION => DocumentInterface::CLASSNAME_QUOTATION, | |
DocumentInterface::TYPE_QUOTATION => DocumentInterface::CLASSNAME_QUOTATION, | |
DocumentInterface::TYPE_QUOTATION => DocumentInterface::CLASSNAME_QUOTATION, | |
DocumentInterface::TYPE_QUOTATION => DocumentInterface::CLASSNAME_QUOTATION, | |
]; | |
public function getTypeClassName() | |
{ | |
if (isset($this->typeAssoc[$this->getType()]) { | |
return $this->typeAssoc[$this->getType()]; | |
} | |
throw new \Exception('WTF entity'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment