You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+
## Our Standards
8
+
9
+
Examples of behavior that contributes to creating a positive environment include:
10
+
11
+
* Using welcoming and inclusive language
12
+
* Being respectful of differing viewpoints and experiences
13
+
* Gracefully accepting constructive criticism
14
+
* Focusing on what is best for the community
15
+
* Showing empathy towards other community members
16
+
17
+
Examples of unacceptable behavior by participants include:
18
+
19
+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+
* Trolling, insulting/derogatory comments, and personal or political attacks
21
+
* Public or private harassment
22
+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+
## Our Responsibilities
26
+
27
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+
## Scope
32
+
33
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+
## Enforcement
36
+
37
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+
## Attribution
42
+
43
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
Contributions are **welcome** and will be fully **credited**.
4
+
5
+
We accept contributions via pull requests on [Github].
6
+
Please make all pull requests to the `develop` branch, not the `master` branch.
7
+
8
+
## Pull Requests
9
+
10
+
-**Create an issue** - Explain as detailed as possible the issue you encountered so we can understand the context of your pull request
11
+
-**[Symfony Coding Standard]** - The easiest way to apply the conventions is to run `composer lint`
12
+
-**Add tests!** - Your patch won't be accepted if it doesn't have tests.
13
+
-**Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
14
+
-**Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
15
+
-**Create feature branches** - Don't ask us to pull from your master branch.
16
+
-**One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
17
+
-**Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
Copy file name to clipboardExpand all lines: README.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
1
# Package Base
2
+
3
+
> Classes that are used by the classes generated by the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator) project to ease the SoapClient UX.
The goal is to provide generic and useful classes that are on top of the classes generated by the [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator) project.
16
+
17
+
For example, it allows to easily loop through the array elements of a SOAP result object property, it allows to easily set HTTP and SOAP headers for a SOAP request and it allows to easily populate an object from its array state representation.
18
+
12
19
## Main features
13
-
This project contains base classes used as parent class by the generated classes from [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator):
14
20
-[Interfaces](#the-interfaces)
15
21
-[StructInterface](#structinterface)
16
22
-[StructArrayInterface](#structarrayinterface)
@@ -93,10 +99,11 @@ Here are the methods that must be implemented and why:
93
99
### AbstractStructBase
94
100
#### Description
95
101
This class is the base class for any ```StructType``` class generated by [PackageGenerator](https://github.com/WsdlToPhp/PackageGenerator). It implements our [StructInterface](#structinterface) interface.
96
-
It defines three methods:
102
+
It defines four methods:
97
103
-**__set_state($array)**: Useful when you load the string representation of an object that you stored using ```var_export```. It also allows you to ease the instanciation of an object that contains many properties which would be hard to instanciate using the ```__construct``` method. You can see ```__set_state``` as an hydratation method.
98
104
-**_set($name, $value)**: As magic method ```__set``` but used by the ```__set_state``` method. Plus, defining ```__set``` method on used class by the classmap option for the [SoapClient](http://php.net/manual/en/class.soapclient.php) breaks the correct hydratation of your received objects.
99
-
-**_get($name)**: As magic method ```__get```. Used by our [AbstractStructArrayBase](#abstractstructarraybase) class
105
+
-**_get($name)**: As magic method ```__get```. Used by our [AbstractStructArrayBase](#abstractstructarraybase) class.
106
+
-**jsonSerialize()**: by implementing the [\JsonSerializable](http://php.net/manual/en/class.jsonserializable.php) interface, it implements this method that allows to pass the object to the [json_encode](http://php.net/manual/en/function.json-encode.php) method so it will return the properties of the current object in an array.
0 commit comments