Exemplo n.º 1
0
    /**
     * Return base path to profile image, including account name by default
     *
     * @param bool $_accountName
     * @return string
     */
    protected function _getImageBasePath($_accountName = true)
    {
        $registry = Zend_Registry::getInstance();
        /** @var $config Zend_Config */
        $config = $registry->get('config');
        $imageBasePath = $config->application->image->basePath;

        $basePath = $imageBasePath
                . DIRECTORY_SEPARATOR
                . self::USER_IMAGE_DIRECTORY_NAME
                . DIRECTORY_SEPARATOR;
        if($_accountName) {
            $basePath .= $this->_account->getNickname() . DIRECTORY_SEPARATOR;
        }

        return $basePath;
    }