mirror of
https://github.com/friendica/friendica
synced 2024-12-25 20:00:16 +00:00
24 lines
466 B
PHP
24 lines
466 B
PHP
|
<?php
|
||
|
|
||
|
namespace Friendica\Protocol;
|
||
|
|
||
|
/**
|
||
|
* Base class for the Activity namespace
|
||
|
*/
|
||
|
final class Activity
|
||
|
{
|
||
|
/**
|
||
|
* Compare activity uri. Knows about activity namespace.
|
||
|
*
|
||
|
* @param string $haystack
|
||
|
* @param string $needle
|
||
|
*
|
||
|
* @return boolean
|
||
|
*/
|
||
|
public function match(string $haystack, string $needle) {
|
||
|
return (($haystack === $needle) ||
|
||
|
((basename($needle) === $haystack) &&
|
||
|
strstr($needle, NAMESPACE_ACTIVITY_SCHEMA)));
|
||
|
}
|
||
|
}
|