comparison _test/Resources/sample.xml @ 225:a1e868b0fba9

Bindings concept in progress
author sergey
date Fri, 31 Aug 2012 16:41:18 +0400
parents e6c050db7d98
children b6cde007a175
comparison
equal deleted inserted replaced
224:e6c050db7d98 225:a1e868b0fba9
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <resources xmlns="http://implab.org/schemas/resources" 2 <resources xmlns="http://implab.org/schemas/resources"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://implab.org/schemas/resources resources.xsd "> 4 xsi:schemaLocation="http://implab.org/schemas/resources resources.xsd ">
5 <root> 5 <root>
6 <get expr="model" /> 6 <get expr="$model" />
7 7
8 <resource> 8 <resource>
9 <name>projects</name> 9 <name>projects</name>
10 <model expr="model" /> 10 <model expr="$model" />
11 <get expr="model.projects" /> 11 <get expr="$model->projects" />
12 12
13 <post expr="model.CreateProject(project)"> 13 <post expr="$model->CreateProject($project)">
14 <var name="project"> 14 <var name="project">
15 <transform class="IMPL::Web::Transform::BindModel" /> 15 <transform class="IMPL::Web::Transform::BindModel" />
16 </var> 16 </var>
17 <response> 17 <response>
18 <redirect> 18 <redirect>
21 </response> 21 </response>
22 </post> 22 </post>
23 23
24 <resource> 24 <resource>
25 <match>(\w+)</match> 25 <match>(\w+)</match>
26 <model expr="model.GetProject(resourceId)" /> 26 <model expr="$model->GetProject($resourceId)" />
27 27
28 <get expr="model" /> 28 <get expr="$model" />
29 <put expr="model.update(data)"> 29 <put expr="$model->update(data)">
30 <var name="data">
31 <transform class="IMPL::Web::Transform::BindModel" />
32 </var>
30 </put> 33 </put>
31 34
32 <resource> 35 <resource>
33 <name>library</name> 36 <name>library</name>
34 <model expr="model" /> 37 <model expr="$model" />
35 <get expr="model" /> 38 <get expr="$model" />
36 </resource> 39 </resource>
37 <resource> 40 <resource>
38 <name>sources</name> 41 <name>sources</name>
39 <model expr="model" /> 42 <model expr="$model" />
40 <get expr="model" /> 43 <get expr="$model" />
41 </resource> 44 </resource>
42 </resource> 45 </resource>
43 </resource> 46 </resource>
44 </root> 47 </root>
45 <contracts> 48 <contracts>
46 <contract id="project-contract"> 49 <contract id="project-contract" modelType="IMPL::Web::Model::Project">
47 <modelType>Benzin::Model::Project</modelType> 50 <get expr="$model"/>
48 <get expr="model"/>
49 </contract> 51 </contract>
50 </contracts> 52 </contracts>
51 </resources> 53 </resources>