protected function copyFieldsFromInterface(InterfaceDefinition $intDef, FieldsAwareDefinitionInterface $fieldsAwareDefinition)
    {
        foreach ($intDef->getFields() as $field) {
            if (!$fieldsAwareDefinition->hasField($field->getName())) {
                $newField = clone $field;
                $newField->addInheritedFrom($intDef->getName());
                $fieldsAwareDefinition->addField($newField);
            } else {
                $fieldsAwareDefinition->getField($field->getName())->addInheritedFrom($intDef->getName());
            }
        }
    }
protected function copyFieldsFromInterface(InterfaceDefinition $intDef, FieldsAwareDefinitionInterface $fieldsAwareDefinition)
    {
        foreach ($intDef->getFields() as $field) {
            if (!$fieldsAwareDefinition->hasField($field->getName())) {
                $newField = clone $field;
                $newField->addInheritedFrom($intDef->getName());
                $fieldsAwareDefinition->addField($newField);
            } else {
                $fieldsAwareDefinition->getField($field->getName())->addInheritedFrom($intDef->getName());
            }
        }
    }
protected function copyFieldsFromInterface ( InterfaceDefinition $ intDef , FieldsAwareDefinitionInterface $ fieldsAwareDefinition ) { foreach ( $ intDef -> getFields ( ) as $ field ) { if ( ! $ fieldsAwareDefinition -> hasField ( $ field -> getName ( ) ) ) { $ newField = clone $ field ; $ newField -> addInheritedFrom ( $ intDef -> getName ( ) ) ; $ fieldsAwareDefinition -> addField ( $ newField ) ; } else { $ fieldsAwareDefinition -> getField ( $ field -> getName ( ) ) -> addInheritedFrom ( $ intDef -> getName ( ) ) ; } } }
Copy all fields from interface to given object implementor

@param InterfaceDefinition            $intDef
@param FieldsAwareDefinitionInterface $fieldsAwareDefinition
Copy all fields from interface to given object implementor