Cdn.php

Go to the documentation of this file.
00001 <?php
00002 
00031 class Robo47_View_Helper_Cdn extends Zend_View_Helper_Abstract
00032 {
00033 
00037     protected $_cdn = '';
00038 
00044     public function __construct($cdn = '')
00045     {
00046         $this->setCdn($cdn);
00047     }
00048 
00054     public function Cdn($path = null)
00055     {
00056         if (null === $path) {
00057             return $this;
00058         } else {
00059             return $this->_cdn . $path;
00060         }
00061     }
00062 
00068     public function setCdn($cdn)
00069     {
00070         $this->_cdn = (string) $cdn;
00071         return $this;
00072     }
00073 
00079     public function getCdn()
00080     {
00081         return $this->_cdn;
00082     }
00083 
00089     public function __toString()
00090     {
00091         return (string) $this->_cdn;
00092     }
00093 }