|
@@ -39,7 +39,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
|
|
|
* Types of attributes
|
|
* Types of attributes
|
|
|
* @var array
|
|
* @var array
|
|
|
*/
|
|
*/
|
|
|
- protected $_typeKeys = array('name', 'http-equiv', 'charset');
|
|
|
|
|
|
|
+ protected $_typeKeys = array('name', 'http-equiv', 'charset', 'property');
|
|
|
protected $_requiredKeys = array('content');
|
|
protected $_requiredKeys = array('content');
|
|
|
protected $_modifierKeys = array('lang', 'scheme');
|
|
protected $_modifierKeys = array('lang', 'scheme');
|
|
|
|
|
|
|
@@ -98,6 +98,8 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
|
|
|
return 'name';
|
|
return 'name';
|
|
|
case 'HttpEquiv':
|
|
case 'HttpEquiv':
|
|
|
return 'http-equiv';
|
|
return 'http-equiv';
|
|
|
|
|
+ case 'Property':
|
|
|
|
|
+ return 'property';
|
|
|
default:
|
|
default:
|
|
|
require_once 'Zend/View/Exception.php';
|
|
require_once 'Zend/View/Exception.php';
|
|
|
$e = new Zend_View_Exception(sprintf('Invalid type "%s" passed to _normalizeType', $type));
|
|
$e = new Zend_View_Exception(sprintf('Invalid type "%s" passed to _normalizeType', $type));
|
|
@@ -118,6 +120,10 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
|
|
|
* - offsetGetHttpEquiv($index, $keyValue, $content, $modifers = array())
|
|
* - offsetGetHttpEquiv($index, $keyValue, $content, $modifers = array())
|
|
|
* - prependHttpEquiv($keyValue, $content, $modifiers = array())
|
|
* - prependHttpEquiv($keyValue, $content, $modifiers = array())
|
|
|
* - setHttpEquiv($keyValue, $content, $modifiers = array())
|
|
* - setHttpEquiv($keyValue, $content, $modifiers = array())
|
|
|
|
|
+ * - appendProperty($keyValue, $content, $modifiers = array())
|
|
|
|
|
+ * - offsetGetProperty($index, $keyValue, $content, $modifiers = array())
|
|
|
|
|
+ * - prependProperty($keyValue, $content, $modifiers = array())
|
|
|
|
|
+ * - setProperty($keyValue, $content, $modifiers = array())
|
|
|
*
|
|
*
|
|
|
* @param string $method
|
|
* @param string $method
|
|
|
* @param array $args
|
|
* @param array $args
|
|
@@ -125,7 +131,7 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
|
|
|
*/
|
|
*/
|
|
|
public function __call($method, $args)
|
|
public function __call($method, $args)
|
|
|
{
|
|
{
|
|
|
- if (preg_match('/^(?P<action>set|(pre|ap)pend|offsetSet)(?P<type>Name|HttpEquiv)$/', $method, $matches)) {
|
|
|
|
|
|
|
+ if (preg_match('/^(?P<action>set|(pre|ap)pend|offsetSet)(?P<type>Name|HttpEquiv|Property)$/', $method, $matches)) {
|
|
|
$action = $matches['action'];
|
|
$action = $matches['action'];
|
|
|
$type = $this->_normalizeType($matches['type']);
|
|
$type = $this->_normalizeType($matches['type']);
|
|
|
$argc = count($args);
|
|
$argc = count($args);
|
|
@@ -202,6 +208,12 @@ class Zend_View_Helper_HeadMeta extends Zend_View_Helper_Placeholder_Container_S
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // <meta property= ... /> is only supported with doctype RDFa
|
|
|
|
|
+ if (!$this->view->doctype()->isRdfa()
|
|
|
|
|
+ && $item->type === 'property') {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|