/** * @param $picture * @return null|string */ private function getWebPath($picture) { $productCategory = new ProductCategory(); return null === $picture ? null : $productCategory->getUploadDir() . $picture; }