Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembler overload problemm #98

Closed
agratushniy opened this issue Nov 23, 2017 · 0 comments
Closed

Assembler overload problemm #98

agratushniy opened this issue Nov 23, 2017 · 0 comments

Comments

@agratushniy
Copy link

By default, when you create a configuration, you install two of the assembler.

public function __construct($wsdl = '', $destination = '')
    {
        $this->setWsdl($wsdl);
        $this->setDestination($destination);
        $this->ruleSet = new RuleSet([
            new Rules\AssembleRule(new Assembler\PropertyAssembler()),
            new Rules\AssembleRule(new Assembler\ClassMapAssembler()),
        ]);
    }

The problem is with PropertyAssembler:

  1. the documentation indicated that he as a constructor can make the type field visibility, but there is no constructor :)

  2. I wrote my own assembler and tried to install it

->addRule(new Rules\AssembleRule(new wnPropertyAssembler(PropertyGenerator::VISIBILITY_PUBLIC)))

but since you already have a default assembler uses it. I studied the source code of configuration class and solved the problem as follows

->setRuleSet(
        new Rules\RuleSet([
            new Rules\AssembleRule(new OwnPropertyAssembler(PropertyGenerator::VISIBILITY_PUBLIC)),
            new Rules\AssembleRule(new ClassMapAssembler())
        ])
    )

Please Add this information in documentation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants