src/Zicht/Bundle/UrlBundle/Aliasing/DefaultAliasingStrategy.php
public function generatePublicAlias($subject, $currentAlias = '')
    {
        if (is_object($subject)) {
            if ($subject instanceof Aliasable) {
                $subject = (string)$subject->getAliasTitle();
            } elseif (method_exists($subject, 'getTitle')) {
                $subject = (string)$subject->getTitle();
            } else {
                $subject = (string)$subject;
            }
        }
        if (!is_string($subject)) {
            throw new \InvalidArgumentException('Expected a string or object as subject, got ' . gettype($subject));
        }

        if ($alias = $this->toAlias($subject)) {
            return $this->basePath . $alias;
        }
        return null;
    }
public function generatePublicAlias($subject, $currentAlias = '')
    {
        if (is_object($subject)) {
            if ($subject instanceof Aliasable) {
                $subject = (string)$subject->getAliasTitle();
            } elseif (method_exists($subject, 'getTitle')) {
                $subject = (string)$subject->getTitle();
            } else {
                $subject = (string)$subject;
            }
        }
        if (!is_string($subject)) {
            throw new \InvalidArgumentException('Expected a string or object as subject, got ' . gettype($subject));
        }

        if ($alias = $this->toAlias($subject)) {
            return $this->basePath . $alias;
        }
        return null;
    }
public function generatePublicAlias ( $ subject , $ currentAlias = '' ) { if ( is_object ( $ subject ) ) { if ( $ subject instanceof Aliasable ) { $ subject = ( string ) $ subject -> getAliasTitle ( ) ; } elseif ( method_exists ( $ subject , 'getTitle' ) ) { $ subject = ( string ) $ subject -> getTitle ( ) ; } else { $ subject = ( string ) $ subject ; } } if ( ! is_string ( $ subject ) ) { throw new \ InvalidArgumentException ( 'Expected a string or object as subject, got ' . gettype ( $ subject ) ) ; } if ( $ alias = $ this -> toAlias ( $ subject ) ) { return $ this -> basePath . $ alias ; } return null ; }
Returns the calculated public alias for the specified object.

@param string $subject
@param string $currentAlias
@return null|string
@throws \InvalidArgumentException
Returns the calculated public alias for the specified object .