/package/app/app/alpha/lib/model/om/Basekshow.php
PHP | 5880 lines | 3184 code | 799 blank | 1897 comment | 674 complexity | 0217b41aa4eb80dc78bc623066e826cf MD5 | raw file
Possible License(s): AGPL-3.0, GPL-3.0, BSD-3-Clause, LGPL-2.1, GPL-2.0, LGPL-3.0, JSON, MPL-2.0-no-copyleft-exception, Apache-2.0
Large files files are truncated, but you can click here to view the full file
- <?php
- /**
- * Base class that represents a row from the 'kshow' table.
- *
- *
- *
- * @package Core
- * @subpackage model.om
- */
- abstract class Basekshow extends BaseObject implements Persistent {
- /**
- * The Peer class.
- * Instance provides a convenient way of calling static methods on a class
- * that calling code may not be able to identify.
- * @var kshowPeer
- */
- protected static $peer;
- /**
- * The value for the id field.
- * @var string
- */
- protected $id;
- /**
- * The value for the producer_id field.
- * @var int
- */
- protected $producer_id;
- /**
- * The value for the episode_id field.
- * @var string
- */
- protected $episode_id;
- /**
- * The value for the name field.
- * @var string
- */
- protected $name;
- /**
- * The value for the subdomain field.
- * @var string
- */
- protected $subdomain;
- /**
- * The value for the description field.
- * @var string
- */
- protected $description;
- /**
- * The value for the status field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $status;
- /**
- * The value for the type field.
- * @var int
- */
- protected $type;
- /**
- * The value for the media_type field.
- * @var int
- */
- protected $media_type;
- /**
- * The value for the format_type field.
- * @var int
- */
- protected $format_type;
- /**
- * The value for the language field.
- * @var int
- */
- protected $language;
- /**
- * The value for the start_date field.
- * @var string
- */
- protected $start_date;
- /**
- * The value for the end_date field.
- * @var string
- */
- protected $end_date;
- /**
- * The value for the skin field.
- * @var string
- */
- protected $skin;
- /**
- * The value for the thumbnail field.
- * @var string
- */
- protected $thumbnail;
- /**
- * The value for the show_entry_id field.
- * @var string
- */
- protected $show_entry_id;
- /**
- * The value for the intro_id field.
- * @var int
- */
- protected $intro_id;
- /**
- * The value for the views field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $views;
- /**
- * The value for the votes field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $votes;
- /**
- * The value for the comments field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $comments;
- /**
- * The value for the favorites field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $favorites;
- /**
- * The value for the rank field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $rank;
- /**
- * The value for the entries field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $entries;
- /**
- * The value for the contributors field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $contributors;
- /**
- * The value for the subscribers field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $subscribers;
- /**
- * The value for the number_of_updates field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $number_of_updates;
- /**
- * The value for the tags field.
- * @var string
- */
- protected $tags;
- /**
- * The value for the custom_data field.
- * @var string
- */
- protected $custom_data;
- /**
- * The value for the indexed_custom_data_1 field.
- * @var int
- */
- protected $indexed_custom_data_1;
- /**
- * The value for the indexed_custom_data_2 field.
- * @var int
- */
- protected $indexed_custom_data_2;
- /**
- * The value for the indexed_custom_data_3 field.
- * @var string
- */
- protected $indexed_custom_data_3;
- /**
- * The value for the reoccurence field.
- * @var int
- */
- protected $reoccurence;
- /**
- * The value for the license_type field.
- * @var int
- */
- protected $license_type;
- /**
- * The value for the length_in_msecs field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $length_in_msecs;
- /**
- * The value for the view_permissions field.
- * @var int
- */
- protected $view_permissions;
- /**
- * The value for the view_password field.
- * @var string
- */
- protected $view_password;
- /**
- * The value for the contrib_permissions field.
- * @var int
- */
- protected $contrib_permissions;
- /**
- * The value for the contrib_password field.
- * @var string
- */
- protected $contrib_password;
- /**
- * The value for the edit_permissions field.
- * @var int
- */
- protected $edit_permissions;
- /**
- * The value for the edit_password field.
- * @var string
- */
- protected $edit_password;
- /**
- * The value for the salt field.
- * @var string
- */
- protected $salt;
- /**
- * The value for the created_at field.
- * @var string
- */
- protected $created_at;
- /**
- * The value for the updated_at field.
- * @var string
- */
- protected $updated_at;
- /**
- * The value for the partner_id field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $partner_id;
- /**
- * The value for the display_in_search field.
- * @var int
- */
- protected $display_in_search;
- /**
- * The value for the subp_id field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $subp_id;
- /**
- * The value for the search_text field.
- * @var string
- */
- protected $search_text;
- /**
- * The value for the permissions field.
- * @var string
- */
- protected $permissions;
- /**
- * The value for the group_id field.
- * @var string
- */
- protected $group_id;
- /**
- * The value for the plays field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $plays;
- /**
- * The value for the partner_data field.
- * @var string
- */
- protected $partner_data;
- /**
- * The value for the int_id field.
- * @var int
- */
- protected $int_id;
- /**
- * @var kuser
- */
- protected $akuser;
- /**
- * @var array entry[] Collection to store aggregation of entry objects.
- */
- protected $collentrys;
- /**
- * @var Criteria The criteria used to select the current contents of collentrys.
- */
- private $lastentryCriteria = null;
- /**
- * @var array kvote[] Collection to store aggregation of kvote objects.
- */
- protected $collkvotesRelatedByKshowId;
- /**
- * @var Criteria The criteria used to select the current contents of collkvotesRelatedByKshowId.
- */
- private $lastkvoteRelatedByKshowIdCriteria = null;
- /**
- * @var array kvote[] Collection to store aggregation of kvote objects.
- */
- protected $collkvotesRelatedByKuserId;
- /**
- * @var Criteria The criteria used to select the current contents of collkvotesRelatedByKuserId.
- */
- private $lastkvoteRelatedByKuserIdCriteria = null;
- /**
- * @var array KshowKuser[] Collection to store aggregation of KshowKuser objects.
- */
- protected $collKshowKusers;
- /**
- * @var Criteria The criteria used to select the current contents of collKshowKusers.
- */
- private $lastKshowKuserCriteria = null;
- /**
- * @var array PuserRole[] Collection to store aggregation of PuserRole objects.
- */
- protected $collPuserRoles;
- /**
- * @var Criteria The criteria used to select the current contents of collPuserRoles.
- */
- private $lastPuserRoleCriteria = null;
- /**
- * @var array roughcutEntry[] Collection to store aggregation of roughcutEntry objects.
- */
- protected $collroughcutEntrys;
- /**
- * @var Criteria The criteria used to select the current contents of collroughcutEntrys.
- */
- private $lastroughcutEntryCriteria = null;
- /**
- * @var array widget[] Collection to store aggregation of widget objects.
- */
- protected $collwidgets;
- /**
- * @var Criteria The criteria used to select the current contents of collwidgets.
- */
- private $lastwidgetCriteria = null;
- /**
- * Flag to prevent endless save loop, if this object is referenced
- * by another object which falls in this transaction.
- * @var boolean
- */
- protected $alreadyInSave = false;
- /**
- * Flag to prevent endless validation loop, if this object is referenced
- * by another object which falls in this transaction.
- * @var boolean
- */
- protected $alreadyInValidation = false;
- /**
- * Store columns old values before the changes
- * @var array
- */
- protected $oldColumnsValues = array();
-
- /**
- * @return array
- */
- public function getColumnsOldValues()
- {
- return $this->oldColumnsValues;
- }
- /**
- * Applies default values to this object.
- * This method should be called from the object's constructor (or
- * equivalent initialization method).
- * @see __construct()
- */
- public function applyDefaultValues()
- {
- $this->status = 0;
- $this->views = 0;
- $this->votes = 0;
- $this->comments = 0;
- $this->favorites = 0;
- $this->rank = 0;
- $this->entries = 0;
- $this->contributors = 0;
- $this->subscribers = 0;
- $this->number_of_updates = 0;
- $this->length_in_msecs = 0;
- $this->partner_id = 0;
- $this->subp_id = 0;
- $this->plays = 0;
- }
- /**
- * Initializes internal state of Basekshow object.
- * @see applyDefaults()
- */
- public function __construct()
- {
- parent::__construct();
- $this->applyDefaultValues();
- }
- /**
- * Get the [id] column value.
- *
- * @return string
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Get the [producer_id] column value.
- *
- * @return int
- */
- public function getProducerId()
- {
- return $this->producer_id;
- }
- /**
- * Get the [episode_id] column value.
- *
- * @return string
- */
- public function getEpisodeId()
- {
- return $this->episode_id;
- }
- /**
- * Get the [name] column value.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Get the [subdomain] column value.
- *
- * @return string
- */
- public function getSubdomain()
- {
- return $this->subdomain;
- }
- /**
- * Get the [description] column value.
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
- /**
- * Get the [status] column value.
- *
- * @return int
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Get the [type] column value.
- *
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
- /**
- * Get the [media_type] column value.
- *
- * @return int
- */
- public function getMediaType()
- {
- return $this->media_type;
- }
- /**
- * Get the [format_type] column value.
- *
- * @return int
- */
- public function getFormatType()
- {
- return $this->format_type;
- }
- /**
- * Get the [language] column value.
- *
- * @return int
- */
- public function getLanguage()
- {
- return $this->language;
- }
- /**
- * Get the [optionally formatted] temporal [start_date] column value.
- *
- * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
- * option in order to avoid converstions to integers (which are limited in the dates they can express).
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw unix timestamp integer will be returned.
- * @return mixed Formatted date/time value as string or (integer) unix timestamp (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00
- * @throws PropelException - if unable to parse/validate the date/time value.
- */
- public function getStartDate($format = '%x')
- {
- if ($this->start_date === null) {
- return null;
- }
- if ($this->start_date === '0000-00-00') {
- // while technically this is not a default value of NULL,
- // this seems to be closest in meaning.
- return null;
- } else {
- try {
- $dt = new DateTime($this->start_date);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->start_date, true), $x);
- }
- }
- if ($format === null) {
- // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
- return (int) $dt->format('U');
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
- }
- /**
- * Get the [optionally formatted] temporal [end_date] column value.
- *
- * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
- * option in order to avoid converstions to integers (which are limited in the dates they can express).
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw unix timestamp integer will be returned.
- * @return mixed Formatted date/time value as string or (integer) unix timestamp (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00
- * @throws PropelException - if unable to parse/validate the date/time value.
- */
- public function getEndDate($format = '%x')
- {
- if ($this->end_date === null) {
- return null;
- }
- if ($this->end_date === '0000-00-00') {
- // while technically this is not a default value of NULL,
- // this seems to be closest in meaning.
- return null;
- } else {
- try {
- $dt = new DateTime($this->end_date);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->end_date, true), $x);
- }
- }
- if ($format === null) {
- // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
- return (int) $dt->format('U');
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
- }
- /**
- * Get the [skin] column value.
- *
- * @return string
- */
- public function getSkin()
- {
- return $this->skin;
- }
- /**
- * Get the [thumbnail] column value.
- *
- * @return string
- */
- public function getThumbnail()
- {
- return $this->thumbnail;
- }
- /**
- * Get the [show_entry_id] column value.
- *
- * @return string
- */
- public function getShowEntryId()
- {
- return $this->show_entry_id;
- }
- /**
- * Get the [intro_id] column value.
- *
- * @return int
- */
- public function getIntroId()
- {
- return $this->intro_id;
- }
- /**
- * Get the [views] column value.
- *
- * @return int
- */
- public function getViews()
- {
- return $this->views;
- }
- /**
- * Get the [votes] column value.
- *
- * @return int
- */
- public function getVotes()
- {
- return $this->votes;
- }
- /**
- * Get the [comments] column value.
- *
- * @return int
- */
- public function getComments()
- {
- return $this->comments;
- }
- /**
- * Get the [favorites] column value.
- *
- * @return int
- */
- public function getFavorites()
- {
- return $this->favorites;
- }
- /**
- * Get the [rank] column value.
- *
- * @return int
- */
- public function getRank()
- {
- return $this->rank;
- }
- /**
- * Get the [entries] column value.
- *
- * @return int
- */
- public function getEntries()
- {
- return $this->entries;
- }
- /**
- * Get the [contributors] column value.
- *
- * @return int
- */
- public function getContributors()
- {
- return $this->contributors;
- }
- /**
- * Get the [subscribers] column value.
- *
- * @return int
- */
- public function getSubscribers()
- {
- return $this->subscribers;
- }
- /**
- * Get the [number_of_updates] column value.
- *
- * @return int
- */
- public function getNumberOfUpdates()
- {
- return $this->number_of_updates;
- }
- /**
- * Get the [tags] column value.
- *
- * @return string
- */
- public function getTags()
- {
- return $this->tags;
- }
- /**
- * Get the [custom_data] column value.
- *
- * @return string
- */
- public function getCustomData()
- {
- return $this->custom_data;
- }
- /**
- * Get the [indexed_custom_data_1] column value.
- *
- * @return int
- */
- public function getIndexedCustomData1()
- {
- return $this->indexed_custom_data_1;
- }
- /**
- * Get the [indexed_custom_data_2] column value.
- *
- * @return int
- */
- public function getIndexedCustomData2()
- {
- return $this->indexed_custom_data_2;
- }
- /**
- * Get the [indexed_custom_data_3] column value.
- *
- * @return string
- */
- public function getIndexedCustomData3()
- {
- return $this->indexed_custom_data_3;
- }
- /**
- * Get the [reoccurence] column value.
- *
- * @return int
- */
- public function getReoccurence()
- {
- return $this->reoccurence;
- }
- /**
- * Get the [license_type] column value.
- *
- * @return int
- */
- public function getLicenseType()
- {
- return $this->license_type;
- }
- /**
- * Get the [length_in_msecs] column value.
- *
- * @return int
- */
- public function getLengthInMsecs()
- {
- return $this->length_in_msecs;
- }
- /**
- * Get the [view_permissions] column value.
- *
- * @return int
- */
- public function getViewPermissions()
- {
- return $this->view_permissions;
- }
- /**
- * Get the [view_password] column value.
- *
- * @return string
- */
- public function getViewPassword()
- {
- return $this->view_password;
- }
- /**
- * Get the [contrib_permissions] column value.
- *
- * @return int
- */
- public function getContribPermissions()
- {
- return $this->contrib_permissions;
- }
- /**
- * Get the [contrib_password] column value.
- *
- * @return string
- */
- public function getContribPassword()
- {
- return $this->contrib_password;
- }
- /**
- * Get the [edit_permissions] column value.
- *
- * @return int
- */
- public function getEditPermissions()
- {
- return $this->edit_permissions;
- }
- /**
- * Get the [edit_password] column value.
- *
- * @return string
- */
- public function getEditPassword()
- {
- return $this->edit_password;
- }
- /**
- * Get the [salt] column value.
- *
- * @return string
- */
- public function getSalt()
- {
- return $this->salt;
- }
- /**
- * Get the [optionally formatted] temporal [created_at] column value.
- *
- * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
- * option in order to avoid converstions to integers (which are limited in the dates they can express).
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw unix timestamp integer will be returned.
- * @return mixed Formatted date/time value as string or (integer) unix timestamp (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
- * @throws PropelException - if unable to parse/validate the date/time value.
- */
- public function getCreatedAt($format = 'Y-m-d H:i:s')
- {
- if ($this->created_at === null) {
- return null;
- }
- if ($this->created_at === '0000-00-00 00:00:00') {
- // while technically this is not a default value of NULL,
- // this seems to be closest in meaning.
- return null;
- } else {
- try {
- $dt = new DateTime($this->created_at);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
- }
- }
- if ($format === null) {
- // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
- return (int) $dt->format('U');
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
- }
- /**
- * Get the [optionally formatted] temporal [updated_at] column value.
- *
- * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
- * option in order to avoid converstions to integers (which are limited in the dates they can express).
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw unix timestamp integer will be returned.
- * @return mixed Formatted date/time value as string or (integer) unix timestamp (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
- * @throws PropelException - if unable to parse/validate the date/time value.
- */
- public function getUpdatedAt($format = 'Y-m-d H:i:s')
- {
- if ($this->updated_at === null) {
- return null;
- }
- if ($this->updated_at === '0000-00-00 00:00:00') {
- // while technically this is not a default value of NULL,
- // this seems to be closest in meaning.
- return null;
- } else {
- try {
- $dt = new DateTime($this->updated_at);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
- }
- }
- if ($format === null) {
- // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
- return (int) $dt->format('U');
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
- }
- /**
- * Get the [partner_id] column value.
- *
- * @return int
- */
- public function getPartnerId()
- {
- return $this->partner_id;
- }
- /**
- * Get the [display_in_search] column value.
- *
- * @return int
- */
- public function getDisplayInSearch()
- {
- return $this->display_in_search;
- }
- /**
- * Get the [subp_id] column value.
- *
- * @return int
- */
- public function getSubpId()
- {
- return $this->subp_id;
- }
- /**
- * Get the [search_text] column value.
- *
- * @return string
- */
- public function getSearchText()
- {
- return $this->search_text;
- }
- /**
- * Get the [permissions] column value.
- *
- * @return string
- */
- public function getPermissions()
- {
- return $this->permissions;
- }
- /**
- * Get the [group_id] column value.
- *
- * @return string
- */
- public function getGroupId()
- {
- return $this->group_id;
- }
- /**
- * Get the [plays] column value.
- *
- * @return int
- */
- public function getPlays()
- {
- return $this->plays;
- }
- /**
- * Get the [partner_data] column value.
- *
- * @return string
- */
- public function getPartnerData()
- {
- return $this->partner_data;
- }
- /**
- * Get the [int_id] column value.
- *
- * @return int
- */
- public function getIntId()
- {
- return $this->int_id;
- }
- /**
- * Set the value of [id] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setId($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::ID]))
- $this->oldColumnsValues[kshowPeer::ID] = $this->id;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->id !== $v) {
- $this->id = $v;
- $this->modifiedColumns[] = kshowPeer::ID;
- }
- return $this;
- } // setId()
- /**
- * Set the value of [producer_id] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setProducerId($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::PRODUCER_ID]))
- $this->oldColumnsValues[kshowPeer::PRODUCER_ID] = $this->producer_id;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->producer_id !== $v) {
- $this->producer_id = $v;
- $this->modifiedColumns[] = kshowPeer::PRODUCER_ID;
- }
- if ($this->akuser !== null && $this->akuser->getId() !== $v) {
- $this->akuser = null;
- }
- return $this;
- } // setProducerId()
- /**
- * Set the value of [episode_id] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setEpisodeId($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::EPISODE_ID]))
- $this->oldColumnsValues[kshowPeer::EPISODE_ID] = $this->episode_id;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->episode_id !== $v) {
- $this->episode_id = $v;
- $this->modifiedColumns[] = kshowPeer::EPISODE_ID;
- }
- return $this;
- } // setEpisodeId()
- /**
- * Set the value of [name] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setName($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::NAME]))
- $this->oldColumnsValues[kshowPeer::NAME] = $this->name;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->name !== $v) {
- $this->name = $v;
- $this->modifiedColumns[] = kshowPeer::NAME;
- }
- return $this;
- } // setName()
- /**
- * Set the value of [subdomain] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setSubdomain($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::SUBDOMAIN]))
- $this->oldColumnsValues[kshowPeer::SUBDOMAIN] = $this->subdomain;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->subdomain !== $v) {
- $this->subdomain = $v;
- $this->modifiedColumns[] = kshowPeer::SUBDOMAIN;
- }
- return $this;
- } // setSubdomain()
- /**
- * Set the value of [description] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setDescription($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::DESCRIPTION]))
- $this->oldColumnsValues[kshowPeer::DESCRIPTION] = $this->description;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->description !== $v) {
- $this->description = $v;
- $this->modifiedColumns[] = kshowPeer::DESCRIPTION;
- }
- return $this;
- } // setDescription()
- /**
- * Set the value of [status] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setStatus($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::STATUS]))
- $this->oldColumnsValues[kshowPeer::STATUS] = $this->status;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->status !== $v || $this->isNew()) {
- $this->status = $v;
- $this->modifiedColumns[] = kshowPeer::STATUS;
- }
- return $this;
- } // setStatus()
- /**
- * Set the value of [type] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setType($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::TYPE]))
- $this->oldColumnsValues[kshowPeer::TYPE] = $this->type;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->type !== $v) {
- $this->type = $v;
- $this->modifiedColumns[] = kshowPeer::TYPE;
- }
- return $this;
- } // setType()
- /**
- * Set the value of [media_type] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setMediaType($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::MEDIA_TYPE]))
- $this->oldColumnsValues[kshowPeer::MEDIA_TYPE] = $this->media_type;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->media_type !== $v) {
- $this->media_type = $v;
- $this->modifiedColumns[] = kshowPeer::MEDIA_TYPE;
- }
- return $this;
- } // setMediaType()
- /**
- * Set the value of [format_type] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setFormatType($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::FORMAT_TYPE]))
- $this->oldColumnsValues[kshowPeer::FORMAT_TYPE] = $this->format_type;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->format_type !== $v) {
- $this->format_type = $v;
- $this->modifiedColumns[] = kshowPeer::FORMAT_TYPE;
- }
- return $this;
- } // setFormatType()
- /**
- * Set the value of [language] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setLanguage($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::LANGUAGE]))
- $this->oldColumnsValues[kshowPeer::LANGUAGE] = $this->language;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->language !== $v) {
- $this->language = $v;
- $this->modifiedColumns[] = kshowPeer::LANGUAGE;
- }
- return $this;
- } // setLanguage()
- /**
- * Sets the value of [start_date] column to a normalized version of the date/time value specified.
- *
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return kshow The current object (for fluent API support)
- */
- public function setStartDate($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::START_DATE]))
- $this->oldColumnsValues[kshowPeer::START_DATE] = $this->start_date;
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $dt = null;
- } elseif ($v instanceof DateTime) {
- $dt = $v;
- } else {
- // some string/numeric value passed; we normalize that so that we can
- // validate it.
- try {
- if (is_numeric($v)) { // if it's a unix timestamp
- $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
- // We have to explicitly specify and then change the time zone because of a
- // DateTime bug: http://bugs.php.net/bug.php?id=43003
- $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
- } else {
- $dt = new DateTime($v);
- }
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
- }
- if ( $this->start_date !== null || $dt !== null ) {
- // (nested ifs are a little easier to read in this case)
- $currNorm = ($this->start_date !== null && $tmpDt = new DateTime($this->start_date)) ? $tmpDt->format('Y-m-d') : null;
- $newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;
- if ( ($currNorm !== $newNorm) // normalized values don't match
- )
- {
- $this->start_date = ($dt ? $dt->format('Y-m-d') : null);
- $this->modifiedColumns[] = kshowPeer::START_DATE;
- }
- } // if either are not null
- return $this;
- } // setStartDate()
- /**
- * Sets the value of [end_date] column to a normalized version of the date/time value specified.
- *
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return kshow The current object (for fluent API support)
- */
- public function setEndDate($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::END_DATE]))
- $this->oldColumnsValues[kshowPeer::END_DATE] = $this->end_date;
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $dt = null;
- } elseif ($v instanceof DateTime) {
- $dt = $v;
- } else {
- // some string/numeric value passed; we normalize that so that we can
- // validate it.
- try {
- if (is_numeric($v)) { // if it's a unix timestamp
- $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
- // We have to explicitly specify and then change the time zone because of a
- // DateTime bug: http://bugs.php.net/bug.php?id=43003
- $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
- } else {
- $dt = new DateTime($v);
- }
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
- }
- if ( $this->end_date !== null || $dt !== null ) {
- // (nested ifs are a little easier to read in this case)
- $currNorm = ($this->end_date !== null && $tmpDt = new DateTime($this->end_date)) ? $tmpDt->format('Y-m-d') : null;
- $newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;
- if ( ($currNorm !== $newNorm) // normalized values don't match
- )
- {
- $this->end_date = ($dt ? $dt->format('Y-m-d') : null);
- $this->modifiedColumns[] = kshowPeer::END_DATE;
- }
- } // if either are not null
- return $this;
- } // setEndDate()
- /**
- * Set the value of [skin] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setSkin($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::SKIN]))
- $this->oldColumnsValues[kshowPeer::SKIN] = $this->skin;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->skin !== $v) {
- $this->skin = $v;
- $this->modifiedColumns[] = kshowPeer::SKIN;
- }
- return $this;
- } // setSkin()
- /**
- * Set the value of [thumbnail] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setThumbnail($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::THUMBNAIL]))
- $this->oldColumnsValues[kshowPeer::THUMBNAIL] = $this->thumbnail;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->thumbnail !== $v) {
- $this->thumbnail = $v;
- $this->modifiedColumns[] = kshowPeer::THUMBNAIL;
- }
- return $this;
- } // setThumbnail()
- /**
- * Set the value of [show_entry_id] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setShowEntryId($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::SHOW_ENTRY_ID]))
- $this->oldColumnsValues[kshowPeer::SHOW_ENTRY_ID] = $this->show_entry_id;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->show_entry_id !== $v) {
- $this->show_entry_id = $v;
- $this->modifiedColumns[] = kshowPeer::SHOW_ENTRY_ID;
- }
- return $this;
- } // setShowEntryId()
- /**
- * Set the value of [intro_id] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setIntroId($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::INTRO_ID]))
- $this->oldColumnsValues[kshowPeer::INTRO_ID] = $this->intro_id;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->intro_id !== $v) {
- $this->intro_id = $v;
- $this->modifiedColumns[] = kshowPeer::INTRO_ID;
- }
- return $this;
- } // setIntroId()
- /**
- * Set the value of [views] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setViews($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::VIEWS]))
- $this->oldColumnsValues[kshowPeer::VIEWS] = $this->views;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->views !== $v || $this->isNew()) {
- $this->views = $v;
- $this->modifiedColumns[] = kshowPeer::VIEWS;
- }
- return $this;
- } // setViews()
- /**
- * Set the value of [votes] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setVotes($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::VOTES]))
- $this->oldColumnsValues[kshowPeer::VOTES] = $this->votes;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->votes !== $v || $this->isNew()) {
- $this->votes = $v;
- $this->modifiedColumns[] = kshowPeer::VOTES;
- }
- return $this;
- } // setVotes()
- /**
- * Set the value of [comments] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setComments($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::COMMENTS]))
- $this->oldColumnsValues[kshowPeer::COMMENTS] = $this->comments;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->comments !== $v || $this->isNew()) {
- $this->comments = $v;
- $this->modifiedColumns[] = kshowPeer::COMMENTS;
- }
- return $this;
- } // setComments()
- /**
- * Set the value of [favorites] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setFavorites($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::FAVORITES]))
- $this->oldColumnsValues[kshowPeer::FAVORITES] = $this->favorites;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->favorites !== $v || $this->isNew()) {
- $this->favorites = $v;
- $this->modifiedColumns[] = kshowPeer::FAVORITES;
- }
- return $this;
- } // setFavorites()
- /**
- * Set the value of [rank] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setRank($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::RANK]))
- $this->oldColumnsValues[kshowPeer::RANK] = $this->rank;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->rank !== $v || $this->isNew()) {
- $this->rank = $v;
- $this->modifiedColumns[] = kshowPeer::RANK;
- }
- return $this;
- } // setRank()
- /**
- * Set the value of [entries] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setEntries($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::ENTRIES]))
- $this->oldColumnsValues[kshowPeer::ENTRIES] = $this->entries;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->entries !== $v || $this->isNew()) {
- $this->entries = $v;
- $this->modifiedColumns[] = kshowPeer::ENTRIES;
- }
- return $this;
- } // setEntries()
- /**
- * Set the value of [contributors] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setContributors($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::CONTRIBUTORS]))
- $this->oldColumnsValues[kshowPeer::CONTRIBUTORS] = $this->contributors;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->contributors !== $v || $this->isNew()) {
- $this->contributors = $v;
- $this->modifiedColumns[] = kshowPeer::CONTRIBUTORS;
- }
- return $this;
- } // setContributors()
- /**
- * Set the value of [subscribers] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setSubscribers($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::SUBSCRIBERS]))
- $this->oldColumnsValues[kshowPeer::SUBSCRIBERS] = $this->subscribers;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->subscribers !== $v || $this->isNew()) {
- $this->subscribers = $v;
- $this->modifiedColumns[] = kshowPeer::SUBSCRIBERS;
- }
- return $this;
- } // setSubscribers()
- /**
- * Set the value of [number_of_updates] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setNumberOfUpdates($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::NUMBER_OF_UPDATES]))
- $this->oldColumnsValues[kshowPeer::NUMBER_OF_UPDATES] = $this->number_of_updates;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->number_of_updates !== $v || $this->isNew()) {
- $this->number_of_updates = $v;
- $this->modifiedColumns[] = kshowPeer::NUMBER_OF_UPDATES;
- }
- return $this;
- } // setNumberOfUpdates()
- /**
- * Set the value of [tags] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setTags($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::TAGS]))
- $this->oldColumnsValues[kshowPeer::TAGS] = $this->tags;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->tags !== $v) {
- $this->tags = $v;
- $this->modifiedColumns[] = kshowPeer::TAGS;
- }
- return $this;
- } // setTags()
- /**
- * Set the value of [custom_data] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setCustomData($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->custom_data !== $v) {
- $this->custom_data = $v;
- $this->modifiedColumns[] = kshowPeer::CUSTOM_DATA;
- }
- return $this;
- } // setCustomData()
- /**
- * Set the value of [indexed_custom_data_1] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setIndexedCustomData1($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_1]))
- $this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_1] = $this->indexed_custom_data_1;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->indexed_custom_data_1 !== $v) {
- $this->indexed_custom_data_1 = $v;
- $this->modifiedColumns[] = kshowPeer::INDEXED_CUSTOM_DATA_1;
- }
- return $this;
- } // setIndexedCustomData1()
- /**
- * Set the value of [indexed_custom_data_2] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setIndexedCustomData2($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_2]))
- $this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_2] = $this->indexed_custom_data_2;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->indexed_custom_data_2 !== $v) {
- $this->indexed_custom_data_2 = $v;
- $this->modifiedColumns[] = kshowPeer::INDEXED_CUSTOM_DATA_2;
- }
- return $this;
- } // setIndexedCustomData2()
- /**
- * Set the value of [indexed_custom_data_3] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setIndexedCustomData3($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_3]))
- $this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_3] = $this->indexed_custom_data_3;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->indexed_custom_data_3 !== $v) {
- $this->indexed_custom_data_3 = $v;
- $this->modifiedColumns[] = kshowPeer::INDEXED_CUSTOM_DATA_3;
- }
- return $this;
- } // setIndexedCustomData3()
- /**
- * Set the value of [reoccurence] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setReoccurence($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::REOCCURENCE]))
- $this->oldColumnsValues[kshowPeer::REOCCURENCE] = $this->reoccurence;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->reoccurence !== $v) {
- $this->reoccurence = $v;
- $this->modifiedColumns[] = kshowPeer::REOCCURENCE;
- }
- return $this;
- } // setReoccurence()
- /**
- * Set the value of [license_type] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setLicenseType($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::LICENSE_TYPE]))
- $this->oldColumnsValues[kshowPeer::LICENSE_TYPE] = $this->license_type;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->license_type !== $v) {
- $this->license_type = $v;
- $this->modifiedColumns[] = kshowPeer::LICENSE_TYPE;
- }
- return $this;
- } // setLicenseType()
- /**
- * Set the value of [length_in_msecs] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setLengthInMsecs($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::LENGTH_IN_MSECS]))
- $this->oldColumnsValues[kshowPeer::LENGTH_IN_MSECS] = $this->length_in_msecs;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->length_in_msecs !== $v || $this->isNew()) {
- $this->length_in_msecs = $v;
- $this->modifiedColumns[] = kshowPeer::LENGTH_IN_MSECS;
- }
- return $this;
- } // setLengthInMsecs()
- /**
- * Set the value of [view_permissions] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setViewPermissions($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::VIEW_PERMISSIONS]))
- $this->oldColumnsValues[kshowPeer::VIEW_PERMISSIONS] = $this->view_permissions;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->view_permissions !== $v) {
- $this->view_permissions = $v;
- $this->modifiedColumns[] = kshowPeer::VIEW_PERMISSIONS;
- }
- return $this;
- } // setViewPermissions()
- /**
- * Set the value of [view_password] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setViewPassword($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::VIEW_PASSWORD]))
- $this->oldColumnsValues[kshowPeer::VIEW_PASSWORD] = $this->view_password;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->view_password !== $v) {
- $this->view_password = $v;
- $this->modifiedColumns[] = kshowPeer::VIEW_PASSWORD;
- }
- return $this;
- } // setViewPassword()
- /**
- * Set the value of [contrib_permissions] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setContribPermissions($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::CONTRIB_PERMISSIONS]))
- $this->oldColumnsValues[kshowPeer::CONTRIB_PERMISSIONS] = $this->contrib_permissions;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->contrib_permissions !== $v) {
- $this->contrib_permissions = $v;
- $this->modifiedColumns[] = kshowPeer::CONTRIB_PERMISSIONS;
- }
- return $this;
- } // setContribPermissions()
- /**
- * Set the value of [contrib_password] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setContribPassword($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::CONTRIB_PASSWORD]))
- $this->oldColumnsValues[kshowPeer::CONTRIB_PASSWORD] = $this->contrib_password;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->contrib_password !== $v) {
- $this->contrib_password = $v;
- $this->modifiedColumns[] = kshowPeer::CONTRIB_PASSWORD;
- }
- return $this;
- } // setContribPassword()
- /**
- * Set the value of [edit_permissions] column.
- *
- * @param int $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setEditPermissions($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::EDIT_PERMISSIONS]))
- $this->oldColumnsValues[kshowPeer::EDIT_PERMISSIONS] = $this->edit_permissions;
- if ($v !== null) {
- $v = (int) $v;
- }
- if ($this->edit_permissions !== $v) {
- $this->edit_permissions = $v;
- $this->modifiedColumns[] = kshowPeer::EDIT_PERMISSIONS;
- }
- return $this;
- } // setEditPermissions()
- /**
- * Set the value of [edit_password] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setEditPassword($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::EDIT_PASSWORD]))
- $this->oldColumnsValues[kshowPeer::EDIT_PASSWORD] = $this->edit_password;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->edit_password !== $v) {
- $this->edit_password = $v;
- $this->modifiedColumns[] = kshowPeer::EDIT_PASSWORD;
- }
- return $this;
- } // setEditPassword()
- /**
- * Set the value of [salt] column.
- *
- * @param string $v new value
- * @return kshow The current object (for fluent API support)
- */
- public function setSalt($v)
- {
- if(!isset($this->oldColumnsValues[kshowPeer::SALT]))
- $this->oldColumnsValues[kshowPeer::SALT] = $this->salt;
- if ($v !== null) {
- $v = (string) $v;
- }
- if ($this->salt !== $v) {
- $this->salt = $v;
- $this->modifiedColumns[] = kshowPeer::SALT;
- }
- return $this;
- } // setSalt()
- /**
- * Sets the value of [created_at] column to a normalized version of the date/time value specified.
- *
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return kshow The current object (for fluent API support)
- */
- public function setCreatedAt($v)
- {
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $dt = null;
- } elseif ($v instanceof DateTime) {
- $dt = $v;
- } else {
- // some string/numeric value passed; we normalize that so that we can
- // validate it.
- try {
- if (is_numeric($v)) { // if it's a unix timestamp
- $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
- // We have to explicitly specify and then change the time zone because of a
- // DateTime bug: http://bugs.php.net/bug.php?id=43003
- $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
- } else {
- $dt = new DateTime($v);
- }
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
- }
- if ( $this->created_at !== null || $dt !== null ) {
- // (nested ifs are a little easier to read in this case)
- $currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
- $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
- if ( ($currNorm !== $newNorm) // normalized values don't match
- )
- {
- $this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
- $this->modifiedColumns[] = kshowPeer::CREATED_AT;
- }
- } // if either are not null
- return $this;
- } // setCreatedAt()
- /**
- * Sets the value of [updated_at] column to a normalized version of the date/time value specified.
- *
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return kshow The current object (for fluent API support)
- */
- public function setUpdatedAt($v)
- {
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $d…
Large files files are truncated, but you can click here to view the full file