0
與Zend Framework 1.x一樣,如何測試是否設置了佔位符值(或者是否包含內容)?Zend Framework 2:檢查佔位符是否已設置(或不爲空)
我知道我可以做
$content = $this->placeholder('something')->getValue();
if (!empty($content)) {
echo $content;
}
但我寧願直接檢查。像
if (.. test $this->placeholder('something') has content ..) {
echo $this->placeholder('something');
}