PageRenderTime 55ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

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

https://bitbucket.org/pandaos/kaltura
PHP | 3713 lines | 1987 code | 499 blank | 1227 comment | 398 complexity | 6ad3af9db06e5943a0f26fb92d39406f 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 'flavor_params' table.
  4. *
  5. *
  6. *
  7. * @package Core
  8. * @subpackage model.om
  9. */
  10. abstract class BaseassetParams 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 assetParamsPeer
  16. */
  17. protected static $peer;
  18. /**
  19. * The value for the id field.
  20. * @var int
  21. */
  22. protected $id;
  23. /**
  24. * The value for the version field.
  25. * @var int
  26. */
  27. protected $version;
  28. /**
  29. * The value for the partner_id field.
  30. * @var int
  31. */
  32. protected $partner_id;
  33. /**
  34. * The value for the name field.
  35. * Note: this column has a database default value of: ''
  36. * @var string
  37. */
  38. protected $name;
  39. /**
  40. * The value for the system_name field.
  41. * Note: this column has a database default value of: ''
  42. * @var string
  43. */
  44. protected $system_name;
  45. /**
  46. * The value for the tags field.
  47. * @var string
  48. */
  49. protected $tags;
  50. /**
  51. * The value for the description field.
  52. * Note: this column has a database default value of: ''
  53. * @var string
  54. */
  55. protected $description;
  56. /**
  57. * The value for the ready_behavior field.
  58. * @var int
  59. */
  60. protected $ready_behavior;
  61. /**
  62. * The value for the created_at field.
  63. * @var string
  64. */
  65. protected $created_at;
  66. /**
  67. * The value for the updated_at field.
  68. * @var string
  69. */
  70. protected $updated_at;
  71. /**
  72. * The value for the deleted_at field.
  73. * @var string
  74. */
  75. protected $deleted_at;
  76. /**
  77. * The value for the is_default field.
  78. * Note: this column has a database default value of: 0
  79. * @var int
  80. */
  81. protected $is_default;
  82. /**
  83. * The value for the format field.
  84. * @var string
  85. */
  86. protected $format;
  87. /**
  88. * The value for the video_codec field.
  89. * @var string
  90. */
  91. protected $video_codec;
  92. /**
  93. * The value for the video_bitrate field.
  94. * Note: this column has a database default value of: 0
  95. * @var int
  96. */
  97. protected $video_bitrate;
  98. /**
  99. * The value for the audio_codec field.
  100. * @var string
  101. */
  102. protected $audio_codec;
  103. /**
  104. * The value for the audio_bitrate field.
  105. * Note: this column has a database default value of: 0
  106. * @var int
  107. */
  108. protected $audio_bitrate;
  109. /**
  110. * The value for the audio_channels field.
  111. * Note: this column has a database default value of: 0
  112. * @var int
  113. */
  114. protected $audio_channels;
  115. /**
  116. * The value for the audio_sample_rate field.
  117. * Note: this column has a database default value of: 0
  118. * @var int
  119. */
  120. protected $audio_sample_rate;
  121. /**
  122. * The value for the audio_resolution field.
  123. * Note: this column has a database default value of: 0
  124. * @var int
  125. */
  126. protected $audio_resolution;
  127. /**
  128. * The value for the width field.
  129. * Note: this column has a database default value of: 0
  130. * @var int
  131. */
  132. protected $width;
  133. /**
  134. * The value for the height field.
  135. * Note: this column has a database default value of: 0
  136. * @var int
  137. */
  138. protected $height;
  139. /**
  140. * The value for the frame_rate field.
  141. * Note: this column has a database default value of: 0
  142. * @var double
  143. */
  144. protected $frame_rate;
  145. /**
  146. * The value for the gop_size field.
  147. * Note: this column has a database default value of: 0
  148. * @var int
  149. */
  150. protected $gop_size;
  151. /**
  152. * The value for the two_pass field.
  153. * Note: this column has a database default value of: false
  154. * @var boolean
  155. */
  156. protected $two_pass;
  157. /**
  158. * The value for the conversion_engines field.
  159. * @var string
  160. */
  161. protected $conversion_engines;
  162. /**
  163. * The value for the conversion_engines_extra_params field.
  164. * @var string
  165. */
  166. protected $conversion_engines_extra_params;
  167. /**
  168. * The value for the custom_data field.
  169. * @var string
  170. */
  171. protected $custom_data;
  172. /**
  173. * The value for the view_order field.
  174. * @var int
  175. */
  176. protected $view_order;
  177. /**
  178. * The value for the creation_mode field.
  179. * Note: this column has a database default value of: 1
  180. * @var int
  181. */
  182. protected $creation_mode;
  183. /**
  184. * The value for the deinterlice field.
  185. * @var int
  186. */
  187. protected $deinterlice;
  188. /**
  189. * The value for the rotate field.
  190. * @var int
  191. */
  192. protected $rotate;
  193. /**
  194. * The value for the operators field.
  195. * @var string
  196. */
  197. protected $operators;
  198. /**
  199. * The value for the engine_version field.
  200. * @var int
  201. */
  202. protected $engine_version;
  203. /**
  204. * The value for the type field.
  205. * Note: this column has a database default value of: 0
  206. * @var int
  207. */
  208. protected $type;
  209. /**
  210. * @var array assetParamsOutput[] Collection to store aggregation of assetParamsOutput objects.
  211. */
  212. protected $collassetParamsOutputs;
  213. /**
  214. * @var Criteria The criteria used to select the current contents of collassetParamsOutputs.
  215. */
  216. private $lastassetParamsOutputCriteria = null;
  217. /**
  218. * @var array asset[] Collection to store aggregation of asset objects.
  219. */
  220. protected $collassets;
  221. /**
  222. * @var Criteria The criteria used to select the current contents of collassets.
  223. */
  224. private $lastassetCriteria = null;
  225. /**
  226. * @var array flavorParamsConversionProfile[] Collection to store aggregation of flavorParamsConversionProfile objects.
  227. */
  228. protected $collflavorParamsConversionProfiles;
  229. /**
  230. * @var Criteria The criteria used to select the current contents of collflavorParamsConversionProfiles.
  231. */
  232. private $lastflavorParamsConversionProfileCriteria = null;
  233. /**
  234. * Flag to prevent endless save loop, if this object is referenced
  235. * by another object which falls in this transaction.
  236. * @var boolean
  237. */
  238. protected $alreadyInSave = false;
  239. /**
  240. * Flag to prevent endless validation loop, if this object is referenced
  241. * by another object which falls in this transaction.
  242. * @var boolean
  243. */
  244. protected $alreadyInValidation = false;
  245. /**
  246. * Store columns old values before the changes
  247. * @var array
  248. */
  249. protected $oldColumnsValues = array();
  250. /**
  251. * @return array
  252. */
  253. public function getColumnsOldValues()
  254. {
  255. return $this->oldColumnsValues;
  256. }
  257. /**
  258. * Applies default values to this object.
  259. * This method should be called from the object's constructor (or
  260. * equivalent initialization method).
  261. * @see __construct()
  262. */
  263. public function applyDefaultValues()
  264. {
  265. $this->name = '';
  266. $this->system_name = '';
  267. $this->description = '';
  268. $this->is_default = 0;
  269. $this->video_bitrate = 0;
  270. $this->audio_bitrate = 0;
  271. $this->audio_channels = 0;
  272. $this->audio_sample_rate = 0;
  273. $this->audio_resolution = 0;
  274. $this->width = 0;
  275. $this->height = 0;
  276. $this->frame_rate = 0;
  277. $this->gop_size = 0;
  278. $this->two_pass = false;
  279. $this->creation_mode = 1;
  280. $this->type = 0;
  281. }
  282. /**
  283. * Initializes internal state of BaseassetParams object.
  284. * @see applyDefaults()
  285. */
  286. public function __construct()
  287. {
  288. parent::__construct();
  289. $this->applyDefaultValues();
  290. }
  291. /**
  292. * Get the [id] column value.
  293. *
  294. * @return int
  295. */
  296. public function getId()
  297. {
  298. return $this->id;
  299. }
  300. /**
  301. * Get the [version] column value.
  302. *
  303. * @return int
  304. */
  305. public function getVersion()
  306. {
  307. return $this->version;
  308. }
  309. /**
  310. * Get the [partner_id] column value.
  311. *
  312. * @return int
  313. */
  314. public function getPartnerId()
  315. {
  316. return $this->partner_id;
  317. }
  318. /**
  319. * Get the [name] column value.
  320. *
  321. * @return string
  322. */
  323. public function getName()
  324. {
  325. return $this->name;
  326. }
  327. /**
  328. * Get the [system_name] column value.
  329. *
  330. * @return string
  331. */
  332. public function getSystemName()
  333. {
  334. return $this->system_name;
  335. }
  336. /**
  337. * Get the [tags] column value.
  338. *
  339. * @return string
  340. */
  341. public function getTags()
  342. {
  343. return $this->tags;
  344. }
  345. /**
  346. * Get the [description] column value.
  347. *
  348. * @return string
  349. */
  350. public function getDescription()
  351. {
  352. return $this->description;
  353. }
  354. /**
  355. * Get the [ready_behavior] column value.
  356. *
  357. * @return int
  358. */
  359. public function getReadyBehavior()
  360. {
  361. return $this->ready_behavior;
  362. }
  363. /**
  364. * Get the [optionally formatted] temporal [created_at] column value.
  365. *
  366. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  367. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  368. *
  369. * @param string $format The date/time format string (either date()-style or strftime()-style).
  370. * If format is NULL, then the raw unix timestamp integer will be returned.
  371. * @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
  372. * @throws PropelException - if unable to parse/validate the date/time value.
  373. */
  374. public function getCreatedAt($format = 'Y-m-d H:i:s')
  375. {
  376. if ($this->created_at === null) {
  377. return null;
  378. }
  379. if ($this->created_at === '0000-00-00 00:00:00') {
  380. // while technically this is not a default value of NULL,
  381. // this seems to be closest in meaning.
  382. return null;
  383. } else {
  384. try {
  385. $dt = new DateTime($this->created_at);
  386. } catch (Exception $x) {
  387. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
  388. }
  389. }
  390. if ($format === null) {
  391. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  392. return (int) $dt->format('U');
  393. } elseif (strpos($format, '%') !== false) {
  394. return strftime($format, $dt->format('U'));
  395. } else {
  396. return $dt->format($format);
  397. }
  398. }
  399. /**
  400. * Get the [optionally formatted] temporal [updated_at] column value.
  401. *
  402. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  403. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  404. *
  405. * @param string $format The date/time format string (either date()-style or strftime()-style).
  406. * If format is NULL, then the raw unix timestamp integer will be returned.
  407. * @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
  408. * @throws PropelException - if unable to parse/validate the date/time value.
  409. */
  410. public function getUpdatedAt($format = 'Y-m-d H:i:s')
  411. {
  412. if ($this->updated_at === null) {
  413. return null;
  414. }
  415. if ($this->updated_at === '0000-00-00 00:00:00') {
  416. // while technically this is not a default value of NULL,
  417. // this seems to be closest in meaning.
  418. return null;
  419. } else {
  420. try {
  421. $dt = new DateTime($this->updated_at);
  422. } catch (Exception $x) {
  423. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
  424. }
  425. }
  426. if ($format === null) {
  427. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  428. return (int) $dt->format('U');
  429. } elseif (strpos($format, '%') !== false) {
  430. return strftime($format, $dt->format('U'));
  431. } else {
  432. return $dt->format($format);
  433. }
  434. }
  435. /**
  436. * Get the [optionally formatted] temporal [deleted_at] column value.
  437. *
  438. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  439. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  440. *
  441. * @param string $format The date/time format string (either date()-style or strftime()-style).
  442. * If format is NULL, then the raw unix timestamp integer will be returned.
  443. * @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
  444. * @throws PropelException - if unable to parse/validate the date/time value.
  445. */
  446. public function getDeletedAt($format = 'Y-m-d H:i:s')
  447. {
  448. if ($this->deleted_at === null) {
  449. return null;
  450. }
  451. if ($this->deleted_at === '0000-00-00 00:00:00') {
  452. // while technically this is not a default value of NULL,
  453. // this seems to be closest in meaning.
  454. return null;
  455. } else {
  456. try {
  457. $dt = new DateTime($this->deleted_at);
  458. } catch (Exception $x) {
  459. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->deleted_at, true), $x);
  460. }
  461. }
  462. if ($format === null) {
  463. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  464. return (int) $dt->format('U');
  465. } elseif (strpos($format, '%') !== false) {
  466. return strftime($format, $dt->format('U'));
  467. } else {
  468. return $dt->format($format);
  469. }
  470. }
  471. /**
  472. * Get the [is_default] column value.
  473. *
  474. * @return int
  475. */
  476. public function getIsDefault()
  477. {
  478. return $this->is_default;
  479. }
  480. /**
  481. * Get the [format] column value.
  482. *
  483. * @return string
  484. */
  485. public function getFormat()
  486. {
  487. return $this->format;
  488. }
  489. /**
  490. * Get the [video_codec] column value.
  491. *
  492. * @return string
  493. */
  494. public function getVideoCodec()
  495. {
  496. return $this->video_codec;
  497. }
  498. /**
  499. * Get the [video_bitrate] column value.
  500. *
  501. * @return int
  502. */
  503. public function getVideoBitrate()
  504. {
  505. return $this->video_bitrate;
  506. }
  507. /**
  508. * Get the [audio_codec] column value.
  509. *
  510. * @return string
  511. */
  512. public function getAudioCodec()
  513. {
  514. return $this->audio_codec;
  515. }
  516. /**
  517. * Get the [audio_bitrate] column value.
  518. *
  519. * @return int
  520. */
  521. public function getAudioBitrate()
  522. {
  523. return $this->audio_bitrate;
  524. }
  525. /**
  526. * Get the [audio_channels] column value.
  527. *
  528. * @return int
  529. */
  530. public function getAudioChannels()
  531. {
  532. return $this->audio_channels;
  533. }
  534. /**
  535. * Get the [audio_sample_rate] column value.
  536. *
  537. * @return int
  538. */
  539. public function getAudioSampleRate()
  540. {
  541. return $this->audio_sample_rate;
  542. }
  543. /**
  544. * Get the [audio_resolution] column value.
  545. *
  546. * @return int
  547. */
  548. public function getAudioResolution()
  549. {
  550. return $this->audio_resolution;
  551. }
  552. /**
  553. * Get the [width] column value.
  554. *
  555. * @return int
  556. */
  557. public function getWidth()
  558. {
  559. return $this->width;
  560. }
  561. /**
  562. * Get the [height] column value.
  563. *
  564. * @return int
  565. */
  566. public function getHeight()
  567. {
  568. return $this->height;
  569. }
  570. /**
  571. * Get the [frame_rate] column value.
  572. *
  573. * @return double
  574. */
  575. public function getFrameRate()
  576. {
  577. return $this->frame_rate;
  578. }
  579. /**
  580. * Get the [gop_size] column value.
  581. *
  582. * @return int
  583. */
  584. public function getGopSize()
  585. {
  586. return $this->gop_size;
  587. }
  588. /**
  589. * Get the [two_pass] column value.
  590. *
  591. * @return boolean
  592. */
  593. public function getTwoPass()
  594. {
  595. return $this->two_pass;
  596. }
  597. /**
  598. * Get the [conversion_engines] column value.
  599. *
  600. * @return string
  601. */
  602. public function getConversionEngines()
  603. {
  604. return $this->conversion_engines;
  605. }
  606. /**
  607. * Get the [conversion_engines_extra_params] column value.
  608. *
  609. * @return string
  610. */
  611. public function getConversionEnginesExtraParams()
  612. {
  613. return $this->conversion_engines_extra_params;
  614. }
  615. /**
  616. * Get the [custom_data] column value.
  617. *
  618. * @return string
  619. */
  620. public function getCustomData()
  621. {
  622. return $this->custom_data;
  623. }
  624. /**
  625. * Get the [view_order] column value.
  626. *
  627. * @return int
  628. */
  629. public function getViewOrder()
  630. {
  631. return $this->view_order;
  632. }
  633. /**
  634. * Get the [creation_mode] column value.
  635. *
  636. * @return int
  637. */
  638. public function getCreationMode()
  639. {
  640. return $this->creation_mode;
  641. }
  642. /**
  643. * Get the [deinterlice] column value.
  644. *
  645. * @return int
  646. */
  647. public function getDeinterlice()
  648. {
  649. return $this->deinterlice;
  650. }
  651. /**
  652. * Get the [rotate] column value.
  653. *
  654. * @return int
  655. */
  656. public function getRotate()
  657. {
  658. return $this->rotate;
  659. }
  660. /**
  661. * Get the [operators] column value.
  662. *
  663. * @return string
  664. */
  665. public function getOperators()
  666. {
  667. return $this->operators;
  668. }
  669. /**
  670. * Get the [engine_version] column value.
  671. *
  672. * @return int
  673. */
  674. public function getEngineVersion()
  675. {
  676. return $this->engine_version;
  677. }
  678. /**
  679. * Get the [type] column value.
  680. *
  681. * @return int
  682. */
  683. public function getType()
  684. {
  685. return $this->type;
  686. }
  687. /**
  688. * Set the value of [id] column.
  689. *
  690. * @param int $v new value
  691. * @return assetParams The current object (for fluent API support)
  692. */
  693. public function setId($v)
  694. {
  695. if(!isset($this->oldColumnsValues[assetParamsPeer::ID]))
  696. $this->oldColumnsValues[assetParamsPeer::ID] = $this->id;
  697. if ($v !== null) {
  698. $v = (int) $v;
  699. }
  700. if ($this->id !== $v) {
  701. $this->id = $v;
  702. $this->modifiedColumns[] = assetParamsPeer::ID;
  703. }
  704. return $this;
  705. } // setId()
  706. /**
  707. * Set the value of [version] column.
  708. *
  709. * @param int $v new value
  710. * @return assetParams The current object (for fluent API support)
  711. */
  712. public function setVersion($v)
  713. {
  714. if(!isset($this->oldColumnsValues[assetParamsPeer::VERSION]))
  715. $this->oldColumnsValues[assetParamsPeer::VERSION] = $this->version;
  716. if ($v !== null) {
  717. $v = (int) $v;
  718. }
  719. if ($this->version !== $v) {
  720. $this->version = $v;
  721. $this->modifiedColumns[] = assetParamsPeer::VERSION;
  722. }
  723. return $this;
  724. } // setVersion()
  725. /**
  726. * Set the value of [partner_id] column.
  727. *
  728. * @param int $v new value
  729. * @return assetParams The current object (for fluent API support)
  730. */
  731. public function setPartnerId($v)
  732. {
  733. if(!isset($this->oldColumnsValues[assetParamsPeer::PARTNER_ID]))
  734. $this->oldColumnsValues[assetParamsPeer::PARTNER_ID] = $this->partner_id;
  735. if ($v !== null) {
  736. $v = (int) $v;
  737. }
  738. if ($this->partner_id !== $v) {
  739. $this->partner_id = $v;
  740. $this->modifiedColumns[] = assetParamsPeer::PARTNER_ID;
  741. }
  742. return $this;
  743. } // setPartnerId()
  744. /**
  745. * Set the value of [name] column.
  746. *
  747. * @param string $v new value
  748. * @return assetParams The current object (for fluent API support)
  749. */
  750. public function setName($v)
  751. {
  752. if(!isset($this->oldColumnsValues[assetParamsPeer::NAME]))
  753. $this->oldColumnsValues[assetParamsPeer::NAME] = $this->name;
  754. if ($v !== null) {
  755. $v = (string) $v;
  756. }
  757. if ($this->name !== $v || $this->isNew()) {
  758. $this->name = $v;
  759. $this->modifiedColumns[] = assetParamsPeer::NAME;
  760. }
  761. return $this;
  762. } // setName()
  763. /**
  764. * Set the value of [system_name] column.
  765. *
  766. * @param string $v new value
  767. * @return assetParams The current object (for fluent API support)
  768. */
  769. public function setSystemName($v)
  770. {
  771. if(!isset($this->oldColumnsValues[assetParamsPeer::SYSTEM_NAME]))
  772. $this->oldColumnsValues[assetParamsPeer::SYSTEM_NAME] = $this->system_name;
  773. if ($v !== null) {
  774. $v = (string) $v;
  775. }
  776. if ($this->system_name !== $v || $this->isNew()) {
  777. $this->system_name = $v;
  778. $this->modifiedColumns[] = assetParamsPeer::SYSTEM_NAME;
  779. }
  780. return $this;
  781. } // setSystemName()
  782. /**
  783. * Set the value of [tags] column.
  784. *
  785. * @param string $v new value
  786. * @return assetParams The current object (for fluent API support)
  787. */
  788. public function setTags($v)
  789. {
  790. if(!isset($this->oldColumnsValues[assetParamsPeer::TAGS]))
  791. $this->oldColumnsValues[assetParamsPeer::TAGS] = $this->tags;
  792. if ($v !== null) {
  793. $v = (string) $v;
  794. }
  795. if ($this->tags !== $v) {
  796. $this->tags = $v;
  797. $this->modifiedColumns[] = assetParamsPeer::TAGS;
  798. }
  799. return $this;
  800. } // setTags()
  801. /**
  802. * Set the value of [description] column.
  803. *
  804. * @param string $v new value
  805. * @return assetParams The current object (for fluent API support)
  806. */
  807. public function setDescription($v)
  808. {
  809. if(!isset($this->oldColumnsValues[assetParamsPeer::DESCRIPTION]))
  810. $this->oldColumnsValues[assetParamsPeer::DESCRIPTION] = $this->description;
  811. if ($v !== null) {
  812. $v = (string) $v;
  813. }
  814. if ($this->description !== $v || $this->isNew()) {
  815. $this->description = $v;
  816. $this->modifiedColumns[] = assetParamsPeer::DESCRIPTION;
  817. }
  818. return $this;
  819. } // setDescription()
  820. /**
  821. * Set the value of [ready_behavior] column.
  822. *
  823. * @param int $v new value
  824. * @return assetParams The current object (for fluent API support)
  825. */
  826. public function setReadyBehavior($v)
  827. {
  828. if(!isset($this->oldColumnsValues[assetParamsPeer::READY_BEHAVIOR]))
  829. $this->oldColumnsValues[assetParamsPeer::READY_BEHAVIOR] = $this->ready_behavior;
  830. if ($v !== null) {
  831. $v = (int) $v;
  832. }
  833. if ($this->ready_behavior !== $v) {
  834. $this->ready_behavior = $v;
  835. $this->modifiedColumns[] = assetParamsPeer::READY_BEHAVIOR;
  836. }
  837. return $this;
  838. } // setReadyBehavior()
  839. /**
  840. * Sets the value of [created_at] column to a normalized version of the date/time value specified.
  841. *
  842. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  843. * be treated as NULL for temporal objects.
  844. * @return assetParams The current object (for fluent API support)
  845. */
  846. public function setCreatedAt($v)
  847. {
  848. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  849. // -- which is unexpected, to say the least.
  850. if ($v === null || $v === '') {
  851. $dt = null;
  852. } elseif ($v instanceof DateTime) {
  853. $dt = $v;
  854. } else {
  855. // some string/numeric value passed; we normalize that so that we can
  856. // validate it.
  857. try {
  858. if (is_numeric($v)) { // if it's a unix timestamp
  859. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  860. // We have to explicitly specify and then change the time zone because of a
  861. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  862. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  863. } else {
  864. $dt = new DateTime($v);
  865. }
  866. } catch (Exception $x) {
  867. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  868. }
  869. }
  870. if ( $this->created_at !== null || $dt !== null ) {
  871. // (nested ifs are a little easier to read in this case)
  872. $currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  873. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  874. if ( ($currNorm !== $newNorm) // normalized values don't match
  875. )
  876. {
  877. $this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  878. $this->modifiedColumns[] = assetParamsPeer::CREATED_AT;
  879. }
  880. } // if either are not null
  881. return $this;
  882. } // setCreatedAt()
  883. /**
  884. * Sets the value of [updated_at] column to a normalized version of the date/time value specified.
  885. *
  886. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  887. * be treated as NULL for temporal objects.
  888. * @return assetParams The current object (for fluent API support)
  889. */
  890. public function setUpdatedAt($v)
  891. {
  892. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  893. // -- which is unexpected, to say the least.
  894. if ($v === null || $v === '') {
  895. $dt = null;
  896. } elseif ($v instanceof DateTime) {
  897. $dt = $v;
  898. } else {
  899. // some string/numeric value passed; we normalize that so that we can
  900. // validate it.
  901. try {
  902. if (is_numeric($v)) { // if it's a unix timestamp
  903. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  904. // We have to explicitly specify and then change the time zone because of a
  905. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  906. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  907. } else {
  908. $dt = new DateTime($v);
  909. }
  910. } catch (Exception $x) {
  911. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  912. }
  913. }
  914. if ( $this->updated_at !== null || $dt !== null ) {
  915. // (nested ifs are a little easier to read in this case)
  916. $currNorm = ($this->updated_at !== null && $tmpDt = new DateTime($this->updated_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  917. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  918. if ( ($currNorm !== $newNorm) // normalized values don't match
  919. )
  920. {
  921. $this->updated_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  922. $this->modifiedColumns[] = assetParamsPeer::UPDATED_AT;
  923. }
  924. } // if either are not null
  925. return $this;
  926. } // setUpdatedAt()
  927. /**
  928. * Sets the value of [deleted_at] column to a normalized version of the date/time value specified.
  929. *
  930. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  931. * be treated as NULL for temporal objects.
  932. * @return assetParams The current object (for fluent API support)
  933. */
  934. public function setDeletedAt($v)
  935. {
  936. if(!isset($this->oldColumnsValues[assetParamsPeer::DELETED_AT]))
  937. $this->oldColumnsValues[assetParamsPeer::DELETED_AT] = $this->deleted_at;
  938. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  939. // -- which is unexpected, to say the least.
  940. if ($v === null || $v === '') {
  941. $dt = null;
  942. } elseif ($v instanceof DateTime) {
  943. $dt = $v;
  944. } else {
  945. // some string/numeric value passed; we normalize that so that we can
  946. // validate it.
  947. try {
  948. if (is_numeric($v)) { // if it's a unix timestamp
  949. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  950. // We have to explicitly specify and then change the time zone because of a
  951. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  952. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  953. } else {
  954. $dt = new DateTime($v);
  955. }
  956. } catch (Exception $x) {
  957. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  958. }
  959. }
  960. if ( $this->deleted_at !== null || $dt !== null ) {
  961. // (nested ifs are a little easier to read in this case)
  962. $currNorm = ($this->deleted_at !== null && $tmpDt = new DateTime($this->deleted_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  963. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  964. if ( ($currNorm !== $newNorm) // normalized values don't match
  965. )
  966. {
  967. $this->deleted_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  968. $this->modifiedColumns[] = assetParamsPeer::DELETED_AT;
  969. }
  970. } // if either are not null
  971. return $this;
  972. } // setDeletedAt()
  973. /**
  974. * Set the value of [is_default] column.
  975. *
  976. * @param int $v new value
  977. * @return assetParams The current object (for fluent API support)
  978. */
  979. public function setIsDefault($v)
  980. {
  981. if(!isset($this->oldColumnsValues[assetParamsPeer::IS_DEFAULT]))
  982. $this->oldColumnsValues[assetParamsPeer::IS_DEFAULT] = $this->is_default;
  983. if ($v !== null) {
  984. $v = (int) $v;
  985. }
  986. if ($this->is_default !== $v || $this->isNew()) {
  987. $this->is_default = $v;
  988. $this->modifiedColumns[] = assetParamsPeer::IS_DEFAULT;
  989. }
  990. return $this;
  991. } // setIsDefault()
  992. /**
  993. * Set the value of [format] column.
  994. *
  995. * @param string $v new value
  996. * @return assetParams The current object (for fluent API support)
  997. */
  998. public function setFormat($v)
  999. {
  1000. if(!isset($this->oldColumnsValues[assetParamsPeer::FORMAT]))
  1001. $this->oldColumnsValues[assetParamsPeer::FORMAT] = $this->format;
  1002. if ($v !== null) {
  1003. $v = (string) $v;
  1004. }
  1005. if ($this->format !== $v) {
  1006. $this->format = $v;
  1007. $this->modifiedColumns[] = assetParamsPeer::FORMAT;
  1008. }
  1009. return $this;
  1010. } // setFormat()
  1011. /**
  1012. * Set the value of [video_codec] column.
  1013. *
  1014. * @param string $v new value
  1015. * @return assetParams The current object (for fluent API support)
  1016. */
  1017. public function setVideoCodec($v)
  1018. {
  1019. if(!isset($this->oldColumnsValues[assetParamsPeer::VIDEO_CODEC]))
  1020. $this->oldColumnsValues[assetParamsPeer::VIDEO_CODEC] = $this->video_codec;
  1021. if ($v !== null) {
  1022. $v = (string) $v;
  1023. }
  1024. if ($this->video_codec !== $v) {
  1025. $this->video_codec = $v;
  1026. $this->modifiedColumns[] = assetParamsPeer::VIDEO_CODEC;
  1027. }
  1028. return $this;
  1029. } // setVideoCodec()
  1030. /**
  1031. * Set the value of [video_bitrate] column.
  1032. *
  1033. * @param int $v new value
  1034. * @return assetParams The current object (for fluent API support)
  1035. */
  1036. public function setVideoBitrate($v)
  1037. {
  1038. if(!isset($this->oldColumnsValues[assetParamsPeer::VIDEO_BITRATE]))
  1039. $this->oldColumnsValues[assetParamsPeer::VIDEO_BITRATE] = $this->video_bitrate;
  1040. if ($v !== null) {
  1041. $v = (int) $v;
  1042. }
  1043. if ($this->video_bitrate !== $v || $this->isNew()) {
  1044. $this->video_bitrate = $v;
  1045. $this->modifiedColumns[] = assetParamsPeer::VIDEO_BITRATE;
  1046. }
  1047. return $this;
  1048. } // setVideoBitrate()
  1049. /**
  1050. * Set the value of [audio_codec] column.
  1051. *
  1052. * @param string $v new value
  1053. * @return assetParams The current object (for fluent API support)
  1054. */
  1055. public function setAudioCodec($v)
  1056. {
  1057. if(!isset($this->oldColumnsValues[assetParamsPeer::AUDIO_CODEC]))
  1058. $this->oldColumnsValues[assetParamsPeer::AUDIO_CODEC] = $this->audio_codec;
  1059. if ($v !== null) {
  1060. $v = (string) $v;
  1061. }
  1062. if ($this->audio_codec !== $v) {
  1063. $this->audio_codec = $v;
  1064. $this->modifiedColumns[] = assetParamsPeer::AUDIO_CODEC;
  1065. }
  1066. return $this;
  1067. } // setAudioCodec()
  1068. /**
  1069. * Set the value of [audio_bitrate] column.
  1070. *
  1071. * @param int $v new value
  1072. * @return assetParams The current object (for fluent API support)
  1073. */
  1074. public function setAudioBitrate($v)
  1075. {
  1076. if(!isset($this->oldColumnsValues[assetParamsPeer::AUDIO_BITRATE]))
  1077. $this->oldColumnsValues[assetParamsPeer::AUDIO_BITRATE] = $this->audio_bitrate;
  1078. if ($v !== null) {
  1079. $v = (int) $v;
  1080. }
  1081. if ($this->audio_bitrate !== $v || $this->isNew()) {
  1082. $this->audio_bitrate = $v;
  1083. $this->modifiedColumns[] = assetParamsPeer::AUDIO_BITRATE;
  1084. }
  1085. return $this;
  1086. } // setAudioBitrate()
  1087. /**
  1088. * Set the value of [audio_channels] column.
  1089. *
  1090. * @param int $v new value
  1091. * @return assetParams The current object (for fluent API support)
  1092. */
  1093. public function setAudioChannels($v)
  1094. {
  1095. if(!isset($this->oldColumnsValues[assetParamsPeer::AUDIO_CHANNELS]))
  1096. $this->oldColumnsValues[assetParamsPeer::AUDIO_CHANNELS] = $this->audio_channels;
  1097. if ($v !== null) {
  1098. $v = (int) $v;
  1099. }
  1100. if ($this->audio_channels !== $v || $this->isNew()) {
  1101. $this->audio_channels = $v;
  1102. $this->modifiedColumns[] = assetParamsPeer::AUDIO_CHANNELS;
  1103. }
  1104. return $this;
  1105. } // setAudioChannels()
  1106. /**
  1107. * Set the value of [audio_sample_rate] column.
  1108. *
  1109. * @param int $v new value
  1110. * @return assetParams The current object (for fluent API support)
  1111. */
  1112. public function setAudioSampleRate($v)
  1113. {
  1114. if(!isset($this->oldColumnsValues[assetParamsPeer::AUDIO_SAMPLE_RATE]))
  1115. $this->oldColumnsValues[assetParamsPeer::AUDIO_SAMPLE_RATE] = $this->audio_sample_rate;
  1116. if ($v !== null) {
  1117. $v = (int) $v;
  1118. }
  1119. if ($this->audio_sample_rate !== $v || $this->isNew()) {
  1120. $this->audio_sample_rate = $v;
  1121. $this->modifiedColumns[] = assetParamsPeer::AUDIO_SAMPLE_RATE;
  1122. }
  1123. return $this;
  1124. } // setAudioSampleRate()
  1125. /**
  1126. * Set the value of [audio_resolution] column.
  1127. *
  1128. * @param int $v new value
  1129. * @return assetParams The current object (for fluent API support)
  1130. */
  1131. public function setAudioResolution($v)
  1132. {
  1133. if(!isset($this->oldColumnsValues[assetParamsPeer::AUDIO_RESOLUTION]))
  1134. $this->oldColumnsValues[assetParamsPeer::AUDIO_RESOLUTION] = $this->audio_resolution;
  1135. if ($v !== null) {
  1136. $v = (int) $v;
  1137. }
  1138. if ($this->audio_resolution !== $v || $this->isNew()) {
  1139. $this->audio_resolution = $v;
  1140. $this->modifiedColumns[] = assetParamsPeer::AUDIO_RESOLUTION;
  1141. }
  1142. return $this;
  1143. } // setAudioResolution()
  1144. /**
  1145. * Set the value of [width] column.
  1146. *
  1147. * @param int $v new value
  1148. * @return assetParams The current object (for fluent API support)
  1149. */
  1150. public function setWidth($v)
  1151. {
  1152. if(!isset($this->oldColumnsValues[assetParamsPeer::WIDTH]))
  1153. $this->oldColumnsValues[assetParamsPeer::WIDTH] = $this->width;
  1154. if ($v !== null) {
  1155. $v = (int) $v;
  1156. }
  1157. if ($this->width !== $v || $this->isNew()) {
  1158. $this->width = $v;
  1159. $this->modifiedColumns[] = assetParamsPeer::WIDTH;
  1160. }
  1161. return $this;
  1162. } // setWidth()
  1163. /**
  1164. * Set the value of [height] column.
  1165. *
  1166. * @param int $v new value
  1167. * @return assetParams The current object (for fluent API support)
  1168. */
  1169. public function setHeight($v)
  1170. {
  1171. if(!isset($this->oldColumnsValues[assetParamsPeer::HEIGHT]))
  1172. $this->oldColumnsValues[assetParamsPeer::HEIGHT] = $this->height;
  1173. if ($v !== null) {
  1174. $v = (int) $v;
  1175. }
  1176. if ($this->height !== $v || $this->isNew()) {
  1177. $this->height = $v;
  1178. $this->modifiedColumns[] = assetParamsPeer::HEIGHT;
  1179. }
  1180. return $this;
  1181. } // setHeight()
  1182. /**
  1183. * Set the value of [frame_rate] column.
  1184. *
  1185. * @param double $v new value
  1186. * @return assetParams The current object (for fluent API support)
  1187. */
  1188. public function setFrameRate($v)
  1189. {
  1190. if(!isset($this->oldColumnsValues[assetParamsPeer::FRAME_RATE]))
  1191. $this->oldColumnsValues[assetParamsPeer::FRAME_RATE] = $this->frame_rate;
  1192. if ($v !== null) {
  1193. $v = (double) $v;
  1194. }
  1195. if ($this->frame_rate !== $v || $this->isNew()) {
  1196. $this->frame_rate = $v;
  1197. $this->modifiedColumns[] = assetParamsPeer::FRAME_RATE;
  1198. }
  1199. return $this;
  1200. } // setFrameRate()
  1201. /**
  1202. * Set the value of [gop_size] column.
  1203. *
  1204. * @param int $v new value
  1205. * @return assetParams The current object (for fluent API support)
  1206. */
  1207. public function setGopSize($v)
  1208. {
  1209. if(!isset($this->oldColumnsValues[assetParamsPeer::GOP_SIZE]))
  1210. $this->oldColumnsValues[assetParamsPeer::GOP_SIZE] = $this->gop_size;
  1211. if ($v !== null) {
  1212. $v = (int) $v;
  1213. }
  1214. if ($this->gop_size !== $v || $this->isNew()) {
  1215. $this->gop_size = $v;
  1216. $this->modifiedColumns[] = assetParamsPeer::GOP_SIZE;
  1217. }
  1218. return $this;
  1219. } // setGopSize()
  1220. /**
  1221. * Set the value of [two_pass] column.
  1222. *
  1223. * @param boolean $v new value
  1224. * @return assetParams The current object (for fluent API support)
  1225. */
  1226. public function setTwoPass($v)
  1227. {
  1228. if(!isset($this->oldColumnsValues[assetParamsPeer::TWO_PASS]))
  1229. $this->oldColumnsValues[assetParamsPeer::TWO_PASS] = $this->two_pass;
  1230. if ($v !== null) {
  1231. $v = (boolean) $v;
  1232. }
  1233. if ($this->two_pass !== $v || $this->isNew()) {
  1234. $this->two_pass = $v;
  1235. $this->modifiedColumns[] = assetParamsPeer::TWO_PASS;
  1236. }
  1237. return $this;
  1238. } // setTwoPass()
  1239. /**
  1240. * Set the value of [conversion_engines] column.
  1241. *
  1242. * @param string $v new value
  1243. * @return assetParams The current object (for fluent API support)
  1244. */
  1245. public function setConversionEngines($v)
  1246. {
  1247. if(!isset($this->oldColumnsValues[assetParamsPeer::CONVERSION_ENGINES]))
  1248. $this->oldColumnsValues[assetParamsPeer::CONVERSION_ENGINES] = $this->conversion_engines;
  1249. if ($v !== null) {
  1250. $v = (string) $v;
  1251. }
  1252. if ($this->conversion_engines !== $v) {
  1253. $this->conversion_engines = $v;
  1254. $this->modifiedColumns[] = assetParamsPeer::CONVERSION_ENGINES;
  1255. }
  1256. return $this;
  1257. } // setConversionEngines()
  1258. /**
  1259. * Set the value of [conversion_engines_extra_params] column.
  1260. *
  1261. * @param string $v new value
  1262. * @return assetParams The current object (for fluent API support)
  1263. */
  1264. public function setConversionEnginesExtraParams($v)
  1265. {
  1266. if(!isset($this->oldColumnsValues[assetParamsPeer::CONVERSION_ENGINES_EXTRA_PARAMS]))
  1267. $this->oldColumnsValues[assetParamsPeer::CONVERSION_ENGINES_EXTRA_PARAMS] = $this->conversion_engines_extra_params;
  1268. if ($v !== null) {
  1269. $v = (string) $v;
  1270. }
  1271. if ($this->conversion_engines_extra_params !== $v) {
  1272. $this->conversion_engines_extra_params = $v;
  1273. $this->modifiedColumns[] = assetParamsPeer::CONVERSION_ENGINES_EXTRA_PARAMS;
  1274. }
  1275. return $this;
  1276. } // setConversionEnginesExtraParams()
  1277. /**
  1278. * Set the value of [custom_data] column.
  1279. *
  1280. * @param string $v new value
  1281. * @return assetParams The current object (for fluent API support)
  1282. */
  1283. public function setCustomData($v)
  1284. {
  1285. if ($v !== null) {
  1286. $v = (string) $v;
  1287. }
  1288. if ($this->custom_data !== $v) {
  1289. $this->custom_data = $v;
  1290. $this->modifiedColumns[] = assetParamsPeer::CUSTOM_DATA;
  1291. }
  1292. return $this;
  1293. } // setCustomData()
  1294. /**
  1295. * Set the value of [view_order] column.
  1296. *
  1297. * @param int $v new value
  1298. * @return assetParams The current object (for fluent API support)
  1299. */
  1300. public function setViewOrder($v)
  1301. {
  1302. if(!isset($this->oldColumnsValues[assetParamsPeer::VIEW_ORDER]))
  1303. $this->oldColumnsValues[assetParamsPeer::VIEW_ORDER] = $this->view_order;
  1304. if ($v !== null) {
  1305. $v = (int) $v;
  1306. }
  1307. if ($this->view_order !== $v) {
  1308. $this->view_order = $v;
  1309. $this->modifiedColumns[] = assetParamsPeer::VIEW_ORDER;
  1310. }
  1311. return $this;
  1312. } // setViewOrder()
  1313. /**
  1314. * Set the value of [creation_mode] column.
  1315. *
  1316. * @param int $v new value
  1317. * @return assetParams The current object (for fluent API support)
  1318. */
  1319. public function setCreationMode($v)
  1320. {
  1321. if(!isset($this->oldColumnsValues[assetParamsPeer::CREATION_MODE]))
  1322. $this->oldColumnsValues[assetParamsPeer::CREATION_MODE] = $this->creation_mode;
  1323. if ($v !== null) {
  1324. $v = (int) $v;
  1325. }
  1326. if ($this->creation_mode !== $v || $this->isNew()) {
  1327. $this->creation_mode = $v;
  1328. $this->modifiedColumns[] = assetParamsPeer::CREATION_MODE;
  1329. }
  1330. return $this;
  1331. } // setCreationMode()
  1332. /**
  1333. * Set the value of [deinterlice] column.
  1334. *
  1335. * @param int $v new value
  1336. * @return assetParams The current object (for fluent API support)
  1337. */
  1338. public function setDeinterlice($v)
  1339. {
  1340. if(!isset($this->oldColumnsValues[assetParamsPeer::DEINTERLICE]))
  1341. $this->oldColumnsValues[assetParamsPeer::DEINTERLICE] = $this->deinterlice;
  1342. if ($v !== null) {
  1343. $v = (int) $v;
  1344. }
  1345. if ($this->deinterlice !== $v) {
  1346. $this->deinterlice = $v;
  1347. $this->modifiedColumns[] = assetParamsPeer::DEINTERLICE;
  1348. }
  1349. return $this;
  1350. } // setDeinterlice()
  1351. /**
  1352. * Set the value of [rotate] column.
  1353. *
  1354. * @param int $v new value
  1355. * @return assetParams The current object (for fluent API support)
  1356. */
  1357. public function setRotate($v)
  1358. {
  1359. if(!isset($this->oldColumnsValues[assetParamsPeer::ROTATE]))
  1360. $this->oldColumnsValues[assetParamsPeer::ROTATE] = $this->rotate;
  1361. if ($v !== null) {
  1362. $v = (int) $v;
  1363. }
  1364. if ($this->rotate !== $v) {
  1365. $this->rotate = $v;
  1366. $this->modifiedColumns[] = assetParamsPeer::ROTATE;
  1367. }
  1368. return $this;
  1369. } // setRotate()
  1370. /**
  1371. * Set the value of [operators] column.
  1372. *
  1373. * @param string $v new value
  1374. * @return assetParams The current object (for fluent API support)
  1375. */
  1376. public function setOperators($v)
  1377. {
  1378. if(!isset($this->oldColumnsValues[assetParamsPeer::OPERATORS]))
  1379. $this->oldColumnsValues[assetParamsPeer::OPERATORS] = $this->operators;
  1380. if ($v !== null) {
  1381. $v = (string) $v;
  1382. }
  1383. if ($this->operators !== $v) {
  1384. $this->operators = $v;
  1385. $this->modifiedColumns[] = assetParamsPeer::OPERATORS;
  1386. }
  1387. return $this;
  1388. } // setOperators()
  1389. /**
  1390. * Set the value of [engine_version] column.
  1391. *
  1392. * @param int $v new value
  1393. * @return assetParams The current object (for fluent API support)
  1394. */
  1395. public function setEngineVersion($v)
  1396. {
  1397. if(!isset($this->oldColumnsValues[assetParamsPeer::ENGINE_VERSION]))
  1398. $this->oldColumnsValues[assetParamsPeer::ENGINE_VERSION] = $this->engine_version;
  1399. if ($v !== null) {
  1400. $v = (int) $v;
  1401. }
  1402. if ($this->engine_version !== $v) {
  1403. $this->engine_version = $v;
  1404. $this->modifiedColumns[] = assetParamsPeer::ENGINE_VERSION;
  1405. }
  1406. return $this;
  1407. } // setEngineVersion()
  1408. /**
  1409. * Set the value of [type] column.
  1410. *
  1411. * @param int $v new value
  1412. * @return assetParams The current object (for fluent API support)
  1413. */
  1414. public function setType($v)
  1415. {
  1416. if(!isset($this->oldColumnsValues[assetParamsPeer::TYPE]))
  1417. $this->oldColumnsValues[assetParamsPeer::TYPE] = $this->type;
  1418. if ($v !== null) {
  1419. $v = (int) $v;
  1420. }
  1421. if ($this->type !== $v || $this->isNew()) {
  1422. $this->type = $v;
  1423. $this->modifiedColumns[] = assetParamsPeer::TYPE;
  1424. }
  1425. return $this;
  1426. } // setType()
  1427. /**
  1428. * Indicates whether the columns in this object are only set to default values.
  1429. *
  1430. * This method can be used in conjunction with isModified() to indicate whether an object is both
  1431. * modified _and_ has some values set which are non-default.
  1432. *
  1433. * @return boolean Whether the columns in this object are only been set with default values.
  1434. */
  1435. public function hasOnlyDefaultValues()
  1436. {
  1437. if ($this->name !== '') {
  1438. return false;
  1439. }
  1440. if ($this->system_name !== '') {
  1441. return false;
  1442. }
  1443. if ($this->description !== '') {
  1444. return false;
  1445. }
  1446. if ($this->is_default !== 0) {
  1447. return false;
  1448. }
  1449. if ($this->video_bitrate !== 0) {
  1450. return false;
  1451. }
  1452. if ($this->audio_bitrate !== 0) {
  1453. return false;
  1454. }
  1455. if ($this->audio_channels !== 0) {
  1456. return false;
  1457. }
  1458. if ($this->audio_sample_rate !== 0) {
  1459. return false;
  1460. }
  1461. if ($this->audio_resolution !== 0) {
  1462. return false;
  1463. }
  1464. if ($this->width !== 0) {
  1465. return false;
  1466. }
  1467. if ($this->height !== 0) {
  1468. return false;
  1469. }
  1470. if ($this->frame_rate !== 0) {
  1471. return false;
  1472. }
  1473. if ($this->gop_size !== 0) {
  1474. return false;
  1475. }
  1476. if ($this->two_pass !== false) {
  1477. return false;
  1478. }
  1479. if ($this->creation_mode !== 1) {
  1480. return false;
  1481. }
  1482. if ($this->type !== 0) {
  1483. return false;
  1484. }
  1485. // otherwise, everything was equal, so return TRUE
  1486. return true;
  1487. } // hasOnlyDefaultValues()
  1488. /**
  1489. * Hydrates (populates) the object variables with values from the database resultset.
  1490. *
  1491. * An offset (0-based "start column") is specified so that objects can be hydrated
  1492. * with a subset of the columns in the resultset rows. This is needed, for example,
  1493. * for results of JOIN queries where the resultset row includes columns from two or
  1494. * more tables.
  1495. *
  1496. * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
  1497. * @param int $startcol 0-based offset column which indicates which restultset column to start with.
  1498. * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
  1499. * @return int next starting column
  1500. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
  1501. */
  1502. public function hydrate($row, $startcol = 0, $rehydrate = false)
  1503. {
  1504. try {
  1505. $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
  1506. $this->version = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
  1507. $this->partner_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
  1508. $this->name = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
  1509. $this->system_name = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
  1510. $this->tags = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
  1511. $this->description = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
  1512. $this->ready_behavior = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
  1513. $this->created_at = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
  1514. $this->updated_at = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
  1515. $this->deleted_at = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
  1516. $this->is_default = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
  1517. $this->format = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
  1518. $this->video_codec = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
  1519. $this->video_bitrate = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
  1520. $this->audio_codec = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
  1521. $this->audio_bitrate = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
  1522. $this->audio_channels = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null;
  1523. $this->audio_sample_rate = ($row[$startcol + 18] !== null) ? (int) $row[$startcol + 18] : null;
  1524. $this->audio_resolution = ($row[$startcol + 19] !== null) ? (int) $row[$startcol + 19] : null;
  1525. $this->width = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null;
  1526. $this->height = ($row[$startcol + 21] !== null) ? (int) $row[$startcol + 21] : null;
  1527. $this->frame_rate = ($row[$startcol + 22] !== null) ? (double) $row[$startcol + 22] : null;
  1528. $this->gop_size = ($row[$startcol + 23] !== null) ? (int) $row[$startcol + 23] : null;
  1529. $this->two_pass = ($row[$startcol + 24] !== null) ? (boolean) $row[$startcol + 24] : null;
  1530. $this->conversion_engines = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null;
  1531. $this->conversion_engines_extra_params = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
  1532. $this->custom_data = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
  1533. $this->view_order = ($row[$startcol + 28] !== null) ? (int) $row[$startcol + 28] : null;
  1534. $this->creation_mode = ($row[$startcol + 29] !== null) ? (int) $row[$startcol + 29] : null;
  1535. $this->deinterlice = ($row[$startcol + 30] !== null) ? (int) $row[$startcol + 30] : null;
  1536. $this->rotate = ($row[$startcol + 31] !== null) ? (int) $row[$startcol + 31] : null;
  1537. $this->operators = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
  1538. $this->engine_version = ($row[$startcol + 33] !== null) ? (int) $row[$startcol + 33] : null;
  1539. $this->type = ($row[$startcol + 34] !== null) ? (int) $row[$startcol + 34] : null;
  1540. $this->resetModified();
  1541. $this->setNew(false);
  1542. if ($rehydrate) {
  1543. $this->ensureConsistency();
  1544. }
  1545. // FIXME - using NUM_COLUMNS may be clearer.
  1546. return $startcol + 35; // 35 = assetParamsPeer::NUM_COLUMNS - assetParamsPeer::NUM_LAZY_LOAD_COLUMNS).
  1547. } catch (Exception $e) {
  1548. throw new PropelException("Error populating assetParams object", $e);
  1549. }
  1550. }
  1551. /**
  1552. * Checks and repairs the internal consistency of the object.
  1553. *
  1554. * This method is executed after an already-instantiated object is re-hydrated
  1555. * from the database. It exists to check any foreign keys to make sure that
  1556. * the objects related to the current object are correct based on foreign key.
  1557. *
  1558. * You can override this method in the stub class, but you should always invoke
  1559. * the base method from the overridden method (i.e. parent::ensureConsistency()),
  1560. * in case your model changes.
  1561. *
  1562. * @throws PropelException
  1563. */
  1564. public function ensureConsistency()
  1565. {
  1566. } // ensureConsistency
  1567. /**
  1568. * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  1569. *
  1570. * This will only work if the object has been saved and has a valid primary key set.
  1571. *
  1572. * @param boolean $deep (optional) Whether to also de-associated any related objects.
  1573. * @param PropelPDO $con (optional) The PropelPDO connection to use.
  1574. * @return void
  1575. * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  1576. */
  1577. public function reload($deep = false, PropelPDO $con = null)
  1578. {
  1579. if ($this->isDeleted()) {
  1580. throw new PropelException("Cannot reload a deleted object.");
  1581. }
  1582. if ($this->isNew()) {
  1583. throw new PropelException("Cannot reload an unsaved object.");
  1584. }
  1585. if ($con === null) {
  1586. $con = Propel::getConnection(assetParamsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1587. }
  1588. // We don't need to alter the object instance pool; we're just modifying this instance
  1589. // already in the pool.
  1590. assetParamsPeer::setUseCriteriaFilter(false);
  1591. $stmt = assetParamsPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
  1592. assetParamsPeer::setUseCriteriaFilter(true);
  1593. $row = $stmt->fetch(PDO::FETCH_NUM);
  1594. $stmt->closeCursor();
  1595. if (!$row) {
  1596. throw new PropelException('Cannot find matching row in the database to reload object values.');
  1597. }
  1598. $this->hydrate($row, 0, true); // rehydrate
  1599. if ($deep) { // also de-associate any related objects?
  1600. $this->collassetParamsOutputs = null;
  1601. $this->lastassetParamsOutputCriteria = null;
  1602. $this->collassets = null;
  1603. $this->lastassetCriteria = null;
  1604. $this->collflavorParamsConversionProfiles = null;
  1605. $this->lastflavorParamsConversionProfileCriteria = null;
  1606. } // if (deep)
  1607. }
  1608. /**
  1609. * Removes this object from datastore and sets delete attribute.
  1610. *
  1611. * @param PropelPDO $con
  1612. * @return void
  1613. * @throws PropelException
  1614. * @see BaseObject::setDeleted()
  1615. * @see BaseObject::isDeleted()
  1616. */
  1617. public function delete(PropelPDO $con = null)
  1618. {
  1619. if ($this->isDeleted()) {
  1620. throw new PropelException("This object has already been deleted.");
  1621. }
  1622. if ($con === null) {
  1623. $con = Propel::getConnection(assetParamsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1624. }
  1625. $con->beginTransaction();
  1626. try {
  1627. $ret = $this->preDelete($con);
  1628. if ($ret) {
  1629. assetParamsPeer::doDelete($this, $con);
  1630. $this->postDelete($con);
  1631. $this->setDeleted(true);
  1632. $con->commit();
  1633. } else {
  1634. $con->commit();
  1635. }
  1636. } catch (PropelException $e) {
  1637. $con->rollBack();
  1638. throw $e;
  1639. }
  1640. }
  1641. /**
  1642. * Persists this object to the database.
  1643. *
  1644. * If the object is new, it inserts it; otherwise an update is performed.
  1645. * All modified related objects will also be persisted in the doSave()
  1646. * method. This method wraps all precipitate database operations in a
  1647. * single transaction.
  1648. *
  1649. * @param PropelPDO $con
  1650. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  1651. * @throws PropelException
  1652. * @see doSave()
  1653. */
  1654. public function save(PropelPDO $con = null)
  1655. {
  1656. if ($this->isDeleted()) {
  1657. throw new PropelException("You cannot save an object that has been deleted.");
  1658. }

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