blob: 2a5d8f4a2416494f0b7c57fa89dd4eff2bbf8525 [file] [log] [blame]
<?php
/**
* File containing the ezcFeedSkipDaysElement class.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* @package Feed
* @version //autogentag//
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @filesource
*/
/**
* Class defining a skipDays element.
*
* @property array(string) $days
* Which days to skip when retrieving a feed, for example
* array('Saturday', 'Sunday').
* @package Feed
* @version //autogentag//
*/
class ezcFeedSkipDaysElement extends ezcFeedElement
{
/**
* Sets the property $name to $value.
*
* @param string $name The property name
* @param mixed $value The property value
* @ignore
*/
public function __set( $name, $value )
{
switch ( $name )
{
case 'days':
if ( !is_array( $value ) )
{
$value = array( $value );
}
$this->properties[$name] = $value;
break;
default:
parent::__set( $name, $value );
}
}
/**
* Returns the value of property $name.
*
* @param string $name The property name
* @return mixed
* @ignore
*/
public function __get( $name )
{
switch ( $name )
{
case 'days':
if ( isset( $this->properties[$name] ) )
{
return $this->properties[$name];
}
break;
default:
return parent::__get( $name );
}
}
}
?>