1 | <?php |
||
22 | abstract class AbstractFilingSubscriber implements EventSubscriberInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var NodeManager |
||
26 | */ |
||
27 | private $nodeManager; |
||
28 | |||
29 | /** |
||
30 | * @param NodeManager $nodeManager |
||
31 | */ |
||
32 | public function __construct( |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public static function getSubscribedEvents() |
||
47 | |||
48 | public function handlePersist(PersistEvent $event) |
||
61 | |||
62 | /** |
||
63 | * Generates the path for the given event. |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | abstract protected function generatePath(PersistEvent $event); |
||
68 | |||
69 | /** |
||
70 | * Return true if this subscriber should be applied to the document. |
||
71 | * |
||
72 | * @param object $document |
||
73 | */ |
||
74 | abstract protected function supports($document); |
||
75 | |||
76 | /** |
||
77 | * Return the name of the parent document. |
||
78 | * |
||
79 | * @param $document |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | abstract protected function getParentName($document); |
||
84 | } |
||
85 |