상속: extends AbstractModelFile
예제 #1
0
 /**
  * Generates methods by class
  * @return GeneratorFiles
  */
 private function generateServicesClasses()
 {
     foreach ($this->getGenerator()->getServices() as $service) {
         /**
          * Generates file
          */
         $file = new ServiceFile($this->generator, $service->getPackagedName());
         $file->setModel($service)->write();
     }
     return $this;
 }
예제 #2
0
 /**
  *
  */
 public function testDestination()
 {
     $generator = self::bingGeneratorInstance();
     if (($model = $generator->getService('Search')) instanceof ServiceModel) {
         $service = new ServiceFile($generator, $model->getName());
         $service->setModel($model);
         $this->assertSame(sprintf('%s%s%s/', self::getTestDirectory(), ServiceFile::SRC_FOLDER, $model->getContextualPart()), $service->getFileDestination());
     } else {
         $this->assertFalse(true, 'Unable to find Search service for file generation');
     }
 }
 /**
  * @param MethodModel $method
  * @return string
  */
 protected function getOperationMethodReturnType(MethodModel $method)
 {
     return Service::getOperationMethodReturnType($method, $this->getGenerator());
 }