/** * Optional: Specifies a GIF, JPEG or PNG image that can be displayed with the channel. * * @param string $imageURL * @param string $imageTitle * @return void * @access public * @since 8/7/06 */ function setImage($imageURL, $imageHeight = null, $imageWidth = null, $imageTitle = null, $imageLink = null, $imageDescription = null) { ArgumentValidator::validate($imageURL, StringValidatorRule::getRule()); ArgumentValidator::validate($imageHeight, OptionalRule::getRule(IntegerValidatorRule::getRule())); ArgumentValidator::validate($imageHeight, OptionalRule::getRule(IntegerRangeValidatorRule::getRule(1, 400))); ArgumentValidator::validate($imageWidth, OptionalRule::getRule(IntegerValidatorRule::getRule())); ArgumentValidator::validate($imageWidth, OptionalRule::getRule(IntegerRangeValidatorRule::getRule(1, 144))); ArgumentValidator::validate($imageLink, OptionalRule::getRule(StringValidatorRule::getRule())); ArgumentValidator::validate($imageDescription, OptionalRule::getRule(StringValidatorRule::getRule())); $this->_imageURL = $imageURL; if ($imageTitle) { $this->_imageTitle = $imageTitle; } if ($imageLink) { $this->_imageLink = $imageLink; } if ($imageDescription) { $this->_imageDescription = $imageDescription; } if ($imageHeight) { $this->_imageHeight = $imageHeight; } if ($imageWidth) { $this->_imageWidth = $imageWidth; } }
/** * Returns a <code> </code>previously registered by <code>registerSP()</code> * for the given id. * @access public * @param integer id The id identifying which StyleProperty to return; as returned * by <code>registerSP()</code>. * @return ref object A <code>StylePorperty</code> object. **/ function getRegisteredSP($id) { // ** parameter validation $rule = IntegerRangeValidatorRule::getRule(0, count($this->_registeredSPs) - 1); ArgumentValidator::validate($sp, $rule, true); // ** end of parameter validation return $this->_registeredSPs[$id]; }