Example #1
0
 /**
  * @param Constant $constant
  * Any constant
  *
  * @param FullyQualifiedClassName $fqsen
  * The FQSEN to index the constant by
  *
  * @return null
  */
 public function addConstantInScope(Constant $constant, FullyQualifiedClassName $fqsen)
 {
     $name = $constant->getFQSEN()->getNameWithAlternateId();
     $this->constant_map[(string) $fqsen][$name] = $constant;
 }
Example #2
0
 /**
  * @return array
  * Get a map from column name to row values for
  * this instance
  */
 public function toRow() : array
 {
     return ['scope_name' => $this->primaryKeyValue(), 'fqsen' => (string) $this->constant->getFQSEN(), 'name' => (string) $this->constant->getName(), 'type' => (string) $this->constant->getUnionType(), 'flags' => $this->constant->getFlags(), 'context' => base64_encode(serialize($this->constant->getContext())), 'is_deprecated' => $this->constant->isDeprecated()];
 }