public function setDirectories(BBApplication $application = null)
    {
        if (null !== $application) {
            $this->_application = $application;

            $this->setTemporaryDir($application->getTemporaryDir())
                    ->setStorageDir($application->getStorageDir())
                    ->setMediaDir($application->getMediaDir());
        }

        return $this;
    }