public function __construct(InterfaceC $interface, Constant $constant, $declaringInterface = null)
 {
     $this->interface = $interface;
     $this->constant = $constant;
     $this->name = $constant->getName();
     if ($interface->getName() === $declaringInterface) {
         $declaringInterface = null;
     }
     $this->declaringInterface = $declaringInterface;
 }
 private function insertConstant(Constant $constant, $packageVersionId)
 {
     $this->constantStmt->bindValue(1, $constant->getName());
     $this->constantStmt->bindValue(2, $this->phpType->convertToDatabaseValue($constant->getPhpType(), $this->platform));
     $this->constantStmt->bindValue(3, $packageVersionId);
     $this->constantStmt->execute();
     $constantId = $this->con->lastInsertId();
     $this->constantIdRef->setValue($constant, $constantId);
     return $constantId;
 }
 public function __construct(Clazz $class, Constant $constant, $declaringClass = null)
 {
     $this->class = $class;
     $this->constant = $constant;
     $this->name = $constant->getName();
     if ($class->getName() === $declaringClass) {
         $declaringClass = null;
     }
     $this->declaringClass = $declaringClass;
 }
Ejemplo n.º 4
0
 public function addConstant(Constant $constant, $declaringClass = null)
 {
     $classConstant = new InterfaceConstant($this, $constant, $declaringClass);
     $this->constants->set($constant->getName(), $classConstant);
 }