예제 #1
0
 /**
  * @param \com\github\gooh\InterfaceDistiller\Accessors $distillate
  * @return void
  */
 public function writeToFile(Accessors $distillate)
 {
     $this->writeString('<?php' . PHP_EOL);
     $this->writeInterfaceSignature($distillate->getInterfaceName(), $distillate->getExtendingInterfaces());
     $this->writeString('{' . PHP_EOL);
     $this->writeMethods($distillate->getInterfaceMethods());
     $this->writeString('}');
 }
예제 #2
0
 public function writeToFile(Accessors $distillate)
 {
     $this->writeString('<?php' . PHP_EOL);
     $this->writeInterfaceSignature($distillate->getInterfaceName(), $distillate->getExtendingInterfaces(), $distillate->getParentClass());
     $this->writeString('    {');
     $this->writeString(PHP_EOL);
     $this->writeConsts($distillate->getInterfaceConsts());
     if ($distillate->getInterfaceName() == 'Phalcon\\DI\\Injectable') {
         $this->writeString($this->di);
         $this->writeString(PHP_EOL);
         $this->writeString(PHP_EOL);
     }
     $this->writeMethods($distillate->getInterfaceMethods());
     $this->writeString('    }' . PHP_EOL);
     $this->writeString('}');
 }