1 | <?php |
||
8 | class GraphQLManager implements GraphQLManagerContract |
||
9 | { |
||
10 | /** |
||
11 | * The application instance. |
||
12 | * |
||
13 | * @var \Illuminate\Foundation\Application |
||
14 | */ |
||
15 | protected $app; |
||
16 | |||
17 | /** |
||
18 | * The array of resolved schemas. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $schemas = []; |
||
23 | |||
24 | /** |
||
25 | * Create a new manager instance. |
||
26 | * |
||
27 | * @param \Illuminate\Foundation\Application $app |
||
28 | * @return void |
||
|
|||
29 | */ |
||
30 | public function __construct($app) |
||
34 | |||
35 | /** |
||
36 | * Get a schema implementation by name. |
||
37 | * |
||
38 | * @param string $name |
||
39 | * @return void |
||
40 | */ |
||
41 | public function schema($name = null) |
||
47 | |||
48 | /** |
||
49 | * Attempt to get the schema from the local cache. |
||
50 | * |
||
51 | * @param string $name |
||
52 | * @return \Youshido\GraphQL\Schema\AbstractSchema |
||
53 | */ |
||
54 | protected function get($name) |
||
58 | |||
59 | /** |
||
60 | * Resolve the given store. |
||
61 | * |
||
62 | * @param string $name |
||
63 | * @return \Youshido\GraphQL\Schema\AbstractSchema |
||
64 | * |
||
65 | * @throws \InvalidArgumentException |
||
66 | */ |
||
67 | protected function resolve($name) |
||
77 | |||
78 | /** |
||
79 | * Get the schema configuration. |
||
80 | * |
||
81 | * @param string $name |
||
82 | * @return array |
||
83 | */ |
||
84 | protected function getClass($name) |
||
88 | |||
89 | /** |
||
90 | * Get the default schema name. |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getDefaultSchema() |
||
98 | } |
||
99 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.