1 | <?php |
||
13 | class RelationshipPropertyExtractor |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private static $forbiddenFunction = [ |
||
19 | 'forceDelete', |
||
20 | 'forceFill', |
||
21 | 'delete', |
||
22 | 'newQueryWithoutScopes', |
||
23 | 'newQuery', |
||
24 | 'bootIfNotBooted', |
||
25 | 'boot', |
||
26 | 'bootTraits', |
||
27 | 'clearBootedModels', |
||
28 | 'query', |
||
29 | 'onWriteConnection', |
||
30 | 'delete', |
||
31 | 'forceDelete', |
||
32 | 'performDeleteOnModel', |
||
33 | 'flushEventListeners', |
||
34 | 'push', |
||
35 | 'touchOwners', |
||
36 | 'touch', |
||
37 | 'updateTimestamps', |
||
38 | 'freshTimestamp', |
||
39 | 'freshTimestampString', |
||
40 | 'newQuery', |
||
41 | 'newQueryWithoutScopes', |
||
42 | 'newBaseQueryBuilder', |
||
43 | 'usesTimestamps', |
||
44 | 'reguard', |
||
45 | 'isUnguarded', |
||
46 | 'totallyGuarded', |
||
47 | 'syncOriginal', |
||
48 | 'getConnectionResolver', |
||
49 | 'unsetConnectionResolver', |
||
50 | 'getEventDispatcher', |
||
51 | 'unsetEventDispatcher', |
||
52 | '__toString', |
||
53 | '__wakeup', |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * @param $value |
||
58 | * @param $className |
||
59 | * @param ReflectionClass $reflection |
||
60 | * @param Driver $serializer |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | public static function getRelationshipAsPropertyName( |
||
121 | |||
122 | /** |
||
123 | * @param $name |
||
124 | * |
||
125 | * @return bool |
||
126 | */ |
||
127 | protected static function isAllowedEloquentModelFunction($name) |
||
131 | |||
132 | /** |
||
133 | * @param $returned |
||
134 | * |
||
135 | * @return bool |
||
136 | */ |
||
137 | protected static function isAnEloquentRelation($returned) |
||
141 | |||
142 | /** |
||
143 | * @param Driver $serializer |
||
144 | * @param Model $model |
||
145 | * |
||
146 | * @return array |
||
147 | */ |
||
148 | protected static function getModelData(Driver $serializer, Model $model) |
||
156 | } |
||
157 |