Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Heres a list of annotations we can use in models:
| @required | property | Used to declare that a property is required for a specific action (validation). Use without the action to make the property always required |
| @rule | property | Used to enforce specific rules and filters on the property value (validation). You can use the predefined rules or create and import your own |
| @xmlRoot | class | Used to name the xml root name of the element (only for xml mapping) |
| @xmlVersion | class | Version of xml document (only for xml mapping) |
| @xmlEncoding | class | Encoding document. Default utf-8. (only for xml mapping) |
| @xmlNamespaces| class | Document namespaces. Without prefix xmlns. Example : "http://www.sitemaps.org/schemas/sitemap/0.9" xhtml="http://www.w3.org/1999/xhtml". (only for xml mapping) |
| @xmlAttribute | property | Used to declare that a property is a xml attribute for the element. Also used for namespaces (only for xml mapping) |
| @xmlNodeValue | property | Used to declare that a property contains the text node value (only for xml mapping). Please see the models in tests/ (XmlTestModel) |

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"src/"
]
},

"autoload-dev": {
"classmap": [
"tests/"
Expand Down
16 changes: 16 additions & 0 deletions src/Annotation/XmlAnnotationEnum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Created by PhpStorm.
* User: somov.nn@gmail.com
* Date: 15.12.2017
*/

namespace Annotation;


class XmlAnnotationEnum
{
const XML_VERSION = 'xmlVersion';
const XML_ENCODING = 'xmlEncoding';
const XML_NAMESPACES = 'xmlNamespaces';
}
Loading