File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ require 'vendor/autoload.php ' ;
4
+
5
+ use Blueprint \Lexers \Lexer ;
6
+ use Blueprint \Parsers \Parser ;
7
+ use Blueprint \Generators \Generator ;
8
+
9
+ $ contents = file_get_contents ('sample.yaml ' );
10
+
11
+ $ tokens = Parser::parse ($ contents );
12
+ $ registry = Lexer::analyze ($ tokens );
13
+ Generator::generate ($ registry );
14
+
Original file line number Diff line number Diff line change
1
+ models :
2
+ Post :
3
+ title : string
4
+ content : bigtext
5
+ published_at : nullable timestamp
6
+
7
+
8
+ controllers :
9
+ Post :
10
+ index :
11
+ query : all posts
12
+ render : post.index with posts
13
+
14
+ store :
15
+ validate : title, content
16
+ save : post
17
+ send : ReviewNotifcation to post.author
18
+ queue : SyncMedia
19
+ flash : post.title
20
+ redirect : post.index
21
+
22
+ commands :
You can’t perform that action at this time.
0 commit comments