PageRenderTime 48ms CodeModel.GetById 6ms RepoModel.GetById 0ms app.codeStats 1ms

/package/app/app/alpha/lib/model/om/Basekshow.php

https://bitbucket.org/pandaos/kaltura
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

  1. <?php
  2. /**
  3. * Base class that represents a row from the 'kshow' table.
  4. *
  5. *
  6. *
  7. * @package Core
  8. * @subpackage model.om
  9. */
  10. abstract class Basekshow extends BaseObject implements Persistent {
  11. /**
  12. * The Peer class.
  13. * Instance provides a convenient way of calling static methods on a class
  14. * that calling code may not be able to identify.
  15. * @var kshowPeer
  16. */
  17. protected static $peer;
  18. /**
  19. * The value for the id field.
  20. * @var string
  21. */
  22. protected $id;
  23. /**
  24. * The value for the producer_id field.
  25. * @var int
  26. */
  27. protected $producer_id;
  28. /**
  29. * The value for the episode_id field.
  30. * @var string
  31. */
  32. protected $episode_id;
  33. /**
  34. * The value for the name field.
  35. * @var string
  36. */
  37. protected $name;
  38. /**
  39. * The value for the subdomain field.
  40. * @var string
  41. */
  42. protected $subdomain;
  43. /**
  44. * The value for the description field.
  45. * @var string
  46. */
  47. protected $description;
  48. /**
  49. * The value for the status field.
  50. * Note: this column has a database default value of: 0
  51. * @var int
  52. */
  53. protected $status;
  54. /**
  55. * The value for the type field.
  56. * @var int
  57. */
  58. protected $type;
  59. /**
  60. * The value for the media_type field.
  61. * @var int
  62. */
  63. protected $media_type;
  64. /**
  65. * The value for the format_type field.
  66. * @var int
  67. */
  68. protected $format_type;
  69. /**
  70. * The value for the language field.
  71. * @var int
  72. */
  73. protected $language;
  74. /**
  75. * The value for the start_date field.
  76. * @var string
  77. */
  78. protected $start_date;
  79. /**
  80. * The value for the end_date field.
  81. * @var string
  82. */
  83. protected $end_date;
  84. /**
  85. * The value for the skin field.
  86. * @var string
  87. */
  88. protected $skin;
  89. /**
  90. * The value for the thumbnail field.
  91. * @var string
  92. */
  93. protected $thumbnail;
  94. /**
  95. * The value for the show_entry_id field.
  96. * @var string
  97. */
  98. protected $show_entry_id;
  99. /**
  100. * The value for the intro_id field.
  101. * @var int
  102. */
  103. protected $intro_id;
  104. /**
  105. * The value for the views field.
  106. * Note: this column has a database default value of: 0
  107. * @var int
  108. */
  109. protected $views;
  110. /**
  111. * The value for the votes field.
  112. * Note: this column has a database default value of: 0
  113. * @var int
  114. */
  115. protected $votes;
  116. /**
  117. * The value for the comments field.
  118. * Note: this column has a database default value of: 0
  119. * @var int
  120. */
  121. protected $comments;
  122. /**
  123. * The value for the favorites field.
  124. * Note: this column has a database default value of: 0
  125. * @var int
  126. */
  127. protected $favorites;
  128. /**
  129. * The value for the rank field.
  130. * Note: this column has a database default value of: 0
  131. * @var int
  132. */
  133. protected $rank;
  134. /**
  135. * The value for the entries field.
  136. * Note: this column has a database default value of: 0
  137. * @var int
  138. */
  139. protected $entries;
  140. /**
  141. * The value for the contributors field.
  142. * Note: this column has a database default value of: 0
  143. * @var int
  144. */
  145. protected $contributors;
  146. /**
  147. * The value for the subscribers field.
  148. * Note: this column has a database default value of: 0
  149. * @var int
  150. */
  151. protected $subscribers;
  152. /**
  153. * The value for the number_of_updates field.
  154. * Note: this column has a database default value of: 0
  155. * @var int
  156. */
  157. protected $number_of_updates;
  158. /**
  159. * The value for the tags field.
  160. * @var string
  161. */
  162. protected $tags;
  163. /**
  164. * The value for the custom_data field.
  165. * @var string
  166. */
  167. protected $custom_data;
  168. /**
  169. * The value for the indexed_custom_data_1 field.
  170. * @var int
  171. */
  172. protected $indexed_custom_data_1;
  173. /**
  174. * The value for the indexed_custom_data_2 field.
  175. * @var int
  176. */
  177. protected $indexed_custom_data_2;
  178. /**
  179. * The value for the indexed_custom_data_3 field.
  180. * @var string
  181. */
  182. protected $indexed_custom_data_3;
  183. /**
  184. * The value for the reoccurence field.
  185. * @var int
  186. */
  187. protected $reoccurence;
  188. /**
  189. * The value for the license_type field.
  190. * @var int
  191. */
  192. protected $license_type;
  193. /**
  194. * The value for the length_in_msecs field.
  195. * Note: this column has a database default value of: 0
  196. * @var int
  197. */
  198. protected $length_in_msecs;
  199. /**
  200. * The value for the view_permissions field.
  201. * @var int
  202. */
  203. protected $view_permissions;
  204. /**
  205. * The value for the view_password field.
  206. * @var string
  207. */
  208. protected $view_password;
  209. /**
  210. * The value for the contrib_permissions field.
  211. * @var int
  212. */
  213. protected $contrib_permissions;
  214. /**
  215. * The value for the contrib_password field.
  216. * @var string
  217. */
  218. protected $contrib_password;
  219. /**
  220. * The value for the edit_permissions field.
  221. * @var int
  222. */
  223. protected $edit_permissions;
  224. /**
  225. * The value for the edit_password field.
  226. * @var string
  227. */
  228. protected $edit_password;
  229. /**
  230. * The value for the salt field.
  231. * @var string
  232. */
  233. protected $salt;
  234. /**
  235. * The value for the created_at field.
  236. * @var string
  237. */
  238. protected $created_at;
  239. /**
  240. * The value for the updated_at field.
  241. * @var string
  242. */
  243. protected $updated_at;
  244. /**
  245. * The value for the partner_id field.
  246. * Note: this column has a database default value of: 0
  247. * @var int
  248. */
  249. protected $partner_id;
  250. /**
  251. * The value for the display_in_search field.
  252. * @var int
  253. */
  254. protected $display_in_search;
  255. /**
  256. * The value for the subp_id field.
  257. * Note: this column has a database default value of: 0
  258. * @var int
  259. */
  260. protected $subp_id;
  261. /**
  262. * The value for the search_text field.
  263. * @var string
  264. */
  265. protected $search_text;
  266. /**
  267. * The value for the permissions field.
  268. * @var string
  269. */
  270. protected $permissions;
  271. /**
  272. * The value for the group_id field.
  273. * @var string
  274. */
  275. protected $group_id;
  276. /**
  277. * The value for the plays field.
  278. * Note: this column has a database default value of: 0
  279. * @var int
  280. */
  281. protected $plays;
  282. /**
  283. * The value for the partner_data field.
  284. * @var string
  285. */
  286. protected $partner_data;
  287. /**
  288. * The value for the int_id field.
  289. * @var int
  290. */
  291. protected $int_id;
  292. /**
  293. * @var kuser
  294. */
  295. protected $akuser;
  296. /**
  297. * @var array entry[] Collection to store aggregation of entry objects.
  298. */
  299. protected $collentrys;
  300. /**
  301. * @var Criteria The criteria used to select the current contents of collentrys.
  302. */
  303. private $lastentryCriteria = null;
  304. /**
  305. * @var array kvote[] Collection to store aggregation of kvote objects.
  306. */
  307. protected $collkvotesRelatedByKshowId;
  308. /**
  309. * @var Criteria The criteria used to select the current contents of collkvotesRelatedByKshowId.
  310. */
  311. private $lastkvoteRelatedByKshowIdCriteria = null;
  312. /**
  313. * @var array kvote[] Collection to store aggregation of kvote objects.
  314. */
  315. protected $collkvotesRelatedByKuserId;
  316. /**
  317. * @var Criteria The criteria used to select the current contents of collkvotesRelatedByKuserId.
  318. */
  319. private $lastkvoteRelatedByKuserIdCriteria = null;
  320. /**
  321. * @var array KshowKuser[] Collection to store aggregation of KshowKuser objects.
  322. */
  323. protected $collKshowKusers;
  324. /**
  325. * @var Criteria The criteria used to select the current contents of collKshowKusers.
  326. */
  327. private $lastKshowKuserCriteria = null;
  328. /**
  329. * @var array PuserRole[] Collection to store aggregation of PuserRole objects.
  330. */
  331. protected $collPuserRoles;
  332. /**
  333. * @var Criteria The criteria used to select the current contents of collPuserRoles.
  334. */
  335. private $lastPuserRoleCriteria = null;
  336. /**
  337. * @var array roughcutEntry[] Collection to store aggregation of roughcutEntry objects.
  338. */
  339. protected $collroughcutEntrys;
  340. /**
  341. * @var Criteria The criteria used to select the current contents of collroughcutEntrys.
  342. */
  343. private $lastroughcutEntryCriteria = null;
  344. /**
  345. * @var array widget[] Collection to store aggregation of widget objects.
  346. */
  347. protected $collwidgets;
  348. /**
  349. * @var Criteria The criteria used to select the current contents of collwidgets.
  350. */
  351. private $lastwidgetCriteria = null;
  352. /**
  353. * Flag to prevent endless save loop, if this object is referenced
  354. * by another object which falls in this transaction.
  355. * @var boolean
  356. */
  357. protected $alreadyInSave = false;
  358. /**
  359. * Flag to prevent endless validation loop, if this object is referenced
  360. * by another object which falls in this transaction.
  361. * @var boolean
  362. */
  363. protected $alreadyInValidation = false;
  364. /**
  365. * Store columns old values before the changes
  366. * @var array
  367. */
  368. protected $oldColumnsValues = array();
  369. /**
  370. * @return array
  371. */
  372. public function getColumnsOldValues()
  373. {
  374. return $this->oldColumnsValues;
  375. }
  376. /**
  377. * Applies default values to this object.
  378. * This method should be called from the object's constructor (or
  379. * equivalent initialization method).
  380. * @see __construct()
  381. */
  382. public function applyDefaultValues()
  383. {
  384. $this->status = 0;
  385. $this->views = 0;
  386. $this->votes = 0;
  387. $this->comments = 0;
  388. $this->favorites = 0;
  389. $this->rank = 0;
  390. $this->entries = 0;
  391. $this->contributors = 0;
  392. $this->subscribers = 0;
  393. $this->number_of_updates = 0;
  394. $this->length_in_msecs = 0;
  395. $this->partner_id = 0;
  396. $this->subp_id = 0;
  397. $this->plays = 0;
  398. }
  399. /**
  400. * Initializes internal state of Basekshow object.
  401. * @see applyDefaults()
  402. */
  403. public function __construct()
  404. {
  405. parent::__construct();
  406. $this->applyDefaultValues();
  407. }
  408. /**
  409. * Get the [id] column value.
  410. *
  411. * @return string
  412. */
  413. public function getId()
  414. {
  415. return $this->id;
  416. }
  417. /**
  418. * Get the [producer_id] column value.
  419. *
  420. * @return int
  421. */
  422. public function getProducerId()
  423. {
  424. return $this->producer_id;
  425. }
  426. /**
  427. * Get the [episode_id] column value.
  428. *
  429. * @return string
  430. */
  431. public function getEpisodeId()
  432. {
  433. return $this->episode_id;
  434. }
  435. /**
  436. * Get the [name] column value.
  437. *
  438. * @return string
  439. */
  440. public function getName()
  441. {
  442. return $this->name;
  443. }
  444. /**
  445. * Get the [subdomain] column value.
  446. *
  447. * @return string
  448. */
  449. public function getSubdomain()
  450. {
  451. return $this->subdomain;
  452. }
  453. /**
  454. * Get the [description] column value.
  455. *
  456. * @return string
  457. */
  458. public function getDescription()
  459. {
  460. return $this->description;
  461. }
  462. /**
  463. * Get the [status] column value.
  464. *
  465. * @return int
  466. */
  467. public function getStatus()
  468. {
  469. return $this->status;
  470. }
  471. /**
  472. * Get the [type] column value.
  473. *
  474. * @return int
  475. */
  476. public function getType()
  477. {
  478. return $this->type;
  479. }
  480. /**
  481. * Get the [media_type] column value.
  482. *
  483. * @return int
  484. */
  485. public function getMediaType()
  486. {
  487. return $this->media_type;
  488. }
  489. /**
  490. * Get the [format_type] column value.
  491. *
  492. * @return int
  493. */
  494. public function getFormatType()
  495. {
  496. return $this->format_type;
  497. }
  498. /**
  499. * Get the [language] column value.
  500. *
  501. * @return int
  502. */
  503. public function getLanguage()
  504. {
  505. return $this->language;
  506. }
  507. /**
  508. * Get the [optionally formatted] temporal [start_date] column value.
  509. *
  510. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  511. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  512. *
  513. * @param string $format The date/time format string (either date()-style or strftime()-style).
  514. * If format is NULL, then the raw unix timestamp integer will be returned.
  515. * @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
  516. * @throws PropelException - if unable to parse/validate the date/time value.
  517. */
  518. public function getStartDate($format = '%x')
  519. {
  520. if ($this->start_date === null) {
  521. return null;
  522. }
  523. if ($this->start_date === '0000-00-00') {
  524. // while technically this is not a default value of NULL,
  525. // this seems to be closest in meaning.
  526. return null;
  527. } else {
  528. try {
  529. $dt = new DateTime($this->start_date);
  530. } catch (Exception $x) {
  531. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->start_date, true), $x);
  532. }
  533. }
  534. if ($format === null) {
  535. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  536. return (int) $dt->format('U');
  537. } elseif (strpos($format, '%') !== false) {
  538. return strftime($format, $dt->format('U'));
  539. } else {
  540. return $dt->format($format);
  541. }
  542. }
  543. /**
  544. * Get the [optionally formatted] temporal [end_date] column value.
  545. *
  546. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  547. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  548. *
  549. * @param string $format The date/time format string (either date()-style or strftime()-style).
  550. * If format is NULL, then the raw unix timestamp integer will be returned.
  551. * @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
  552. * @throws PropelException - if unable to parse/validate the date/time value.
  553. */
  554. public function getEndDate($format = '%x')
  555. {
  556. if ($this->end_date === null) {
  557. return null;
  558. }
  559. if ($this->end_date === '0000-00-00') {
  560. // while technically this is not a default value of NULL,
  561. // this seems to be closest in meaning.
  562. return null;
  563. } else {
  564. try {
  565. $dt = new DateTime($this->end_date);
  566. } catch (Exception $x) {
  567. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->end_date, true), $x);
  568. }
  569. }
  570. if ($format === null) {
  571. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  572. return (int) $dt->format('U');
  573. } elseif (strpos($format, '%') !== false) {
  574. return strftime($format, $dt->format('U'));
  575. } else {
  576. return $dt->format($format);
  577. }
  578. }
  579. /**
  580. * Get the [skin] column value.
  581. *
  582. * @return string
  583. */
  584. public function getSkin()
  585. {
  586. return $this->skin;
  587. }
  588. /**
  589. * Get the [thumbnail] column value.
  590. *
  591. * @return string
  592. */
  593. public function getThumbnail()
  594. {
  595. return $this->thumbnail;
  596. }
  597. /**
  598. * Get the [show_entry_id] column value.
  599. *
  600. * @return string
  601. */
  602. public function getShowEntryId()
  603. {
  604. return $this->show_entry_id;
  605. }
  606. /**
  607. * Get the [intro_id] column value.
  608. *
  609. * @return int
  610. */
  611. public function getIntroId()
  612. {
  613. return $this->intro_id;
  614. }
  615. /**
  616. * Get the [views] column value.
  617. *
  618. * @return int
  619. */
  620. public function getViews()
  621. {
  622. return $this->views;
  623. }
  624. /**
  625. * Get the [votes] column value.
  626. *
  627. * @return int
  628. */
  629. public function getVotes()
  630. {
  631. return $this->votes;
  632. }
  633. /**
  634. * Get the [comments] column value.
  635. *
  636. * @return int
  637. */
  638. public function getComments()
  639. {
  640. return $this->comments;
  641. }
  642. /**
  643. * Get the [favorites] column value.
  644. *
  645. * @return int
  646. */
  647. public function getFavorites()
  648. {
  649. return $this->favorites;
  650. }
  651. /**
  652. * Get the [rank] column value.
  653. *
  654. * @return int
  655. */
  656. public function getRank()
  657. {
  658. return $this->rank;
  659. }
  660. /**
  661. * Get the [entries] column value.
  662. *
  663. * @return int
  664. */
  665. public function getEntries()
  666. {
  667. return $this->entries;
  668. }
  669. /**
  670. * Get the [contributors] column value.
  671. *
  672. * @return int
  673. */
  674. public function getContributors()
  675. {
  676. return $this->contributors;
  677. }
  678. /**
  679. * Get the [subscribers] column value.
  680. *
  681. * @return int
  682. */
  683. public function getSubscribers()
  684. {
  685. return $this->subscribers;
  686. }
  687. /**
  688. * Get the [number_of_updates] column value.
  689. *
  690. * @return int
  691. */
  692. public function getNumberOfUpdates()
  693. {
  694. return $this->number_of_updates;
  695. }
  696. /**
  697. * Get the [tags] column value.
  698. *
  699. * @return string
  700. */
  701. public function getTags()
  702. {
  703. return $this->tags;
  704. }
  705. /**
  706. * Get the [custom_data] column value.
  707. *
  708. * @return string
  709. */
  710. public function getCustomData()
  711. {
  712. return $this->custom_data;
  713. }
  714. /**
  715. * Get the [indexed_custom_data_1] column value.
  716. *
  717. * @return int
  718. */
  719. public function getIndexedCustomData1()
  720. {
  721. return $this->indexed_custom_data_1;
  722. }
  723. /**
  724. * Get the [indexed_custom_data_2] column value.
  725. *
  726. * @return int
  727. */
  728. public function getIndexedCustomData2()
  729. {
  730. return $this->indexed_custom_data_2;
  731. }
  732. /**
  733. * Get the [indexed_custom_data_3] column value.
  734. *
  735. * @return string
  736. */
  737. public function getIndexedCustomData3()
  738. {
  739. return $this->indexed_custom_data_3;
  740. }
  741. /**
  742. * Get the [reoccurence] column value.
  743. *
  744. * @return int
  745. */
  746. public function getReoccurence()
  747. {
  748. return $this->reoccurence;
  749. }
  750. /**
  751. * Get the [license_type] column value.
  752. *
  753. * @return int
  754. */
  755. public function getLicenseType()
  756. {
  757. return $this->license_type;
  758. }
  759. /**
  760. * Get the [length_in_msecs] column value.
  761. *
  762. * @return int
  763. */
  764. public function getLengthInMsecs()
  765. {
  766. return $this->length_in_msecs;
  767. }
  768. /**
  769. * Get the [view_permissions] column value.
  770. *
  771. * @return int
  772. */
  773. public function getViewPermissions()
  774. {
  775. return $this->view_permissions;
  776. }
  777. /**
  778. * Get the [view_password] column value.
  779. *
  780. * @return string
  781. */
  782. public function getViewPassword()
  783. {
  784. return $this->view_password;
  785. }
  786. /**
  787. * Get the [contrib_permissions] column value.
  788. *
  789. * @return int
  790. */
  791. public function getContribPermissions()
  792. {
  793. return $this->contrib_permissions;
  794. }
  795. /**
  796. * Get the [contrib_password] column value.
  797. *
  798. * @return string
  799. */
  800. public function getContribPassword()
  801. {
  802. return $this->contrib_password;
  803. }
  804. /**
  805. * Get the [edit_permissions] column value.
  806. *
  807. * @return int
  808. */
  809. public function getEditPermissions()
  810. {
  811. return $this->edit_permissions;
  812. }
  813. /**
  814. * Get the [edit_password] column value.
  815. *
  816. * @return string
  817. */
  818. public function getEditPassword()
  819. {
  820. return $this->edit_password;
  821. }
  822. /**
  823. * Get the [salt] column value.
  824. *
  825. * @return string
  826. */
  827. public function getSalt()
  828. {
  829. return $this->salt;
  830. }
  831. /**
  832. * Get the [optionally formatted] temporal [created_at] column value.
  833. *
  834. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  835. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  836. *
  837. * @param string $format The date/time format string (either date()-style or strftime()-style).
  838. * If format is NULL, then the raw unix timestamp integer will be returned.
  839. * @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
  840. * @throws PropelException - if unable to parse/validate the date/time value.
  841. */
  842. public function getCreatedAt($format = 'Y-m-d H:i:s')
  843. {
  844. if ($this->created_at === null) {
  845. return null;
  846. }
  847. if ($this->created_at === '0000-00-00 00:00:00') {
  848. // while technically this is not a default value of NULL,
  849. // this seems to be closest in meaning.
  850. return null;
  851. } else {
  852. try {
  853. $dt = new DateTime($this->created_at);
  854. } catch (Exception $x) {
  855. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
  856. }
  857. }
  858. if ($format === null) {
  859. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  860. return (int) $dt->format('U');
  861. } elseif (strpos($format, '%') !== false) {
  862. return strftime($format, $dt->format('U'));
  863. } else {
  864. return $dt->format($format);
  865. }
  866. }
  867. /**
  868. * Get the [optionally formatted] temporal [updated_at] column value.
  869. *
  870. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  871. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  872. *
  873. * @param string $format The date/time format string (either date()-style or strftime()-style).
  874. * If format is NULL, then the raw unix timestamp integer will be returned.
  875. * @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
  876. * @throws PropelException - if unable to parse/validate the date/time value.
  877. */
  878. public function getUpdatedAt($format = 'Y-m-d H:i:s')
  879. {
  880. if ($this->updated_at === null) {
  881. return null;
  882. }
  883. if ($this->updated_at === '0000-00-00 00:00:00') {
  884. // while technically this is not a default value of NULL,
  885. // this seems to be closest in meaning.
  886. return null;
  887. } else {
  888. try {
  889. $dt = new DateTime($this->updated_at);
  890. } catch (Exception $x) {
  891. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
  892. }
  893. }
  894. if ($format === null) {
  895. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  896. return (int) $dt->format('U');
  897. } elseif (strpos($format, '%') !== false) {
  898. return strftime($format, $dt->format('U'));
  899. } else {
  900. return $dt->format($format);
  901. }
  902. }
  903. /**
  904. * Get the [partner_id] column value.
  905. *
  906. * @return int
  907. */
  908. public function getPartnerId()
  909. {
  910. return $this->partner_id;
  911. }
  912. /**
  913. * Get the [display_in_search] column value.
  914. *
  915. * @return int
  916. */
  917. public function getDisplayInSearch()
  918. {
  919. return $this->display_in_search;
  920. }
  921. /**
  922. * Get the [subp_id] column value.
  923. *
  924. * @return int
  925. */
  926. public function getSubpId()
  927. {
  928. return $this->subp_id;
  929. }
  930. /**
  931. * Get the [search_text] column value.
  932. *
  933. * @return string
  934. */
  935. public function getSearchText()
  936. {
  937. return $this->search_text;
  938. }
  939. /**
  940. * Get the [permissions] column value.
  941. *
  942. * @return string
  943. */
  944. public function getPermissions()
  945. {
  946. return $this->permissions;
  947. }
  948. /**
  949. * Get the [group_id] column value.
  950. *
  951. * @return string
  952. */
  953. public function getGroupId()
  954. {
  955. return $this->group_id;
  956. }
  957. /**
  958. * Get the [plays] column value.
  959. *
  960. * @return int
  961. */
  962. public function getPlays()
  963. {
  964. return $this->plays;
  965. }
  966. /**
  967. * Get the [partner_data] column value.
  968. *
  969. * @return string
  970. */
  971. public function getPartnerData()
  972. {
  973. return $this->partner_data;
  974. }
  975. /**
  976. * Get the [int_id] column value.
  977. *
  978. * @return int
  979. */
  980. public function getIntId()
  981. {
  982. return $this->int_id;
  983. }
  984. /**
  985. * Set the value of [id] column.
  986. *
  987. * @param string $v new value
  988. * @return kshow The current object (for fluent API support)
  989. */
  990. public function setId($v)
  991. {
  992. if(!isset($this->oldColumnsValues[kshowPeer::ID]))
  993. $this->oldColumnsValues[kshowPeer::ID] = $this->id;
  994. if ($v !== null) {
  995. $v = (string) $v;
  996. }
  997. if ($this->id !== $v) {
  998. $this->id = $v;
  999. $this->modifiedColumns[] = kshowPeer::ID;
  1000. }
  1001. return $this;
  1002. } // setId()
  1003. /**
  1004. * Set the value of [producer_id] column.
  1005. *
  1006. * @param int $v new value
  1007. * @return kshow The current object (for fluent API support)
  1008. */
  1009. public function setProducerId($v)
  1010. {
  1011. if(!isset($this->oldColumnsValues[kshowPeer::PRODUCER_ID]))
  1012. $this->oldColumnsValues[kshowPeer::PRODUCER_ID] = $this->producer_id;
  1013. if ($v !== null) {
  1014. $v = (int) $v;
  1015. }
  1016. if ($this->producer_id !== $v) {
  1017. $this->producer_id = $v;
  1018. $this->modifiedColumns[] = kshowPeer::PRODUCER_ID;
  1019. }
  1020. if ($this->akuser !== null && $this->akuser->getId() !== $v) {
  1021. $this->akuser = null;
  1022. }
  1023. return $this;
  1024. } // setProducerId()
  1025. /**
  1026. * Set the value of [episode_id] column.
  1027. *
  1028. * @param string $v new value
  1029. * @return kshow The current object (for fluent API support)
  1030. */
  1031. public function setEpisodeId($v)
  1032. {
  1033. if(!isset($this->oldColumnsValues[kshowPeer::EPISODE_ID]))
  1034. $this->oldColumnsValues[kshowPeer::EPISODE_ID] = $this->episode_id;
  1035. if ($v !== null) {
  1036. $v = (string) $v;
  1037. }
  1038. if ($this->episode_id !== $v) {
  1039. $this->episode_id = $v;
  1040. $this->modifiedColumns[] = kshowPeer::EPISODE_ID;
  1041. }
  1042. return $this;
  1043. } // setEpisodeId()
  1044. /**
  1045. * Set the value of [name] column.
  1046. *
  1047. * @param string $v new value
  1048. * @return kshow The current object (for fluent API support)
  1049. */
  1050. public function setName($v)
  1051. {
  1052. if(!isset($this->oldColumnsValues[kshowPeer::NAME]))
  1053. $this->oldColumnsValues[kshowPeer::NAME] = $this->name;
  1054. if ($v !== null) {
  1055. $v = (string) $v;
  1056. }
  1057. if ($this->name !== $v) {
  1058. $this->name = $v;
  1059. $this->modifiedColumns[] = kshowPeer::NAME;
  1060. }
  1061. return $this;
  1062. } // setName()
  1063. /**
  1064. * Set the value of [subdomain] column.
  1065. *
  1066. * @param string $v new value
  1067. * @return kshow The current object (for fluent API support)
  1068. */
  1069. public function setSubdomain($v)
  1070. {
  1071. if(!isset($this->oldColumnsValues[kshowPeer::SUBDOMAIN]))
  1072. $this->oldColumnsValues[kshowPeer::SUBDOMAIN] = $this->subdomain;
  1073. if ($v !== null) {
  1074. $v = (string) $v;
  1075. }
  1076. if ($this->subdomain !== $v) {
  1077. $this->subdomain = $v;
  1078. $this->modifiedColumns[] = kshowPeer::SUBDOMAIN;
  1079. }
  1080. return $this;
  1081. } // setSubdomain()
  1082. /**
  1083. * Set the value of [description] column.
  1084. *
  1085. * @param string $v new value
  1086. * @return kshow The current object (for fluent API support)
  1087. */
  1088. public function setDescription($v)
  1089. {
  1090. if(!isset($this->oldColumnsValues[kshowPeer::DESCRIPTION]))
  1091. $this->oldColumnsValues[kshowPeer::DESCRIPTION] = $this->description;
  1092. if ($v !== null) {
  1093. $v = (string) $v;
  1094. }
  1095. if ($this->description !== $v) {
  1096. $this->description = $v;
  1097. $this->modifiedColumns[] = kshowPeer::DESCRIPTION;
  1098. }
  1099. return $this;
  1100. } // setDescription()
  1101. /**
  1102. * Set the value of [status] column.
  1103. *
  1104. * @param int $v new value
  1105. * @return kshow The current object (for fluent API support)
  1106. */
  1107. public function setStatus($v)
  1108. {
  1109. if(!isset($this->oldColumnsValues[kshowPeer::STATUS]))
  1110. $this->oldColumnsValues[kshowPeer::STATUS] = $this->status;
  1111. if ($v !== null) {
  1112. $v = (int) $v;
  1113. }
  1114. if ($this->status !== $v || $this->isNew()) {
  1115. $this->status = $v;
  1116. $this->modifiedColumns[] = kshowPeer::STATUS;
  1117. }
  1118. return $this;
  1119. } // setStatus()
  1120. /**
  1121. * Set the value of [type] column.
  1122. *
  1123. * @param int $v new value
  1124. * @return kshow The current object (for fluent API support)
  1125. */
  1126. public function setType($v)
  1127. {
  1128. if(!isset($this->oldColumnsValues[kshowPeer::TYPE]))
  1129. $this->oldColumnsValues[kshowPeer::TYPE] = $this->type;
  1130. if ($v !== null) {
  1131. $v = (int) $v;
  1132. }
  1133. if ($this->type !== $v) {
  1134. $this->type = $v;
  1135. $this->modifiedColumns[] = kshowPeer::TYPE;
  1136. }
  1137. return $this;
  1138. } // setType()
  1139. /**
  1140. * Set the value of [media_type] column.
  1141. *
  1142. * @param int $v new value
  1143. * @return kshow The current object (for fluent API support)
  1144. */
  1145. public function setMediaType($v)
  1146. {
  1147. if(!isset($this->oldColumnsValues[kshowPeer::MEDIA_TYPE]))
  1148. $this->oldColumnsValues[kshowPeer::MEDIA_TYPE] = $this->media_type;
  1149. if ($v !== null) {
  1150. $v = (int) $v;
  1151. }
  1152. if ($this->media_type !== $v) {
  1153. $this->media_type = $v;
  1154. $this->modifiedColumns[] = kshowPeer::MEDIA_TYPE;
  1155. }
  1156. return $this;
  1157. } // setMediaType()
  1158. /**
  1159. * Set the value of [format_type] column.
  1160. *
  1161. * @param int $v new value
  1162. * @return kshow The current object (for fluent API support)
  1163. */
  1164. public function setFormatType($v)
  1165. {
  1166. if(!isset($this->oldColumnsValues[kshowPeer::FORMAT_TYPE]))
  1167. $this->oldColumnsValues[kshowPeer::FORMAT_TYPE] = $this->format_type;
  1168. if ($v !== null) {
  1169. $v = (int) $v;
  1170. }
  1171. if ($this->format_type !== $v) {
  1172. $this->format_type = $v;
  1173. $this->modifiedColumns[] = kshowPeer::FORMAT_TYPE;
  1174. }
  1175. return $this;
  1176. } // setFormatType()
  1177. /**
  1178. * Set the value of [language] column.
  1179. *
  1180. * @param int $v new value
  1181. * @return kshow The current object (for fluent API support)
  1182. */
  1183. public function setLanguage($v)
  1184. {
  1185. if(!isset($this->oldColumnsValues[kshowPeer::LANGUAGE]))
  1186. $this->oldColumnsValues[kshowPeer::LANGUAGE] = $this->language;
  1187. if ($v !== null) {
  1188. $v = (int) $v;
  1189. }
  1190. if ($this->language !== $v) {
  1191. $this->language = $v;
  1192. $this->modifiedColumns[] = kshowPeer::LANGUAGE;
  1193. }
  1194. return $this;
  1195. } // setLanguage()
  1196. /**
  1197. * Sets the value of [start_date] column to a normalized version of the date/time value specified.
  1198. *
  1199. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1200. * be treated as NULL for temporal objects.
  1201. * @return kshow The current object (for fluent API support)
  1202. */
  1203. public function setStartDate($v)
  1204. {
  1205. if(!isset($this->oldColumnsValues[kshowPeer::START_DATE]))
  1206. $this->oldColumnsValues[kshowPeer::START_DATE] = $this->start_date;
  1207. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1208. // -- which is unexpected, to say the least.
  1209. if ($v === null || $v === '') {
  1210. $dt = null;
  1211. } elseif ($v instanceof DateTime) {
  1212. $dt = $v;
  1213. } else {
  1214. // some string/numeric value passed; we normalize that so that we can
  1215. // validate it.
  1216. try {
  1217. if (is_numeric($v)) { // if it's a unix timestamp
  1218. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1219. // We have to explicitly specify and then change the time zone because of a
  1220. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1221. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1222. } else {
  1223. $dt = new DateTime($v);
  1224. }
  1225. } catch (Exception $x) {
  1226. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1227. }
  1228. }
  1229. if ( $this->start_date !== null || $dt !== null ) {
  1230. // (nested ifs are a little easier to read in this case)
  1231. $currNorm = ($this->start_date !== null && $tmpDt = new DateTime($this->start_date)) ? $tmpDt->format('Y-m-d') : null;
  1232. $newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;
  1233. if ( ($currNorm !== $newNorm) // normalized values don't match
  1234. )
  1235. {
  1236. $this->start_date = ($dt ? $dt->format('Y-m-d') : null);
  1237. $this->modifiedColumns[] = kshowPeer::START_DATE;
  1238. }
  1239. } // if either are not null
  1240. return $this;
  1241. } // setStartDate()
  1242. /**
  1243. * Sets the value of [end_date] column to a normalized version of the date/time value specified.
  1244. *
  1245. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1246. * be treated as NULL for temporal objects.
  1247. * @return kshow The current object (for fluent API support)
  1248. */
  1249. public function setEndDate($v)
  1250. {
  1251. if(!isset($this->oldColumnsValues[kshowPeer::END_DATE]))
  1252. $this->oldColumnsValues[kshowPeer::END_DATE] = $this->end_date;
  1253. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1254. // -- which is unexpected, to say the least.
  1255. if ($v === null || $v === '') {
  1256. $dt = null;
  1257. } elseif ($v instanceof DateTime) {
  1258. $dt = $v;
  1259. } else {
  1260. // some string/numeric value passed; we normalize that so that we can
  1261. // validate it.
  1262. try {
  1263. if (is_numeric($v)) { // if it's a unix timestamp
  1264. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1265. // We have to explicitly specify and then change the time zone because of a
  1266. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1267. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1268. } else {
  1269. $dt = new DateTime($v);
  1270. }
  1271. } catch (Exception $x) {
  1272. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1273. }
  1274. }
  1275. if ( $this->end_date !== null || $dt !== null ) {
  1276. // (nested ifs are a little easier to read in this case)
  1277. $currNorm = ($this->end_date !== null && $tmpDt = new DateTime($this->end_date)) ? $tmpDt->format('Y-m-d') : null;
  1278. $newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;
  1279. if ( ($currNorm !== $newNorm) // normalized values don't match
  1280. )
  1281. {
  1282. $this->end_date = ($dt ? $dt->format('Y-m-d') : null);
  1283. $this->modifiedColumns[] = kshowPeer::END_DATE;
  1284. }
  1285. } // if either are not null
  1286. return $this;
  1287. } // setEndDate()
  1288. /**
  1289. * Set the value of [skin] column.
  1290. *
  1291. * @param string $v new value
  1292. * @return kshow The current object (for fluent API support)
  1293. */
  1294. public function setSkin($v)
  1295. {
  1296. if(!isset($this->oldColumnsValues[kshowPeer::SKIN]))
  1297. $this->oldColumnsValues[kshowPeer::SKIN] = $this->skin;
  1298. if ($v !== null) {
  1299. $v = (string) $v;
  1300. }
  1301. if ($this->skin !== $v) {
  1302. $this->skin = $v;
  1303. $this->modifiedColumns[] = kshowPeer::SKIN;
  1304. }
  1305. return $this;
  1306. } // setSkin()
  1307. /**
  1308. * Set the value of [thumbnail] column.
  1309. *
  1310. * @param string $v new value
  1311. * @return kshow The current object (for fluent API support)
  1312. */
  1313. public function setThumbnail($v)
  1314. {
  1315. if(!isset($this->oldColumnsValues[kshowPeer::THUMBNAIL]))
  1316. $this->oldColumnsValues[kshowPeer::THUMBNAIL] = $this->thumbnail;
  1317. if ($v !== null) {
  1318. $v = (string) $v;
  1319. }
  1320. if ($this->thumbnail !== $v) {
  1321. $this->thumbnail = $v;
  1322. $this->modifiedColumns[] = kshowPeer::THUMBNAIL;
  1323. }
  1324. return $this;
  1325. } // setThumbnail()
  1326. /**
  1327. * Set the value of [show_entry_id] column.
  1328. *
  1329. * @param string $v new value
  1330. * @return kshow The current object (for fluent API support)
  1331. */
  1332. public function setShowEntryId($v)
  1333. {
  1334. if(!isset($this->oldColumnsValues[kshowPeer::SHOW_ENTRY_ID]))
  1335. $this->oldColumnsValues[kshowPeer::SHOW_ENTRY_ID] = $this->show_entry_id;
  1336. if ($v !== null) {
  1337. $v = (string) $v;
  1338. }
  1339. if ($this->show_entry_id !== $v) {
  1340. $this->show_entry_id = $v;
  1341. $this->modifiedColumns[] = kshowPeer::SHOW_ENTRY_ID;
  1342. }
  1343. return $this;
  1344. } // setShowEntryId()
  1345. /**
  1346. * Set the value of [intro_id] column.
  1347. *
  1348. * @param int $v new value
  1349. * @return kshow The current object (for fluent API support)
  1350. */
  1351. public function setIntroId($v)
  1352. {
  1353. if(!isset($this->oldColumnsValues[kshowPeer::INTRO_ID]))
  1354. $this->oldColumnsValues[kshowPeer::INTRO_ID] = $this->intro_id;
  1355. if ($v !== null) {
  1356. $v = (int) $v;
  1357. }
  1358. if ($this->intro_id !== $v) {
  1359. $this->intro_id = $v;
  1360. $this->modifiedColumns[] = kshowPeer::INTRO_ID;
  1361. }
  1362. return $this;
  1363. } // setIntroId()
  1364. /**
  1365. * Set the value of [views] column.
  1366. *
  1367. * @param int $v new value
  1368. * @return kshow The current object (for fluent API support)
  1369. */
  1370. public function setViews($v)
  1371. {
  1372. if(!isset($this->oldColumnsValues[kshowPeer::VIEWS]))
  1373. $this->oldColumnsValues[kshowPeer::VIEWS] = $this->views;
  1374. if ($v !== null) {
  1375. $v = (int) $v;
  1376. }
  1377. if ($this->views !== $v || $this->isNew()) {
  1378. $this->views = $v;
  1379. $this->modifiedColumns[] = kshowPeer::VIEWS;
  1380. }
  1381. return $this;
  1382. } // setViews()
  1383. /**
  1384. * Set the value of [votes] column.
  1385. *
  1386. * @param int $v new value
  1387. * @return kshow The current object (for fluent API support)
  1388. */
  1389. public function setVotes($v)
  1390. {
  1391. if(!isset($this->oldColumnsValues[kshowPeer::VOTES]))
  1392. $this->oldColumnsValues[kshowPeer::VOTES] = $this->votes;
  1393. if ($v !== null) {
  1394. $v = (int) $v;
  1395. }
  1396. if ($this->votes !== $v || $this->isNew()) {
  1397. $this->votes = $v;
  1398. $this->modifiedColumns[] = kshowPeer::VOTES;
  1399. }
  1400. return $this;
  1401. } // setVotes()
  1402. /**
  1403. * Set the value of [comments] column.
  1404. *
  1405. * @param int $v new value
  1406. * @return kshow The current object (for fluent API support)
  1407. */
  1408. public function setComments($v)
  1409. {
  1410. if(!isset($this->oldColumnsValues[kshowPeer::COMMENTS]))
  1411. $this->oldColumnsValues[kshowPeer::COMMENTS] = $this->comments;
  1412. if ($v !== null) {
  1413. $v = (int) $v;
  1414. }
  1415. if ($this->comments !== $v || $this->isNew()) {
  1416. $this->comments = $v;
  1417. $this->modifiedColumns[] = kshowPeer::COMMENTS;
  1418. }
  1419. return $this;
  1420. } // setComments()
  1421. /**
  1422. * Set the value of [favorites] column.
  1423. *
  1424. * @param int $v new value
  1425. * @return kshow The current object (for fluent API support)
  1426. */
  1427. public function setFavorites($v)
  1428. {
  1429. if(!isset($this->oldColumnsValues[kshowPeer::FAVORITES]))
  1430. $this->oldColumnsValues[kshowPeer::FAVORITES] = $this->favorites;
  1431. if ($v !== null) {
  1432. $v = (int) $v;
  1433. }
  1434. if ($this->favorites !== $v || $this->isNew()) {
  1435. $this->favorites = $v;
  1436. $this->modifiedColumns[] = kshowPeer::FAVORITES;
  1437. }
  1438. return $this;
  1439. } // setFavorites()
  1440. /**
  1441. * Set the value of [rank] column.
  1442. *
  1443. * @param int $v new value
  1444. * @return kshow The current object (for fluent API support)
  1445. */
  1446. public function setRank($v)
  1447. {
  1448. if(!isset($this->oldColumnsValues[kshowPeer::RANK]))
  1449. $this->oldColumnsValues[kshowPeer::RANK] = $this->rank;
  1450. if ($v !== null) {
  1451. $v = (int) $v;
  1452. }
  1453. if ($this->rank !== $v || $this->isNew()) {
  1454. $this->rank = $v;
  1455. $this->modifiedColumns[] = kshowPeer::RANK;
  1456. }
  1457. return $this;
  1458. } // setRank()
  1459. /**
  1460. * Set the value of [entries] column.
  1461. *
  1462. * @param int $v new value
  1463. * @return kshow The current object (for fluent API support)
  1464. */
  1465. public function setEntries($v)
  1466. {
  1467. if(!isset($this->oldColumnsValues[kshowPeer::ENTRIES]))
  1468. $this->oldColumnsValues[kshowPeer::ENTRIES] = $this->entries;
  1469. if ($v !== null) {
  1470. $v = (int) $v;
  1471. }
  1472. if ($this->entries !== $v || $this->isNew()) {
  1473. $this->entries = $v;
  1474. $this->modifiedColumns[] = kshowPeer::ENTRIES;
  1475. }
  1476. return $this;
  1477. } // setEntries()
  1478. /**
  1479. * Set the value of [contributors] column.
  1480. *
  1481. * @param int $v new value
  1482. * @return kshow The current object (for fluent API support)
  1483. */
  1484. public function setContributors($v)
  1485. {
  1486. if(!isset($this->oldColumnsValues[kshowPeer::CONTRIBUTORS]))
  1487. $this->oldColumnsValues[kshowPeer::CONTRIBUTORS] = $this->contributors;
  1488. if ($v !== null) {
  1489. $v = (int) $v;
  1490. }
  1491. if ($this->contributors !== $v || $this->isNew()) {
  1492. $this->contributors = $v;
  1493. $this->modifiedColumns[] = kshowPeer::CONTRIBUTORS;
  1494. }
  1495. return $this;
  1496. } // setContributors()
  1497. /**
  1498. * Set the value of [subscribers] column.
  1499. *
  1500. * @param int $v new value
  1501. * @return kshow The current object (for fluent API support)
  1502. */
  1503. public function setSubscribers($v)
  1504. {
  1505. if(!isset($this->oldColumnsValues[kshowPeer::SUBSCRIBERS]))
  1506. $this->oldColumnsValues[kshowPeer::SUBSCRIBERS] = $this->subscribers;
  1507. if ($v !== null) {
  1508. $v = (int) $v;
  1509. }
  1510. if ($this->subscribers !== $v || $this->isNew()) {
  1511. $this->subscribers = $v;
  1512. $this->modifiedColumns[] = kshowPeer::SUBSCRIBERS;
  1513. }
  1514. return $this;
  1515. } // setSubscribers()
  1516. /**
  1517. * Set the value of [number_of_updates] column.
  1518. *
  1519. * @param int $v new value
  1520. * @return kshow The current object (for fluent API support)
  1521. */
  1522. public function setNumberOfUpdates($v)
  1523. {
  1524. if(!isset($this->oldColumnsValues[kshowPeer::NUMBER_OF_UPDATES]))
  1525. $this->oldColumnsValues[kshowPeer::NUMBER_OF_UPDATES] = $this->number_of_updates;
  1526. if ($v !== null) {
  1527. $v = (int) $v;
  1528. }
  1529. if ($this->number_of_updates !== $v || $this->isNew()) {
  1530. $this->number_of_updates = $v;
  1531. $this->modifiedColumns[] = kshowPeer::NUMBER_OF_UPDATES;
  1532. }
  1533. return $this;
  1534. } // setNumberOfUpdates()
  1535. /**
  1536. * Set the value of [tags] column.
  1537. *
  1538. * @param string $v new value
  1539. * @return kshow The current object (for fluent API support)
  1540. */
  1541. public function setTags($v)
  1542. {
  1543. if(!isset($this->oldColumnsValues[kshowPeer::TAGS]))
  1544. $this->oldColumnsValues[kshowPeer::TAGS] = $this->tags;
  1545. if ($v !== null) {
  1546. $v = (string) $v;
  1547. }
  1548. if ($this->tags !== $v) {
  1549. $this->tags = $v;
  1550. $this->modifiedColumns[] = kshowPeer::TAGS;
  1551. }
  1552. return $this;
  1553. } // setTags()
  1554. /**
  1555. * Set the value of [custom_data] column.
  1556. *
  1557. * @param string $v new value
  1558. * @return kshow The current object (for fluent API support)
  1559. */
  1560. public function setCustomData($v)
  1561. {
  1562. if ($v !== null) {
  1563. $v = (string) $v;
  1564. }
  1565. if ($this->custom_data !== $v) {
  1566. $this->custom_data = $v;
  1567. $this->modifiedColumns[] = kshowPeer::CUSTOM_DATA;
  1568. }
  1569. return $this;
  1570. } // setCustomData()
  1571. /**
  1572. * Set the value of [indexed_custom_data_1] column.
  1573. *
  1574. * @param int $v new value
  1575. * @return kshow The current object (for fluent API support)
  1576. */
  1577. public function setIndexedCustomData1($v)
  1578. {
  1579. if(!isset($this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_1]))
  1580. $this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_1] = $this->indexed_custom_data_1;
  1581. if ($v !== null) {
  1582. $v = (int) $v;
  1583. }
  1584. if ($this->indexed_custom_data_1 !== $v) {
  1585. $this->indexed_custom_data_1 = $v;
  1586. $this->modifiedColumns[] = kshowPeer::INDEXED_CUSTOM_DATA_1;
  1587. }
  1588. return $this;
  1589. } // setIndexedCustomData1()
  1590. /**
  1591. * Set the value of [indexed_custom_data_2] column.
  1592. *
  1593. * @param int $v new value
  1594. * @return kshow The current object (for fluent API support)
  1595. */
  1596. public function setIndexedCustomData2($v)
  1597. {
  1598. if(!isset($this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_2]))
  1599. $this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_2] = $this->indexed_custom_data_2;
  1600. if ($v !== null) {
  1601. $v = (int) $v;
  1602. }
  1603. if ($this->indexed_custom_data_2 !== $v) {
  1604. $this->indexed_custom_data_2 = $v;
  1605. $this->modifiedColumns[] = kshowPeer::INDEXED_CUSTOM_DATA_2;
  1606. }
  1607. return $this;
  1608. } // setIndexedCustomData2()
  1609. /**
  1610. * Set the value of [indexed_custom_data_3] column.
  1611. *
  1612. * @param string $v new value
  1613. * @return kshow The current object (for fluent API support)
  1614. */
  1615. public function setIndexedCustomData3($v)
  1616. {
  1617. if(!isset($this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_3]))
  1618. $this->oldColumnsValues[kshowPeer::INDEXED_CUSTOM_DATA_3] = $this->indexed_custom_data_3;
  1619. if ($v !== null) {
  1620. $v = (string) $v;
  1621. }
  1622. if ($this->indexed_custom_data_3 !== $v) {
  1623. $this->indexed_custom_data_3 = $v;
  1624. $this->modifiedColumns[] = kshowPeer::INDEXED_CUSTOM_DATA_3;
  1625. }
  1626. return $this;
  1627. } // setIndexedCustomData3()
  1628. /**
  1629. * Set the value of [reoccurence] column.
  1630. *
  1631. * @param int $v new value
  1632. * @return kshow The current object (for fluent API support)
  1633. */
  1634. public function setReoccurence($v)
  1635. {
  1636. if(!isset($this->oldColumnsValues[kshowPeer::REOCCURENCE]))
  1637. $this->oldColumnsValues[kshowPeer::REOCCURENCE] = $this->reoccurence;
  1638. if ($v !== null) {
  1639. $v = (int) $v;
  1640. }
  1641. if ($this->reoccurence !== $v) {
  1642. $this->reoccurence = $v;
  1643. $this->modifiedColumns[] = kshowPeer::REOCCURENCE;
  1644. }
  1645. return $this;
  1646. } // setReoccurence()
  1647. /**
  1648. * Set the value of [license_type] column.
  1649. *
  1650. * @param int $v new value
  1651. * @return kshow The current object (for fluent API support)
  1652. */
  1653. public function setLicenseType($v)
  1654. {
  1655. if(!isset($this->oldColumnsValues[kshowPeer::LICENSE_TYPE]))
  1656. $this->oldColumnsValues[kshowPeer::LICENSE_TYPE] = $this->license_type;
  1657. if ($v !== null) {
  1658. $v = (int) $v;
  1659. }
  1660. if ($this->license_type !== $v) {
  1661. $this->license_type = $v;
  1662. $this->modifiedColumns[] = kshowPeer::LICENSE_TYPE;
  1663. }
  1664. return $this;
  1665. } // setLicenseType()
  1666. /**
  1667. * Set the value of [length_in_msecs] column.
  1668. *
  1669. * @param int $v new value
  1670. * @return kshow The current object (for fluent API support)
  1671. */
  1672. public function setLengthInMsecs($v)
  1673. {
  1674. if(!isset($this->oldColumnsValues[kshowPeer::LENGTH_IN_MSECS]))
  1675. $this->oldColumnsValues[kshowPeer::LENGTH_IN_MSECS] = $this->length_in_msecs;
  1676. if ($v !== null) {
  1677. $v = (int) $v;
  1678. }
  1679. if ($this->length_in_msecs !== $v || $this->isNew()) {
  1680. $this->length_in_msecs = $v;
  1681. $this->modifiedColumns[] = kshowPeer::LENGTH_IN_MSECS;
  1682. }
  1683. return $this;
  1684. } // setLengthInMsecs()
  1685. /**
  1686. * Set the value of [view_permissions] column.
  1687. *
  1688. * @param int $v new value
  1689. * @return kshow The current object (for fluent API support)
  1690. */
  1691. public function setViewPermissions($v)
  1692. {
  1693. if(!isset($this->oldColumnsValues[kshowPeer::VIEW_PERMISSIONS]))
  1694. $this->oldColumnsValues[kshowPeer::VIEW_PERMISSIONS] = $this->view_permissions;
  1695. if ($v !== null) {
  1696. $v = (int) $v;
  1697. }
  1698. if ($this->view_permissions !== $v) {
  1699. $this->view_permissions = $v;
  1700. $this->modifiedColumns[] = kshowPeer::VIEW_PERMISSIONS;
  1701. }
  1702. return $this;
  1703. } // setViewPermissions()
  1704. /**
  1705. * Set the value of [view_password] column.
  1706. *
  1707. * @param string $v new value
  1708. * @return kshow The current object (for fluent API support)
  1709. */
  1710. public function setViewPassword($v)
  1711. {
  1712. if(!isset($this->oldColumnsValues[kshowPeer::VIEW_PASSWORD]))
  1713. $this->oldColumnsValues[kshowPeer::VIEW_PASSWORD] = $this->view_password;
  1714. if ($v !== null) {
  1715. $v = (string) $v;
  1716. }
  1717. if ($this->view_password !== $v) {
  1718. $this->view_password = $v;
  1719. $this->modifiedColumns[] = kshowPeer::VIEW_PASSWORD;
  1720. }
  1721. return $this;
  1722. } // setViewPassword()
  1723. /**
  1724. * Set the value of [contrib_permissions] column.
  1725. *
  1726. * @param int $v new value
  1727. * @return kshow The current object (for fluent API support)
  1728. */
  1729. public function setContribPermissions($v)
  1730. {
  1731. if(!isset($this->oldColumnsValues[kshowPeer::CONTRIB_PERMISSIONS]))
  1732. $this->oldColumnsValues[kshowPeer::CONTRIB_PERMISSIONS] = $this->contrib_permissions;
  1733. if ($v !== null) {
  1734. $v = (int) $v;
  1735. }
  1736. if ($this->contrib_permissions !== $v) {
  1737. $this->contrib_permissions = $v;
  1738. $this->modifiedColumns[] = kshowPeer::CONTRIB_PERMISSIONS;
  1739. }
  1740. return $this;
  1741. } // setContribPermissions()
  1742. /**
  1743. * Set the value of [contrib_password] column.
  1744. *
  1745. * @param string $v new value
  1746. * @return kshow The current object (for fluent API support)
  1747. */
  1748. public function setContribPassword($v)
  1749. {
  1750. if(!isset($this->oldColumnsValues[kshowPeer::CONTRIB_PASSWORD]))
  1751. $this->oldColumnsValues[kshowPeer::CONTRIB_PASSWORD] = $this->contrib_password;
  1752. if ($v !== null) {
  1753. $v = (string) $v;
  1754. }
  1755. if ($this->contrib_password !== $v) {
  1756. $this->contrib_password = $v;
  1757. $this->modifiedColumns[] = kshowPeer::CONTRIB_PASSWORD;
  1758. }
  1759. return $this;
  1760. } // setContribPassword()
  1761. /**
  1762. * Set the value of [edit_permissions] column.
  1763. *
  1764. * @param int $v new value
  1765. * @return kshow The current object (for fluent API support)
  1766. */
  1767. public function setEditPermissions($v)
  1768. {
  1769. if(!isset($this->oldColumnsValues[kshowPeer::EDIT_PERMISSIONS]))
  1770. $this->oldColumnsValues[kshowPeer::EDIT_PERMISSIONS] = $this->edit_permissions;
  1771. if ($v !== null) {
  1772. $v = (int) $v;
  1773. }
  1774. if ($this->edit_permissions !== $v) {
  1775. $this->edit_permissions = $v;
  1776. $this->modifiedColumns[] = kshowPeer::EDIT_PERMISSIONS;
  1777. }
  1778. return $this;
  1779. } // setEditPermissions()
  1780. /**
  1781. * Set the value of [edit_password] column.
  1782. *
  1783. * @param string $v new value
  1784. * @return kshow The current object (for fluent API support)
  1785. */
  1786. public function setEditPassword($v)
  1787. {
  1788. if(!isset($this->oldColumnsValues[kshowPeer::EDIT_PASSWORD]))
  1789. $this->oldColumnsValues[kshowPeer::EDIT_PASSWORD] = $this->edit_password;
  1790. if ($v !== null) {
  1791. $v = (string) $v;
  1792. }
  1793. if ($this->edit_password !== $v) {
  1794. $this->edit_password = $v;
  1795. $this->modifiedColumns[] = kshowPeer::EDIT_PASSWORD;
  1796. }
  1797. return $this;
  1798. } // setEditPassword()
  1799. /**
  1800. * Set the value of [salt] column.
  1801. *
  1802. * @param string $v new value
  1803. * @return kshow The current object (for fluent API support)
  1804. */
  1805. public function setSalt($v)
  1806. {
  1807. if(!isset($this->oldColumnsValues[kshowPeer::SALT]))
  1808. $this->oldColumnsValues[kshowPeer::SALT] = $this->salt;
  1809. if ($v !== null) {
  1810. $v = (string) $v;
  1811. }
  1812. if ($this->salt !== $v) {
  1813. $this->salt = $v;
  1814. $this->modifiedColumns[] = kshowPeer::SALT;
  1815. }
  1816. return $this;
  1817. } // setSalt()
  1818. /**
  1819. * Sets the value of [created_at] column to a normalized version of the date/time value specified.
  1820. *
  1821. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1822. * be treated as NULL for temporal objects.
  1823. * @return kshow The current object (for fluent API support)
  1824. */
  1825. public function setCreatedAt($v)
  1826. {
  1827. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1828. // -- which is unexpected, to say the least.
  1829. if ($v === null || $v === '') {
  1830. $dt = null;
  1831. } elseif ($v instanceof DateTime) {
  1832. $dt = $v;
  1833. } else {
  1834. // some string/numeric value passed; we normalize that so that we can
  1835. // validate it.
  1836. try {
  1837. if (is_numeric($v)) { // if it's a unix timestamp
  1838. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1839. // We have to explicitly specify and then change the time zone because of a
  1840. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1841. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1842. } else {
  1843. $dt = new DateTime($v);
  1844. }
  1845. } catch (Exception $x) {
  1846. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1847. }
  1848. }
  1849. if ( $this->created_at !== null || $dt !== null ) {
  1850. // (nested ifs are a little easier to read in this case)
  1851. $currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  1852. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  1853. if ( ($currNorm !== $newNorm) // normalized values don't match
  1854. )
  1855. {
  1856. $this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  1857. $this->modifiedColumns[] = kshowPeer::CREATED_AT;
  1858. }
  1859. } // if either are not null
  1860. return $this;
  1861. } // setCreatedAt()
  1862. /**
  1863. * Sets the value of [updated_at] column to a normalized version of the date/time value specified.
  1864. *
  1865. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1866. * be treated as NULL for temporal objects.
  1867. * @return kshow The current object (for fluent API support)
  1868. */
  1869. public function setUpdatedAt($v)
  1870. {
  1871. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1872. // -- which is unexpected, to say the least.
  1873. if ($v === null || $v === '') {
  1874. $d

Large files files are truncated, but you can click here to view the full file