本文整理汇总了PHP中eZURLAliasML::nodeIDFromAction方法的典型用法代码示例。如果您正苦于以下问题:PHP eZURLAliasML::nodeIDFromAction方法的具体用法?PHP eZURLAliasML::nodeIDFromAction怎么用?PHP eZURLAliasML::nodeIDFromAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZURLAliasML
的用法示例。
在下文中一共展示了eZURLAliasML::nodeIDFromAction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchNodeIDByPath
public static function fetchNodeIDByPath($uriString, $glob = false)
{
$nodeID = false;
$urlAliasMLList = eZURLAliasML::fetchByPath($uriString, $glob);
if (is_array($urlAliasMLList) && count($urlAliasMLList) > 0) {
$nodeID = eZURLAliasML::nodeIDFromAction($urlAliasMLList[0]->Action);
}
return $nodeID;
}
示例2: testNodeIDFromAction
public function testNodeIDFromAction()
{
$action1 = "eznod:2";
// not valid action
$action2 = " ";
// not valid action
$action3 = "eznode;2";
// not valid action
$action4 = "ezblaa:2";
// not valid action
$action5 = "eznode:2";
// valid action
self::assertEquals(false, eZURLAliasML::nodeIDFromAction($action1));
self::assertEquals(false, eZURLAliasML::nodeIDFromAction($action2));
self::assertEquals(false, eZURLAliasML::nodeIDFromAction($action3));
self::assertEquals(false, eZURLAliasML::nodeIDFromAction($action4));
self::assertEquals((int) 2, eZURLAliasML::nodeIDFromAction($action5));
}