Skip to content

Commit 5272a25

Browse files
simon-schubertOskarStark
authored andcommitted
Workflow: align Example for property access with implementation of Me…
1 parent 4f0cd5a commit 5272a25

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

workflow.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,25 @@ like this:
160160
If you are creating your first workflows, consider using the ``workflow:dump``
161161
command to :doc:`debug the workflow contents </workflow/dumping-workflows>`.
162162

163-
As configured, the following property is used by the marking store::
163+
The configured property will be used via it's implemented getter/setter methods by the marking store::
164164

165165
class BlogPost
166166
{
167-
// This property is used by the marking store
168-
public $currentPlace;
169-
public $title;
170-
public $content;
167+
// the configured property must be declared
168+
private $currentPlace;
169+
private $title;
170+
private $content;
171+
172+
// getter/setter methods must exist for property access by the marking store
173+
public function getCurrentPlace()
174+
{
175+
return $this->currentPlace;
176+
}
177+
178+
public function setCurrentPlace($currentPlace, $context = [])
179+
{
180+
$this->currentPlace = $currentPlace;
181+
}
171182
}
172183

173184
.. note::

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy