Testing
This commit is contained in:
parent
43e9fb59ce
commit
b00ac6750c
32 changed files with 10218 additions and 358 deletions
|
@ -44,7 +44,8 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
|
|||
->add(new Zend_Acl_Resource('render'))
|
||||
->add(new Zend_Acl_Resource('soundcloud'))
|
||||
->add(new Zend_Acl_Resource('embeddablewidgets'))
|
||||
->add(new Zend_Acl_Resource('setup'));
|
||||
->add(new Zend_Acl_Resource('setup'))
|
||||
->add(new Zend_Acl_Resource('feeds'));
|
||||
|
||||
/** Creating permissions */
|
||||
$ccAcl->allow('G', 'index')
|
||||
|
@ -65,11 +66,11 @@ $ccAcl->allow('G', 'index')
|
|||
->allow('G', 'downgrade')
|
||||
->allow('G', 'rest:show-image', 'get')
|
||||
->allow('G', 'rest:media', 'get')
|
||||
// ->allow('G', 'rest:podcast', 'index')
|
||||
->allow('G', 'rest:podcast', 'get')
|
||||
->allow('G', 'rest:podcast-episodes', 'get')
|
||||
->allow('G', 'setup')
|
||||
->allow('G', 'embeddablewidgets')
|
||||
->allow('G', 'feeds')
|
||||
->allow('H', 'soundcloud')
|
||||
->allow('H', 'rest:show-image')
|
||||
->allow('H', 'rest:media')
|
||||
|
|
|
@ -106,12 +106,18 @@ return array (
|
|||
'BaseCloudFile' => 'airtime/om/BaseCloudFile.php',
|
||||
'BaseCloudFilePeer' => 'airtime/om/BaseCloudFilePeer.php',
|
||||
'BaseCloudFileQuery' => 'airtime/om/BaseCloudFileQuery.php',
|
||||
'BaseImportedPodcast' => 'airtime/om/BaseImportedPodcast.php',
|
||||
'BaseImportedPodcastPeer' => 'airtime/om/BaseImportedPodcastPeer.php',
|
||||
'BaseImportedPodcastQuery' => 'airtime/om/BaseImportedPodcastQuery.php',
|
||||
'BasePodcast' => 'airtime/om/BasePodcast.php',
|
||||
'BasePodcastEpisodes' => 'airtime/om/BasePodcastEpisodes.php',
|
||||
'BasePodcastEpisodesPeer' => 'airtime/om/BasePodcastEpisodesPeer.php',
|
||||
'BasePodcastEpisodesQuery' => 'airtime/om/BasePodcastEpisodesQuery.php',
|
||||
'BasePodcastPeer' => 'airtime/om/BasePodcastPeer.php',
|
||||
'BasePodcastQuery' => 'airtime/om/BasePodcastQuery.php',
|
||||
'BaseStationPodcast' => 'airtime/om/BaseStationPodcast.php',
|
||||
'BaseStationPodcastPeer' => 'airtime/om/BaseStationPodcastPeer.php',
|
||||
'BaseStationPodcastQuery' => 'airtime/om/BaseStationPodcastQuery.php',
|
||||
'BaseThirdPartyTrackReferences' => 'airtime/om/BaseThirdPartyTrackReferences.php',
|
||||
'BaseThirdPartyTrackReferencesPeer' => 'airtime/om/BaseThirdPartyTrackReferencesPeer.php',
|
||||
'BaseThirdPartyTrackReferencesQuery' => 'airtime/om/BaseThirdPartyTrackReferencesQuery.php',
|
||||
|
@ -255,6 +261,10 @@ return array (
|
|||
'CloudFilePeer' => 'airtime/CloudFilePeer.php',
|
||||
'CloudFileQuery' => 'airtime/CloudFileQuery.php',
|
||||
'CloudFileTableMap' => 'airtime/map/CloudFileTableMap.php',
|
||||
'ImportedPodcast' => 'airtime/ImportedPodcast.php',
|
||||
'ImportedPodcastPeer' => 'airtime/ImportedPodcastPeer.php',
|
||||
'ImportedPodcastQuery' => 'airtime/ImportedPodcastQuery.php',
|
||||
'ImportedPodcastTableMap' => 'airtime/map/ImportedPodcastTableMap.php',
|
||||
'Podcast' => 'airtime/Podcast.php',
|
||||
'PodcastEpisodes' => 'airtime/PodcastEpisodes.php',
|
||||
'PodcastEpisodesPeer' => 'airtime/PodcastEpisodesPeer.php',
|
||||
|
@ -263,6 +273,10 @@ return array (
|
|||
'PodcastPeer' => 'airtime/PodcastPeer.php',
|
||||
'PodcastQuery' => 'airtime/PodcastQuery.php',
|
||||
'PodcastTableMap' => 'airtime/map/PodcastTableMap.php',
|
||||
'StationPodcast' => 'airtime/StationPodcast.php',
|
||||
'StationPodcastPeer' => 'airtime/StationPodcastPeer.php',
|
||||
'StationPodcastQuery' => 'airtime/StationPodcastQuery.php',
|
||||
'StationPodcastTableMap' => 'airtime/map/StationPodcastTableMap.php',
|
||||
'ThirdPartyTrackReferences' => 'airtime/ThirdPartyTrackReferences.php',
|
||||
'ThirdPartyTrackReferencesPeer' => 'airtime/ThirdPartyTrackReferencesPeer.php',
|
||||
'ThirdPartyTrackReferencesQuery' => 'airtime/ThirdPartyTrackReferencesQuery.php',
|
||||
|
|
|
@ -124,5 +124,7 @@ define('SOUNDCLOUD_SERVICE_NAME', 'soundcloud');
|
|||
define('PODCAST_SERVICE_NAME', 'podcast');
|
||||
|
||||
// Podcast Types
|
||||
define('STATION_PODCAST', 0);
|
||||
define('IMPORTED_PODCAST', 1);
|
||||
//define('STATION_PODCAST', 0);
|
||||
//define('IMPORTED_PODCAST', 1);
|
||||
|
||||
define('ITUNES_XML_NAMESPACE_URL', 'http://www.itunes.com/dtds/podcast-1.0.dtd');
|
||||
|
|
14
airtime_mvc/application/controllers/FeedsController.php
Normal file
14
airtime_mvc/application/controllers/FeedsController.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
class FeedsController extends Zend_Controller_Action
|
||||
{
|
||||
public function stationRssAction()
|
||||
{
|
||||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
header('Content-Type: text/xml');
|
||||
|
||||
echo Application_Service_PodcastService::createStationRssFeed();
|
||||
}
|
||||
}
|
|
@ -119,7 +119,8 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
"upgrade",
|
||||
'whmcs-login',
|
||||
"provisioning",
|
||||
"embed"
|
||||
"embed",
|
||||
"feeds"
|
||||
)))
|
||||
{
|
||||
$this->setRoleName("G");
|
||||
|
|
18
airtime_mvc/application/models/airtime/ImportedPodcast.php
Normal file
18
airtime_mvc/application/models/airtime/ImportedPodcast.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'imported_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class ImportedPodcast extends BaseImportedPodcast
|
||||
{
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'imported_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class ImportedPodcastPeer extends BaseImportedPodcastPeer
|
||||
{
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'imported_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class ImportedPodcastQuery extends BaseImportedPodcastQuery
|
||||
{
|
||||
}
|
18
airtime_mvc/application/models/airtime/StationPodcast.php
Normal file
18
airtime_mvc/application/models/airtime/StationPodcast.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'station_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class StationPodcast extends BaseStationPodcast
|
||||
{
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'station_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class StationPodcastPeer extends BaseStationPodcastPeer
|
||||
{
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'station_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class StationPodcastQuery extends BaseStationPodcastQuery
|
||||
{
|
||||
}
|
|
@ -70,6 +70,8 @@ class CcSubjsTableMap extends TableMap
|
|||
$this->addRelation('CcSess', 'CcSess', RelationMap::ONE_TO_MANY, array('id' => 'userid', ), 'CASCADE', null, 'CcSesss');
|
||||
$this->addRelation('CcSubjsToken', 'CcSubjsToken', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'CcSubjsTokens');
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), 'CASCADE', null, 'Podcasts');
|
||||
$this->addRelation('StationPodcast', 'StationPodcast', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), 'CASCADE', null, 'StationPodcasts');
|
||||
$this->addRelation('ImportedPodcast', 'ImportedPodcast', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), 'CASCADE', null, 'ImportedPodcasts');
|
||||
} // buildRelations()
|
||||
|
||||
} // CcSubjsTableMap
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'imported_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class ImportedPodcastTableMap extends TableMap
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.ImportedPodcastTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('imported_podcast');
|
||||
$this->setPhpName('ImportedPodcast');
|
||||
$this->setClassname('ImportedPodcast');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addColumn('url', 'DbUrl', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('auto_ingest', 'DbAutoIngest', 'BOOLEAN', true, null, false);
|
||||
$this->addForeignPrimaryKey('id', 'DbId', 'INTEGER' , 'podcast', 'id', true, null, null);
|
||||
$this->addColumn('title', 'DbTitle', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('creator', 'DbCreator', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('copyright', 'DbCopyright', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('link', 'DbLink', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_author', 'DbItunesAuthor', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_keywords', 'DbItunesKeywords', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_summary', 'DbItunesSummary', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_subtitle', 'DbItunesSubtitle', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_category', 'DbItunesCategory', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_explicit', 'DbItunesExplicit', 'VARCHAR', false, 4096, null);
|
||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'concrete_inheritance' => array (
|
||||
'extends' => 'podcast',
|
||||
'descendant_column' => 'descendant_class',
|
||||
'copy_data_to_parent' => 'true',
|
||||
'schema' => '',
|
||||
'excluded_parent_behavior' => 'nested_set',
|
||||
),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // ImportedPodcastTableMap
|
|
@ -40,21 +40,20 @@ class PodcastTableMap extends TableMap
|
|||
$this->setPrimaryKeyMethodInfo('podcast_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('url', 'DbUrl', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('title', 'DbTitle', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('creator', 'DbCreator', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('copyright', 'DbCopyright', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('link', 'DbLink', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_author', 'DbItunesAuthor', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_keywords', 'DbItunesKeywords', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_summary', 'DbItunesSummary', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_subtitle', 'DbItunesSubtitle', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_category', 'DbItunesCategory', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_explicit', 'DbItunesExplicit', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('auto_ingest', 'DbAutoIngest', 'BOOLEAN', true, null, false);
|
||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||
$this->addColumn('type', 'DbType', 'INTEGER', true, null, 1);
|
||||
$this->addColumn('descendant_class', 'DescendantClass', 'VARCHAR', false, 100, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -65,6 +64,23 @@ class PodcastTableMap extends TableMap
|
|||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('PodcastEpisodes', 'PodcastEpisodes', RelationMap::ONE_TO_MANY, array('id' => 'podcast_id', ), 'CASCADE', null, 'PodcastEpisodess');
|
||||
$this->addRelation('StationPodcast', 'StationPodcast', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('ImportedPodcast', 'ImportedPodcast', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'concrete_inheritance_parent' => array (
|
||||
'descendant_column' => 'descendant_class',
|
||||
),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // PodcastTableMap
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'station_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class StationPodcastTableMap extends TableMap
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.StationPodcastTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('station_podcast');
|
||||
$this->setPhpName('StationPodcast');
|
||||
$this->setClassname('StationPodcast');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addForeignPrimaryKey('id', 'DbId', 'INTEGER' , 'podcast', 'id', true, null, null);
|
||||
$this->addColumn('title', 'DbTitle', 'VARCHAR', true, 4096, null);
|
||||
$this->addColumn('creator', 'DbCreator', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('copyright', 'DbCopyright', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('link', 'DbLink', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_author', 'DbItunesAuthor', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_keywords', 'DbItunesKeywords', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_summary', 'DbItunesSummary', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_subtitle', 'DbItunesSubtitle', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_category', 'DbItunesCategory', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('itunes_explicit', 'DbItunesExplicit', 'VARCHAR', false, 4096, null);
|
||||
$this->addForeignKey('owner', 'DbOwner', 'INTEGER', 'cc_subjs', 'id', false, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'concrete_inheritance' => array (
|
||||
'extends' => 'podcast',
|
||||
'descendant_column' => 'descendant_class',
|
||||
'copy_data_to_parent' => 'true',
|
||||
'schema' => '',
|
||||
'excluded_parent_behavior' => 'nested_set',
|
||||
),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // StationPodcastTableMap
|
|
@ -173,6 +173,18 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
protected $collPodcasts;
|
||||
protected $collPodcastsPartial;
|
||||
|
||||
/**
|
||||
* @var PropelObjectCollection|StationPodcast[] Collection to store aggregation of StationPodcast objects.
|
||||
*/
|
||||
protected $collStationPodcasts;
|
||||
protected $collStationPodcastsPartial;
|
||||
|
||||
/**
|
||||
* @var PropelObjectCollection|ImportedPodcast[] Collection to store aggregation of ImportedPodcast objects.
|
||||
*/
|
||||
protected $collImportedPodcasts;
|
||||
protected $collImportedPodcastsPartial;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -253,6 +265,18 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $podcastsScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var PropelObjectCollection
|
||||
*/
|
||||
protected $stationPodcastsScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var PropelObjectCollection
|
||||
*/
|
||||
protected $importedPodcastsScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* Applies default values to this object.
|
||||
* This method should be called from the object's constructor (or
|
||||
|
@ -907,6 +931,10 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
|
||||
$this->collPodcasts = null;
|
||||
|
||||
$this->collStationPodcasts = null;
|
||||
|
||||
$this->collImportedPodcasts = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -1203,6 +1231,40 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->stationPodcastsScheduledForDeletion !== null) {
|
||||
if (!$this->stationPodcastsScheduledForDeletion->isEmpty()) {
|
||||
StationPodcastQuery::create()
|
||||
->filterByPrimaryKeys($this->stationPodcastsScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->stationPodcastsScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collStationPodcasts !== null) {
|
||||
foreach ($this->collStationPodcasts as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->importedPodcastsScheduledForDeletion !== null) {
|
||||
if (!$this->importedPodcastsScheduledForDeletion->isEmpty()) {
|
||||
ImportedPodcastQuery::create()
|
||||
->filterByPrimaryKeys($this->importedPodcastsScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->importedPodcastsScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collImportedPodcasts !== null) {
|
||||
foreach ($this->collImportedPodcasts as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
}
|
||||
|
@ -1500,6 +1562,22 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->collStationPodcasts !== null) {
|
||||
foreach ($this->collStationPodcasts as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collImportedPodcasts !== null) {
|
||||
foreach ($this->collImportedPodcasts as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->alreadyInValidation = false;
|
||||
}
|
||||
|
@ -1653,6 +1731,12 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
if (null !== $this->collPodcasts) {
|
||||
$result['Podcasts'] = $this->collPodcasts->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->collStationPodcasts) {
|
||||
$result['StationPodcasts'] = $this->collStationPodcasts->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->collImportedPodcasts) {
|
||||
$result['ImportedPodcasts'] = $this->collImportedPodcasts->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -1930,6 +2014,18 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($this->getStationPodcasts() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addStationPodcast($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->getImportedPodcasts() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addImportedPodcast($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
//unflag object copy
|
||||
$this->startCopy = false;
|
||||
} // if ($deepCopy)
|
||||
|
@ -2021,6 +2117,12 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
if ('Podcast' == $relationName) {
|
||||
$this->initPodcasts();
|
||||
}
|
||||
if ('StationPodcast' == $relationName) {
|
||||
$this->initStationPodcasts();
|
||||
}
|
||||
if ('ImportedPodcast' == $relationName) {
|
||||
$this->initImportedPodcasts();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4348,6 +4450,506 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collStationPodcasts collection
|
||||
*
|
||||
* This does not modify the database; however, it will remove any associated objects, causing
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
* @see addStationPodcasts()
|
||||
*/
|
||||
public function clearStationPodcasts()
|
||||
{
|
||||
$this->collStationPodcasts = null; // important to set this to null since that means it is uninitialized
|
||||
$this->collStationPodcastsPartial = null;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* reset is the collStationPodcasts collection loaded partially
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function resetPartialStationPodcasts($v = true)
|
||||
{
|
||||
$this->collStationPodcastsPartial = $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collStationPodcasts collection.
|
||||
*
|
||||
* By default this just sets the collStationPodcasts collection to an empty array (like clearcollStationPodcasts());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||
* the collection even if it is not empty
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initStationPodcasts($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collStationPodcasts && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collStationPodcasts = new PropelObjectCollection();
|
||||
$this->collStationPodcasts->setModel('StationPodcast');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of StationPodcast objects which contain a foreign key that references this object.
|
||||
*
|
||||
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||
* Otherwise the results are fetched from the database the first time, then cached.
|
||||
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||
* If this CcSubjs is new, it will return
|
||||
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @return PropelObjectCollection|StationPodcast[] List of StationPodcast objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getStationPodcasts($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
$partial = $this->collStationPodcastsPartial && !$this->isNew();
|
||||
if (null === $this->collStationPodcasts || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collStationPodcasts) {
|
||||
// return empty collection
|
||||
$this->initStationPodcasts();
|
||||
} else {
|
||||
$collStationPodcasts = StationPodcastQuery::create(null, $criteria)
|
||||
->filterByCcSubjs($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collStationPodcastsPartial && count($collStationPodcasts)) {
|
||||
$this->initStationPodcasts(false);
|
||||
|
||||
foreach ($collStationPodcasts as $obj) {
|
||||
if (false == $this->collStationPodcasts->contains($obj)) {
|
||||
$this->collStationPodcasts->append($obj);
|
||||
}
|
||||
}
|
||||
|
||||
$this->collStationPodcastsPartial = true;
|
||||
}
|
||||
|
||||
$collStationPodcasts->getInternalIterator()->rewind();
|
||||
|
||||
return $collStationPodcasts;
|
||||
}
|
||||
|
||||
if ($partial && $this->collStationPodcasts) {
|
||||
foreach ($this->collStationPodcasts as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collStationPodcasts[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collStationPodcasts = $collStationPodcasts;
|
||||
$this->collStationPodcastsPartial = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->collStationPodcasts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a collection of StationPodcast objects related by a one-to-many relationship
|
||||
* to the current object.
|
||||
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||
* and new objects from the given Propel collection.
|
||||
*
|
||||
* @param PropelCollection $stationPodcasts A Propel collection.
|
||||
* @param PropelPDO $con Optional connection object
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
*/
|
||||
public function setStationPodcasts(PropelCollection $stationPodcasts, PropelPDO $con = null)
|
||||
{
|
||||
$stationPodcastsToDelete = $this->getStationPodcasts(new Criteria(), $con)->diff($stationPodcasts);
|
||||
|
||||
|
||||
$this->stationPodcastsScheduledForDeletion = $stationPodcastsToDelete;
|
||||
|
||||
foreach ($stationPodcastsToDelete as $stationPodcastRemoved) {
|
||||
$stationPodcastRemoved->setCcSubjs(null);
|
||||
}
|
||||
|
||||
$this->collStationPodcasts = null;
|
||||
foreach ($stationPodcasts as $stationPodcast) {
|
||||
$this->addStationPodcast($stationPodcast);
|
||||
}
|
||||
|
||||
$this->collStationPodcasts = $stationPodcasts;
|
||||
$this->collStationPodcastsPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related StationPodcast objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param PropelPDO $con
|
||||
* @return int Count of related StationPodcast objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countStationPodcasts(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
$partial = $this->collStationPodcastsPartial && !$this->isNew();
|
||||
if (null === $this->collStationPodcasts || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collStationPodcasts) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getStationPodcasts());
|
||||
}
|
||||
$query = StationPodcastQuery::create(null, $criteria);
|
||||
if ($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByCcSubjs($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collStationPodcasts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a StationPodcast object to this object
|
||||
* through the StationPodcast foreign key attribute.
|
||||
*
|
||||
* @param StationPodcast $l StationPodcast
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
*/
|
||||
public function addStationPodcast(StationPodcast $l)
|
||||
{
|
||||
if ($this->collStationPodcasts === null) {
|
||||
$this->initStationPodcasts();
|
||||
$this->collStationPodcastsPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collStationPodcasts->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddStationPodcast($l);
|
||||
|
||||
if ($this->stationPodcastsScheduledForDeletion and $this->stationPodcastsScheduledForDeletion->contains($l)) {
|
||||
$this->stationPodcastsScheduledForDeletion->remove($this->stationPodcastsScheduledForDeletion->search($l));
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param StationPodcast $stationPodcast The stationPodcast object to add.
|
||||
*/
|
||||
protected function doAddStationPodcast($stationPodcast)
|
||||
{
|
||||
$this->collStationPodcasts[]= $stationPodcast;
|
||||
$stationPodcast->setCcSubjs($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param StationPodcast $stationPodcast The stationPodcast object to remove.
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
*/
|
||||
public function removeStationPodcast($stationPodcast)
|
||||
{
|
||||
if ($this->getStationPodcasts()->contains($stationPodcast)) {
|
||||
$this->collStationPodcasts->remove($this->collStationPodcasts->search($stationPodcast));
|
||||
if (null === $this->stationPodcastsScheduledForDeletion) {
|
||||
$this->stationPodcastsScheduledForDeletion = clone $this->collStationPodcasts;
|
||||
$this->stationPodcastsScheduledForDeletion->clear();
|
||||
}
|
||||
$this->stationPodcastsScheduledForDeletion[]= $stationPodcast;
|
||||
$stationPodcast->setCcSubjs(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcSubjs is new, it will return
|
||||
* an empty collection; or if this CcSubjs has previously
|
||||
* been saved, it will retrieve related StationPodcasts from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in CcSubjs.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return PropelObjectCollection|StationPodcast[] List of StationPodcast objects
|
||||
*/
|
||||
public function getStationPodcastsJoinPodcast($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = StationPodcastQuery::create(null, $criteria);
|
||||
$query->joinWith('Podcast', $join_behavior);
|
||||
|
||||
return $this->getStationPodcasts($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collImportedPodcasts collection
|
||||
*
|
||||
* This does not modify the database; however, it will remove any associated objects, causing
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
* @see addImportedPodcasts()
|
||||
*/
|
||||
public function clearImportedPodcasts()
|
||||
{
|
||||
$this->collImportedPodcasts = null; // important to set this to null since that means it is uninitialized
|
||||
$this->collImportedPodcastsPartial = null;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* reset is the collImportedPodcasts collection loaded partially
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function resetPartialImportedPodcasts($v = true)
|
||||
{
|
||||
$this->collImportedPodcastsPartial = $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collImportedPodcasts collection.
|
||||
*
|
||||
* By default this just sets the collImportedPodcasts collection to an empty array (like clearcollImportedPodcasts());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||
* the collection even if it is not empty
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initImportedPodcasts($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collImportedPodcasts && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collImportedPodcasts = new PropelObjectCollection();
|
||||
$this->collImportedPodcasts->setModel('ImportedPodcast');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of ImportedPodcast objects which contain a foreign key that references this object.
|
||||
*
|
||||
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||
* Otherwise the results are fetched from the database the first time, then cached.
|
||||
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||
* If this CcSubjs is new, it will return
|
||||
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @return PropelObjectCollection|ImportedPodcast[] List of ImportedPodcast objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getImportedPodcasts($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
$partial = $this->collImportedPodcastsPartial && !$this->isNew();
|
||||
if (null === $this->collImportedPodcasts || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collImportedPodcasts) {
|
||||
// return empty collection
|
||||
$this->initImportedPodcasts();
|
||||
} else {
|
||||
$collImportedPodcasts = ImportedPodcastQuery::create(null, $criteria)
|
||||
->filterByCcSubjs($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collImportedPodcastsPartial && count($collImportedPodcasts)) {
|
||||
$this->initImportedPodcasts(false);
|
||||
|
||||
foreach ($collImportedPodcasts as $obj) {
|
||||
if (false == $this->collImportedPodcasts->contains($obj)) {
|
||||
$this->collImportedPodcasts->append($obj);
|
||||
}
|
||||
}
|
||||
|
||||
$this->collImportedPodcastsPartial = true;
|
||||
}
|
||||
|
||||
$collImportedPodcasts->getInternalIterator()->rewind();
|
||||
|
||||
return $collImportedPodcasts;
|
||||
}
|
||||
|
||||
if ($partial && $this->collImportedPodcasts) {
|
||||
foreach ($this->collImportedPodcasts as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collImportedPodcasts[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collImportedPodcasts = $collImportedPodcasts;
|
||||
$this->collImportedPodcastsPartial = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->collImportedPodcasts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a collection of ImportedPodcast objects related by a one-to-many relationship
|
||||
* to the current object.
|
||||
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||
* and new objects from the given Propel collection.
|
||||
*
|
||||
* @param PropelCollection $importedPodcasts A Propel collection.
|
||||
* @param PropelPDO $con Optional connection object
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
*/
|
||||
public function setImportedPodcasts(PropelCollection $importedPodcasts, PropelPDO $con = null)
|
||||
{
|
||||
$importedPodcastsToDelete = $this->getImportedPodcasts(new Criteria(), $con)->diff($importedPodcasts);
|
||||
|
||||
|
||||
$this->importedPodcastsScheduledForDeletion = $importedPodcastsToDelete;
|
||||
|
||||
foreach ($importedPodcastsToDelete as $importedPodcastRemoved) {
|
||||
$importedPodcastRemoved->setCcSubjs(null);
|
||||
}
|
||||
|
||||
$this->collImportedPodcasts = null;
|
||||
foreach ($importedPodcasts as $importedPodcast) {
|
||||
$this->addImportedPodcast($importedPodcast);
|
||||
}
|
||||
|
||||
$this->collImportedPodcasts = $importedPodcasts;
|
||||
$this->collImportedPodcastsPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related ImportedPodcast objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param PropelPDO $con
|
||||
* @return int Count of related ImportedPodcast objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countImportedPodcasts(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
$partial = $this->collImportedPodcastsPartial && !$this->isNew();
|
||||
if (null === $this->collImportedPodcasts || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collImportedPodcasts) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getImportedPodcasts());
|
||||
}
|
||||
$query = ImportedPodcastQuery::create(null, $criteria);
|
||||
if ($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByCcSubjs($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collImportedPodcasts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a ImportedPodcast object to this object
|
||||
* through the ImportedPodcast foreign key attribute.
|
||||
*
|
||||
* @param ImportedPodcast $l ImportedPodcast
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
*/
|
||||
public function addImportedPodcast(ImportedPodcast $l)
|
||||
{
|
||||
if ($this->collImportedPodcasts === null) {
|
||||
$this->initImportedPodcasts();
|
||||
$this->collImportedPodcastsPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collImportedPodcasts->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddImportedPodcast($l);
|
||||
|
||||
if ($this->importedPodcastsScheduledForDeletion and $this->importedPodcastsScheduledForDeletion->contains($l)) {
|
||||
$this->importedPodcastsScheduledForDeletion->remove($this->importedPodcastsScheduledForDeletion->search($l));
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ImportedPodcast $importedPodcast The importedPodcast object to add.
|
||||
*/
|
||||
protected function doAddImportedPodcast($importedPodcast)
|
||||
{
|
||||
$this->collImportedPodcasts[]= $importedPodcast;
|
||||
$importedPodcast->setCcSubjs($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ImportedPodcast $importedPodcast The importedPodcast object to remove.
|
||||
* @return CcSubjs The current object (for fluent API support)
|
||||
*/
|
||||
public function removeImportedPodcast($importedPodcast)
|
||||
{
|
||||
if ($this->getImportedPodcasts()->contains($importedPodcast)) {
|
||||
$this->collImportedPodcasts->remove($this->collImportedPodcasts->search($importedPodcast));
|
||||
if (null === $this->importedPodcastsScheduledForDeletion) {
|
||||
$this->importedPodcastsScheduledForDeletion = clone $this->collImportedPodcasts;
|
||||
$this->importedPodcastsScheduledForDeletion->clear();
|
||||
}
|
||||
$this->importedPodcastsScheduledForDeletion[]= $importedPodcast;
|
||||
$importedPodcast->setCcSubjs(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcSubjs is new, it will return
|
||||
* an empty collection; or if this CcSubjs has previously
|
||||
* been saved, it will retrieve related ImportedPodcasts from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in CcSubjs.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return PropelObjectCollection|ImportedPodcast[] List of ImportedPodcast objects
|
||||
*/
|
||||
public function getImportedPodcastsJoinPodcast($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = ImportedPodcastQuery::create(null, $criteria);
|
||||
$query->joinWith('Podcast', $join_behavior);
|
||||
|
||||
return $this->getImportedPodcasts($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
@ -4439,6 +5041,16 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collStationPodcasts) {
|
||||
foreach ($this->collStationPodcasts as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collImportedPodcasts) {
|
||||
foreach ($this->collImportedPodcasts as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
|
||||
$this->alreadyInClearAllReferencesDeep = false;
|
||||
} // if ($deep)
|
||||
|
@ -4483,6 +5095,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
$this->collPodcasts->clearIterator();
|
||||
}
|
||||
$this->collPodcasts = null;
|
||||
if ($this->collStationPodcasts instanceof PropelCollection) {
|
||||
$this->collStationPodcasts->clearIterator();
|
||||
}
|
||||
$this->collStationPodcasts = null;
|
||||
if ($this->collImportedPodcasts instanceof PropelCollection) {
|
||||
$this->collImportedPodcasts->clearIterator();
|
||||
}
|
||||
$this->collImportedPodcasts = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -439,6 +439,12 @@ abstract class BaseCcSubjsPeer
|
|||
// Invalidate objects in PodcastPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
PodcastPeer::clearInstancePool();
|
||||
// Invalidate objects in StationPodcastPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
StationPodcastPeer::clearInstancePool();
|
||||
// Invalidate objects in ImportedPodcastPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
ImportedPodcastPeer::clearInstancePool();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -78,6 +78,14 @@
|
|||
* @method CcSubjsQuery rightJoinPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Podcast relation
|
||||
* @method CcSubjsQuery innerJoinPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the Podcast relation
|
||||
*
|
||||
* @method CcSubjsQuery leftJoinStationPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the StationPodcast relation
|
||||
* @method CcSubjsQuery rightJoinStationPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the StationPodcast relation
|
||||
* @method CcSubjsQuery innerJoinStationPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the StationPodcast relation
|
||||
*
|
||||
* @method CcSubjsQuery leftJoinImportedPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportedPodcast relation
|
||||
* @method CcSubjsQuery rightJoinImportedPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportedPodcast relation
|
||||
* @method CcSubjsQuery innerJoinImportedPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportedPodcast relation
|
||||
*
|
||||
* @method CcSubjs findOne(PropelPDO $con = null) Return the first CcSubjs matching the query
|
||||
* @method CcSubjs findOneOrCreate(PropelPDO $con = null) Return the first CcSubjs matching the query, or a new CcSubjs object populated from the query conditions when no match is found
|
||||
*
|
||||
|
@ -1474,6 +1482,154 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'Podcast', 'PodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related StationPodcast object
|
||||
*
|
||||
* @param StationPodcast|PropelObjectCollection $stationPodcast the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByStationPodcast($stationPodcast, $comparison = null)
|
||||
{
|
||||
if ($stationPodcast instanceof StationPodcast) {
|
||||
return $this
|
||||
->addUsingAlias(CcSubjsPeer::ID, $stationPodcast->getDbOwner(), $comparison);
|
||||
} elseif ($stationPodcast instanceof PropelObjectCollection) {
|
||||
return $this
|
||||
->useStationPodcastQuery()
|
||||
->filterByPrimaryKeys($stationPodcast->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByStationPodcast() only accepts arguments of type StationPodcast or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the StationPodcast relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinStationPodcast($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('StationPodcast');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'StationPodcast');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the StationPodcast relation StationPodcast object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return StationPodcastQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useStationPodcastQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinStationPodcast($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'StationPodcast', 'StationPodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related ImportedPodcast object
|
||||
*
|
||||
* @param ImportedPodcast|PropelObjectCollection $importedPodcast the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByImportedPodcast($importedPodcast, $comparison = null)
|
||||
{
|
||||
if ($importedPodcast instanceof ImportedPodcast) {
|
||||
return $this
|
||||
->addUsingAlias(CcSubjsPeer::ID, $importedPodcast->getDbOwner(), $comparison);
|
||||
} elseif ($importedPodcast instanceof PropelObjectCollection) {
|
||||
return $this
|
||||
->useImportedPodcastQuery()
|
||||
->filterByPrimaryKeys($importedPodcast->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByImportedPodcast() only accepts arguments of type ImportedPodcast or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportedPodcast relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportedPodcast($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportedPodcast');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportedPodcast');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportedPodcast relation ImportedPodcast object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ImportedPodcastQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportedPodcastQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinImportedPodcast($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportedPodcast', 'ImportedPodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
1898
airtime_mvc/application/models/airtime/om/BaseImportedPodcast.php
Normal file
1898
airtime_mvc/application/models/airtime/om/BaseImportedPodcast.php
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,946 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'imported_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ImportedPodcastQuery orderByDbUrl($order = Criteria::ASC) Order by the url column
|
||||
* @method ImportedPodcastQuery orderByDbAutoIngest($order = Criteria::ASC) Order by the auto_ingest column
|
||||
* @method ImportedPodcastQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method ImportedPodcastQuery orderByDbTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ImportedPodcastQuery orderByDbCreator($order = Criteria::ASC) Order by the creator column
|
||||
* @method ImportedPodcastQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ImportedPodcastQuery orderByDbLanguage($order = Criteria::ASC) Order by the language column
|
||||
* @method ImportedPodcastQuery orderByDbCopyright($order = Criteria::ASC) Order by the copyright column
|
||||
* @method ImportedPodcastQuery orderByDbLink($order = Criteria::ASC) Order by the link column
|
||||
* @method ImportedPodcastQuery orderByDbItunesAuthor($order = Criteria::ASC) Order by the itunes_author column
|
||||
* @method ImportedPodcastQuery orderByDbItunesKeywords($order = Criteria::ASC) Order by the itunes_keywords column
|
||||
* @method ImportedPodcastQuery orderByDbItunesSummary($order = Criteria::ASC) Order by the itunes_summary column
|
||||
* @method ImportedPodcastQuery orderByDbItunesSubtitle($order = Criteria::ASC) Order by the itunes_subtitle column
|
||||
* @method ImportedPodcastQuery orderByDbItunesCategory($order = Criteria::ASC) Order by the itunes_category column
|
||||
* @method ImportedPodcastQuery orderByDbItunesExplicit($order = Criteria::ASC) Order by the itunes_explicit column
|
||||
* @method ImportedPodcastQuery orderByDbOwner($order = Criteria::ASC) Order by the owner column
|
||||
*
|
||||
* @method ImportedPodcastQuery groupByDbUrl() Group by the url column
|
||||
* @method ImportedPodcastQuery groupByDbAutoIngest() Group by the auto_ingest column
|
||||
* @method ImportedPodcastQuery groupByDbId() Group by the id column
|
||||
* @method ImportedPodcastQuery groupByDbTitle() Group by the title column
|
||||
* @method ImportedPodcastQuery groupByDbCreator() Group by the creator column
|
||||
* @method ImportedPodcastQuery groupByDbDescription() Group by the description column
|
||||
* @method ImportedPodcastQuery groupByDbLanguage() Group by the language column
|
||||
* @method ImportedPodcastQuery groupByDbCopyright() Group by the copyright column
|
||||
* @method ImportedPodcastQuery groupByDbLink() Group by the link column
|
||||
* @method ImportedPodcastQuery groupByDbItunesAuthor() Group by the itunes_author column
|
||||
* @method ImportedPodcastQuery groupByDbItunesKeywords() Group by the itunes_keywords column
|
||||
* @method ImportedPodcastQuery groupByDbItunesSummary() Group by the itunes_summary column
|
||||
* @method ImportedPodcastQuery groupByDbItunesSubtitle() Group by the itunes_subtitle column
|
||||
* @method ImportedPodcastQuery groupByDbItunesCategory() Group by the itunes_category column
|
||||
* @method ImportedPodcastQuery groupByDbItunesExplicit() Group by the itunes_explicit column
|
||||
* @method ImportedPodcastQuery groupByDbOwner() Group by the owner column
|
||||
*
|
||||
* @method ImportedPodcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ImportedPodcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ImportedPodcastQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ImportedPodcastQuery leftJoinPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the Podcast relation
|
||||
* @method ImportedPodcastQuery rightJoinPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Podcast relation
|
||||
* @method ImportedPodcastQuery innerJoinPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the Podcast relation
|
||||
*
|
||||
* @method ImportedPodcastQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
|
||||
* @method ImportedPodcastQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
|
||||
* @method ImportedPodcastQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
|
||||
*
|
||||
* @method ImportedPodcast findOne(PropelPDO $con = null) Return the first ImportedPodcast matching the query
|
||||
* @method ImportedPodcast findOneOrCreate(PropelPDO $con = null) Return the first ImportedPodcast matching the query, or a new ImportedPodcast object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ImportedPodcast findOneByDbUrl(string $url) Return the first ImportedPodcast filtered by the url column
|
||||
* @method ImportedPodcast findOneByDbAutoIngest(boolean $auto_ingest) Return the first ImportedPodcast filtered by the auto_ingest column
|
||||
* @method ImportedPodcast findOneByDbTitle(string $title) Return the first ImportedPodcast filtered by the title column
|
||||
* @method ImportedPodcast findOneByDbCreator(string $creator) Return the first ImportedPodcast filtered by the creator column
|
||||
* @method ImportedPodcast findOneByDbDescription(string $description) Return the first ImportedPodcast filtered by the description column
|
||||
* @method ImportedPodcast findOneByDbLanguage(string $language) Return the first ImportedPodcast filtered by the language column
|
||||
* @method ImportedPodcast findOneByDbCopyright(string $copyright) Return the first ImportedPodcast filtered by the copyright column
|
||||
* @method ImportedPodcast findOneByDbLink(string $link) Return the first ImportedPodcast filtered by the link column
|
||||
* @method ImportedPodcast findOneByDbItunesAuthor(string $itunes_author) Return the first ImportedPodcast filtered by the itunes_author column
|
||||
* @method ImportedPodcast findOneByDbItunesKeywords(string $itunes_keywords) Return the first ImportedPodcast filtered by the itunes_keywords column
|
||||
* @method ImportedPodcast findOneByDbItunesSummary(string $itunes_summary) Return the first ImportedPodcast filtered by the itunes_summary column
|
||||
* @method ImportedPodcast findOneByDbItunesSubtitle(string $itunes_subtitle) Return the first ImportedPodcast filtered by the itunes_subtitle column
|
||||
* @method ImportedPodcast findOneByDbItunesCategory(string $itunes_category) Return the first ImportedPodcast filtered by the itunes_category column
|
||||
* @method ImportedPodcast findOneByDbItunesExplicit(string $itunes_explicit) Return the first ImportedPodcast filtered by the itunes_explicit column
|
||||
* @method ImportedPodcast findOneByDbOwner(int $owner) Return the first ImportedPodcast filtered by the owner column
|
||||
*
|
||||
* @method array findByDbUrl(string $url) Return ImportedPodcast objects filtered by the url column
|
||||
* @method array findByDbAutoIngest(boolean $auto_ingest) Return ImportedPodcast objects filtered by the auto_ingest column
|
||||
* @method array findByDbId(int $id) Return ImportedPodcast objects filtered by the id column
|
||||
* @method array findByDbTitle(string $title) Return ImportedPodcast objects filtered by the title column
|
||||
* @method array findByDbCreator(string $creator) Return ImportedPodcast objects filtered by the creator column
|
||||
* @method array findByDbDescription(string $description) Return ImportedPodcast objects filtered by the description column
|
||||
* @method array findByDbLanguage(string $language) Return ImportedPodcast objects filtered by the language column
|
||||
* @method array findByDbCopyright(string $copyright) Return ImportedPodcast objects filtered by the copyright column
|
||||
* @method array findByDbLink(string $link) Return ImportedPodcast objects filtered by the link column
|
||||
* @method array findByDbItunesAuthor(string $itunes_author) Return ImportedPodcast objects filtered by the itunes_author column
|
||||
* @method array findByDbItunesKeywords(string $itunes_keywords) Return ImportedPodcast objects filtered by the itunes_keywords column
|
||||
* @method array findByDbItunesSummary(string $itunes_summary) Return ImportedPodcast objects filtered by the itunes_summary column
|
||||
* @method array findByDbItunesSubtitle(string $itunes_subtitle) Return ImportedPodcast objects filtered by the itunes_subtitle column
|
||||
* @method array findByDbItunesCategory(string $itunes_category) Return ImportedPodcast objects filtered by the itunes_category column
|
||||
* @method array findByDbItunesExplicit(string $itunes_explicit) Return ImportedPodcast objects filtered by the itunes_explicit column
|
||||
* @method array findByDbOwner(int $owner) Return ImportedPodcast objects filtered by the owner column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
abstract class BaseImportedPodcastQuery extends PodcastQuery
|
||||
{
|
||||
/**
|
||||
* Initializes internal state of BaseImportedPodcastQuery object.
|
||||
*
|
||||
* @param string $dbName The dabase name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
|
||||
{
|
||||
if (null === $dbName) {
|
||||
$dbName = 'airtime';
|
||||
}
|
||||
if (null === $modelName) {
|
||||
$modelName = 'ImportedPodcast';
|
||||
}
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ImportedPodcastQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param ImportedPodcastQuery|Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ImportedPodcastQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof ImportedPodcastQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new ImportedPodcastQuery(null, null, $modelAlias);
|
||||
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con an optional connection object
|
||||
*
|
||||
* @return ImportedPodcast|ImportedPodcast[]|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ImportedPodcastPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(ImportedPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of findPk to use instance pooling
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return ImportedPodcast A model object, or null if the key is not found
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function findOneByDbId($key, $con = null)
|
||||
{
|
||||
return $this->findPk($key, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return ImportedPodcast A model object, or null if the key is not found
|
||||
* @throws PropelException
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT "url", "auto_ingest", "id", "title", "creator", "description", "language", "copyright", "link", "itunes_author", "itunes_keywords", "itunes_summary", "itunes_subtitle", "itunes_category", "itunes_explicit", "owner" FROM "imported_podcast" WHERE "id" = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$obj = new ImportedPodcast();
|
||||
$obj->hydrate($row);
|
||||
ImportedPodcastPeer::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return ImportedPodcast|ImportedPodcast[]|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$stmt = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param PropelPDO $con an optional connection object
|
||||
*
|
||||
* @return PropelObjectCollection|ImportedPodcast[]|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$stmt = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($stmt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the url column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbUrl('fooValue'); // WHERE url = 'fooValue'
|
||||
* $query->filterByDbUrl('%fooValue%'); // WHERE url LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbUrl The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbUrl($dbUrl = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbUrl)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbUrl)) {
|
||||
$dbUrl = str_replace('*', '%', $dbUrl);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::URL, $dbUrl, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the auto_ingest column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbAutoIngest(true); // WHERE auto_ingest = true
|
||||
* $query->filterByDbAutoIngest('yes'); // WHERE auto_ingest = true
|
||||
* </code>
|
||||
*
|
||||
* @param boolean|string $dbAutoIngest The value to use as filter.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbAutoIngest($dbAutoIngest = null, $comparison = null)
|
||||
{
|
||||
if (is_string($dbAutoIngest)) {
|
||||
$dbAutoIngest = in_array(strtolower($dbAutoIngest), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::AUTO_INGEST, $dbAutoIngest, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbId(1234); // WHERE id = 1234
|
||||
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
|
||||
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByPodcast()
|
||||
*
|
||||
* @param mixed $dbId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbId($dbId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbId['min'])) {
|
||||
$this->addUsingAlias(ImportedPodcastPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbId['max'])) {
|
||||
$this->addUsingAlias(ImportedPodcastPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ID, $dbId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByDbTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbTitle The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbTitle($dbTitle = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbTitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbTitle)) {
|
||||
$dbTitle = str_replace('*', '%', $dbTitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::TITLE, $dbTitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the creator column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbCreator('fooValue'); // WHERE creator = 'fooValue'
|
||||
* $query->filterByDbCreator('%fooValue%'); // WHERE creator LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbCreator The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCreator($dbCreator = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCreator)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCreator)) {
|
||||
$dbCreator = str_replace('*', '%', $dbCreator);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::CREATOR, $dbCreator, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbDescription('fooValue'); // WHERE description = 'fooValue'
|
||||
* $query->filterByDbDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbDescription The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbDescription($dbDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbDescription)) {
|
||||
$dbDescription = str_replace('*', '%', $dbDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::DESCRIPTION, $dbDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the language column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbLanguage('fooValue'); // WHERE language = 'fooValue'
|
||||
* $query->filterByDbLanguage('%fooValue%'); // WHERE language LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbLanguage The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLanguage($dbLanguage = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbLanguage)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbLanguage)) {
|
||||
$dbLanguage = str_replace('*', '%', $dbLanguage);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::LANGUAGE, $dbLanguage, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the copyright column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbCopyright('fooValue'); // WHERE copyright = 'fooValue'
|
||||
* $query->filterByDbCopyright('%fooValue%'); // WHERE copyright LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbCopyright The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCopyright($dbCopyright = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCopyright)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCopyright)) {
|
||||
$dbCopyright = str_replace('*', '%', $dbCopyright);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::COPYRIGHT, $dbCopyright, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByDbLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbLink The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLink($dbLink = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbLink)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbLink)) {
|
||||
$dbLink = str_replace('*', '%', $dbLink);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::LINK, $dbLink, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_author column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesAuthor('fooValue'); // WHERE itunes_author = 'fooValue'
|
||||
* $query->filterByDbItunesAuthor('%fooValue%'); // WHERE itunes_author LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesAuthor The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesAuthor($dbItunesAuthor = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesAuthor)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesAuthor)) {
|
||||
$dbItunesAuthor = str_replace('*', '%', $dbItunesAuthor);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ITUNES_AUTHOR, $dbItunesAuthor, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_keywords column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesKeywords('fooValue'); // WHERE itunes_keywords = 'fooValue'
|
||||
* $query->filterByDbItunesKeywords('%fooValue%'); // WHERE itunes_keywords LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesKeywords The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesKeywords($dbItunesKeywords = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesKeywords)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesKeywords)) {
|
||||
$dbItunesKeywords = str_replace('*', '%', $dbItunesKeywords);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ITUNES_KEYWORDS, $dbItunesKeywords, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_summary column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesSummary('fooValue'); // WHERE itunes_summary = 'fooValue'
|
||||
* $query->filterByDbItunesSummary('%fooValue%'); // WHERE itunes_summary LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesSummary The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesSummary($dbItunesSummary = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesSummary)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesSummary)) {
|
||||
$dbItunesSummary = str_replace('*', '%', $dbItunesSummary);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ITUNES_SUMMARY, $dbItunesSummary, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_subtitle column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesSubtitle('fooValue'); // WHERE itunes_subtitle = 'fooValue'
|
||||
* $query->filterByDbItunesSubtitle('%fooValue%'); // WHERE itunes_subtitle LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesSubtitle The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesSubtitle($dbItunesSubtitle = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesSubtitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesSubtitle)) {
|
||||
$dbItunesSubtitle = str_replace('*', '%', $dbItunesSubtitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ITUNES_SUBTITLE, $dbItunesSubtitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_category column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesCategory('fooValue'); // WHERE itunes_category = 'fooValue'
|
||||
* $query->filterByDbItunesCategory('%fooValue%'); // WHERE itunes_category LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesCategory The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesCategory($dbItunesCategory = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesCategory)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesCategory)) {
|
||||
$dbItunesCategory = str_replace('*', '%', $dbItunesCategory);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ITUNES_CATEGORY, $dbItunesCategory, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_explicit column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesExplicit('fooValue'); // WHERE itunes_explicit = 'fooValue'
|
||||
* $query->filterByDbItunesExplicit('%fooValue%'); // WHERE itunes_explicit LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesExplicit The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesExplicit($dbItunesExplicit = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesExplicit)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesExplicit)) {
|
||||
$dbItunesExplicit = str_replace('*', '%', $dbItunesExplicit);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::ITUNES_EXPLICIT, $dbItunesExplicit, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the owner column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbOwner(1234); // WHERE owner = 1234
|
||||
* $query->filterByDbOwner(array(12, 34)); // WHERE owner IN (12, 34)
|
||||
* $query->filterByDbOwner(array('min' => 12)); // WHERE owner >= 12
|
||||
* $query->filterByDbOwner(array('max' => 12)); // WHERE owner <= 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByCcSubjs()
|
||||
*
|
||||
* @param mixed $dbOwner The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbOwner($dbOwner = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbOwner)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbOwner['min'])) {
|
||||
$this->addUsingAlias(ImportedPodcastPeer::OWNER, $dbOwner['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbOwner['max'])) {
|
||||
$this->addUsingAlias(ImportedPodcastPeer::OWNER, $dbOwner['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportedPodcastPeer::OWNER, $dbOwner, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related Podcast object
|
||||
*
|
||||
* @param Podcast|PropelObjectCollection $podcast The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByPodcast($podcast, $comparison = null)
|
||||
{
|
||||
if ($podcast instanceof Podcast) {
|
||||
return $this
|
||||
->addUsingAlias(ImportedPodcastPeer::ID, $podcast->getDbId(), $comparison);
|
||||
} elseif ($podcast instanceof PropelObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ImportedPodcastPeer::ID, $podcast->toKeyValue('PrimaryKey', 'DbId'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByPodcast() only accepts arguments of type Podcast or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Podcast relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinPodcast($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Podcast');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Podcast');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Podcast relation Podcast object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return PodcastQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function usePodcastQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinPodcast($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Podcast', 'PodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcSubjs object
|
||||
*
|
||||
* @param CcSubjs|PropelObjectCollection $ccSubjs The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByCcSubjs($ccSubjs, $comparison = null)
|
||||
{
|
||||
if ($ccSubjs instanceof CcSubjs) {
|
||||
return $this
|
||||
->addUsingAlias(ImportedPodcastPeer::OWNER, $ccSubjs->getDbId(), $comparison);
|
||||
} elseif ($ccSubjs instanceof PropelObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ImportedPodcastPeer::OWNER, $ccSubjs->toKeyValue('PrimaryKey', 'DbId'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByCcSubjs() only accepts arguments of type CcSubjs or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcSubjs relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcSubjs($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcSubjs');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcSubjs');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcSubjs relation CcSubjs object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcSubjsQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcSubjs($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ImportedPodcast $importedPodcast Object to remove from the list of results
|
||||
*
|
||||
* @return ImportedPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($importedPodcast = null)
|
||||
{
|
||||
if ($importedPodcast) {
|
||||
$this->addUsingAlias(ImportedPodcastPeer::ID, $importedPodcast->getDbId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
|
@ -35,12 +35,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* The value for the url field.
|
||||
* @var string
|
||||
*/
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* The value for the title field.
|
||||
* @var string
|
||||
|
@ -71,6 +65,12 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $copyright;
|
||||
|
||||
/**
|
||||
* The value for the link field.
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* The value for the itunes_author field.
|
||||
* @var string
|
||||
|
@ -107,13 +107,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $itunes_explicit;
|
||||
|
||||
/**
|
||||
* The value for the auto_ingest field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $auto_ingest;
|
||||
|
||||
/**
|
||||
* The value for the owner field.
|
||||
* @var int
|
||||
|
@ -121,11 +114,10 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
protected $owner;
|
||||
|
||||
/**
|
||||
* The value for the type field.
|
||||
* Note: this column has a database default value of: 1
|
||||
* @var int
|
||||
* The value for the descendant_class field.
|
||||
* @var string
|
||||
*/
|
||||
protected $type;
|
||||
protected $descendant_class;
|
||||
|
||||
/**
|
||||
* @var CcSubjs
|
||||
|
@ -138,6 +130,16 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
protected $collPodcastEpisodess;
|
||||
protected $collPodcastEpisodessPartial;
|
||||
|
||||
/**
|
||||
* @var StationPodcast one-to-one related StationPodcast object
|
||||
*/
|
||||
protected $singleStationPodcast;
|
||||
|
||||
/**
|
||||
* @var ImportedPodcast one-to-one related ImportedPodcast object
|
||||
*/
|
||||
protected $singleImportedPodcast;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -164,28 +166,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $podcastEpisodessScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* Applies default values to this object.
|
||||
* This method should be called from the object's constructor (or
|
||||
* equivalent initialization method).
|
||||
* @see __construct()
|
||||
*/
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->auto_ingest = false;
|
||||
$this->type = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes internal state of BasePodcast object.
|
||||
* @see applyDefaults()
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->applyDefaultValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [id] column value.
|
||||
*
|
||||
|
@ -197,17 +177,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [url] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbUrl()
|
||||
{
|
||||
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [title] column value.
|
||||
*
|
||||
|
@ -263,6 +232,17 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->copyright;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [link] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbLink()
|
||||
{
|
||||
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [itunes_author] column value.
|
||||
*
|
||||
|
@ -329,17 +309,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->itunes_explicit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [auto_ingest] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDbAutoIngest()
|
||||
{
|
||||
|
||||
return $this->auto_ingest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [owner] column value.
|
||||
*
|
||||
|
@ -352,14 +321,14 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the [type] column value.
|
||||
* Get the [descendant_class] column value.
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function getDbType()
|
||||
public function getDescendantClass()
|
||||
{
|
||||
|
||||
return $this->type;
|
||||
return $this->descendant_class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -383,27 +352,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbId()
|
||||
|
||||
/**
|
||||
* Set the value of [url] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return Podcast The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbUrl($v)
|
||||
{
|
||||
if ($v !== null && is_numeric($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->url !== $v) {
|
||||
$this->url = $v;
|
||||
$this->modifiedColumns[] = PodcastPeer::URL;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDbUrl()
|
||||
|
||||
/**
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
|
@ -509,6 +457,27 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbCopyright()
|
||||
|
||||
/**
|
||||
* Set the value of [link] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return Podcast The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbLink($v)
|
||||
{
|
||||
if ($v !== null && is_numeric($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->link !== $v) {
|
||||
$this->link = $v;
|
||||
$this->modifiedColumns[] = PodcastPeer::LINK;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDbLink()
|
||||
|
||||
/**
|
||||
* Set the value of [itunes_author] column.
|
||||
*
|
||||
|
@ -635,35 +604,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbItunesExplicit()
|
||||
|
||||
/**
|
||||
* Sets the value of the [auto_ingest] column.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
*
|
||||
* @param boolean|integer|string $v The new value
|
||||
* @return Podcast The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbAutoIngest($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
if (is_string($v)) {
|
||||
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
} else {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->auto_ingest !== $v) {
|
||||
$this->auto_ingest = $v;
|
||||
$this->modifiedColumns[] = PodcastPeer::AUTO_INGEST;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDbAutoIngest()
|
||||
|
||||
/**
|
||||
* Set the value of [owner] column.
|
||||
*
|
||||
|
@ -690,25 +630,25 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
} // setDbOwner()
|
||||
|
||||
/**
|
||||
* Set the value of [type] column.
|
||||
* Set the value of [descendant_class] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @param string $v new value
|
||||
* @return Podcast The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbType($v)
|
||||
public function setDescendantClass($v)
|
||||
{
|
||||
if ($v !== null && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->type !== $v) {
|
||||
$this->type = $v;
|
||||
$this->modifiedColumns[] = PodcastPeer::TYPE;
|
||||
if ($this->descendant_class !== $v) {
|
||||
$this->descendant_class = $v;
|
||||
$this->modifiedColumns[] = PodcastPeer::DESCENDANT_CLASS;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDbType()
|
||||
} // setDescendantClass()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
|
@ -720,14 +660,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
*/
|
||||
public function hasOnlyDefaultValues()
|
||||
{
|
||||
if ($this->auto_ingest !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->type !== 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return true
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
|
@ -751,21 +683,20 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
try {
|
||||
|
||||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||
$this->url = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
||||
$this->title = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->creator = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||
$this->description = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
||||
$this->language = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
|
||||
$this->copyright = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
|
||||
$this->title = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
||||
$this->creator = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->description = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||
$this->language = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
||||
$this->copyright = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
|
||||
$this->link = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
|
||||
$this->itunes_author = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
|
||||
$this->itunes_keywords = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
|
||||
$this->itunes_summary = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
|
||||
$this->itunes_subtitle = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
|
||||
$this->itunes_category = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
|
||||
$this->itunes_explicit = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
|
||||
$this->auto_ingest = ($row[$startcol + 13] !== null) ? (boolean) $row[$startcol + 13] : null;
|
||||
$this->owner = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
|
||||
$this->type = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
|
||||
$this->owner = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null;
|
||||
$this->descendant_class = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -775,7 +706,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
}
|
||||
$this->postHydrate($row, $startcol, $rehydrate);
|
||||
|
||||
return $startcol + 16; // 16 = PodcastPeer::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 15; // 15 = PodcastPeer::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating Podcast object", $e);
|
||||
|
@ -843,6 +774,10 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$this->aCcSubjs = null;
|
||||
$this->collPodcastEpisodess = null;
|
||||
|
||||
$this->singleStationPodcast = null;
|
||||
|
||||
$this->singleImportedPodcast = null;
|
||||
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -996,6 +931,18 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->singleStationPodcast !== null) {
|
||||
if (!$this->singleStationPodcast->isDeleted() && ($this->singleStationPodcast->isNew() || $this->singleStationPodcast->isModified())) {
|
||||
$affectedRows += $this->singleStationPodcast->save($con);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->singleImportedPodcast !== null) {
|
||||
if (!$this->singleImportedPodcast->isDeleted() && ($this->singleImportedPodcast->isNew() || $this->singleImportedPodcast->isModified())) {
|
||||
$affectedRows += $this->singleImportedPodcast->save($con);
|
||||
}
|
||||
}
|
||||
|
||||
$this->alreadyInSave = false;
|
||||
|
||||
}
|
||||
|
@ -1035,9 +982,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(PodcastPeer::ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '"id"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::URL)) {
|
||||
$modifiedColumns[':p' . $index++] = '"url"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = '"title"';
|
||||
}
|
||||
|
@ -1053,6 +997,9 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(PodcastPeer::COPYRIGHT)) {
|
||||
$modifiedColumns[':p' . $index++] = '"copyright"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::LINK)) {
|
||||
$modifiedColumns[':p' . $index++] = '"link"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_AUTHOR)) {
|
||||
$modifiedColumns[':p' . $index++] = '"itunes_author"';
|
||||
}
|
||||
|
@ -1071,14 +1018,11 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(PodcastPeer::ITUNES_EXPLICIT)) {
|
||||
$modifiedColumns[':p' . $index++] = '"itunes_explicit"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::AUTO_INGEST)) {
|
||||
$modifiedColumns[':p' . $index++] = '"auto_ingest"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::OWNER)) {
|
||||
$modifiedColumns[':p' . $index++] = '"owner"';
|
||||
}
|
||||
if ($this->isColumnModified(PodcastPeer::TYPE)) {
|
||||
$modifiedColumns[':p' . $index++] = '"type"';
|
||||
if ($this->isColumnModified(PodcastPeer::DESCENDANT_CLASS)) {
|
||||
$modifiedColumns[':p' . $index++] = '"descendant_class"';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
|
@ -1094,9 +1038,6 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
case '"id"':
|
||||
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
|
||||
break;
|
||||
case '"url"':
|
||||
$stmt->bindValue($identifier, $this->url, PDO::PARAM_STR);
|
||||
break;
|
||||
case '"title"':
|
||||
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
|
||||
break;
|
||||
|
@ -1112,6 +1053,9 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
case '"copyright"':
|
||||
$stmt->bindValue($identifier, $this->copyright, PDO::PARAM_STR);
|
||||
break;
|
||||
case '"link"':
|
||||
$stmt->bindValue($identifier, $this->link, PDO::PARAM_STR);
|
||||
break;
|
||||
case '"itunes_author"':
|
||||
$stmt->bindValue($identifier, $this->itunes_author, PDO::PARAM_STR);
|
||||
break;
|
||||
|
@ -1130,14 +1074,11 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
case '"itunes_explicit"':
|
||||
$stmt->bindValue($identifier, $this->itunes_explicit, PDO::PARAM_STR);
|
||||
break;
|
||||
case '"auto_ingest"':
|
||||
$stmt->bindValue($identifier, $this->auto_ingest, PDO::PARAM_BOOL);
|
||||
break;
|
||||
case '"owner"':
|
||||
$stmt->bindValue($identifier, $this->owner, PDO::PARAM_INT);
|
||||
break;
|
||||
case '"type"':
|
||||
$stmt->bindValue($identifier, $this->type, PDO::PARAM_INT);
|
||||
case '"descendant_class"':
|
||||
$stmt->bindValue($identifier, $this->descendant_class, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1251,6 +1192,18 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->singleStationPodcast !== null) {
|
||||
if (!$this->singleStationPodcast->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->singleStationPodcast->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->singleImportedPodcast !== null) {
|
||||
if (!$this->singleImportedPodcast->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->singleImportedPodcast->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->alreadyInValidation = false;
|
||||
}
|
||||
|
@ -1290,23 +1243,23 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->getDbId();
|
||||
break;
|
||||
case 1:
|
||||
return $this->getDbUrl();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getDbTitle();
|
||||
break;
|
||||
case 3:
|
||||
case 2:
|
||||
return $this->getDbCreator();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getDbDescription();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getDbLanguage();
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
return $this->getDbCopyright();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getDbLink();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getDbItunesAuthor();
|
||||
break;
|
||||
|
@ -1326,13 +1279,10 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->getDbItunesExplicit();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getDbAutoIngest();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getDbOwner();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getDbType();
|
||||
case 14:
|
||||
return $this->getDescendantClass();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
|
@ -1364,21 +1314,20 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$keys = PodcastPeer::getFieldNames($keyType);
|
||||
$result = array(
|
||||
$keys[0] => $this->getDbId(),
|
||||
$keys[1] => $this->getDbUrl(),
|
||||
$keys[2] => $this->getDbTitle(),
|
||||
$keys[3] => $this->getDbCreator(),
|
||||
$keys[4] => $this->getDbDescription(),
|
||||
$keys[5] => $this->getDbLanguage(),
|
||||
$keys[6] => $this->getDbCopyright(),
|
||||
$keys[1] => $this->getDbTitle(),
|
||||
$keys[2] => $this->getDbCreator(),
|
||||
$keys[3] => $this->getDbDescription(),
|
||||
$keys[4] => $this->getDbLanguage(),
|
||||
$keys[5] => $this->getDbCopyright(),
|
||||
$keys[6] => $this->getDbLink(),
|
||||
$keys[7] => $this->getDbItunesAuthor(),
|
||||
$keys[8] => $this->getDbItunesKeywords(),
|
||||
$keys[9] => $this->getDbItunesSummary(),
|
||||
$keys[10] => $this->getDbItunesSubtitle(),
|
||||
$keys[11] => $this->getDbItunesCategory(),
|
||||
$keys[12] => $this->getDbItunesExplicit(),
|
||||
$keys[13] => $this->getDbAutoIngest(),
|
||||
$keys[14] => $this->getDbOwner(),
|
||||
$keys[15] => $this->getDbType(),
|
||||
$keys[13] => $this->getDbOwner(),
|
||||
$keys[14] => $this->getDescendantClass(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
|
@ -1392,6 +1341,12 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
if (null !== $this->collPodcastEpisodess) {
|
||||
$result['PodcastEpisodess'] = $this->collPodcastEpisodess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->singleStationPodcast) {
|
||||
$result['StationPodcast'] = $this->singleStationPodcast->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
if (null !== $this->singleImportedPodcast) {
|
||||
$result['ImportedPodcast'] = $this->singleImportedPodcast->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -1430,23 +1385,23 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$this->setDbId($value);
|
||||
break;
|
||||
case 1:
|
||||
$this->setDbUrl($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setDbTitle($value);
|
||||
break;
|
||||
case 3:
|
||||
case 2:
|
||||
$this->setDbCreator($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setDbDescription($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setDbLanguage($value);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
$this->setDbCopyright($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setDbLink($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setDbItunesAuthor($value);
|
||||
break;
|
||||
|
@ -1466,13 +1421,10 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$this->setDbItunesExplicit($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setDbAutoIngest($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setDbOwner($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setDbType($value);
|
||||
case 14:
|
||||
$this->setDescendantClass($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
@ -1499,21 +1451,20 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$keys = PodcastPeer::getFieldNames($keyType);
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbUrl($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbTitle($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbCreator($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbDescription($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbLanguage($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setDbCopyright($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbTitle($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbCreator($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbDescription($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbLanguage($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbCopyright($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setDbLink($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDbItunesAuthor($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setDbItunesKeywords($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setDbItunesSummary($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setDbItunesSubtitle($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setDbItunesCategory($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setDbItunesExplicit($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setDbAutoIngest($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setDbOwner($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setDbType($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setDbOwner($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setDescendantClass($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1526,21 +1477,20 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$criteria = new Criteria(PodcastPeer::DATABASE_NAME);
|
||||
|
||||
if ($this->isColumnModified(PodcastPeer::ID)) $criteria->add(PodcastPeer::ID, $this->id);
|
||||
if ($this->isColumnModified(PodcastPeer::URL)) $criteria->add(PodcastPeer::URL, $this->url);
|
||||
if ($this->isColumnModified(PodcastPeer::TITLE)) $criteria->add(PodcastPeer::TITLE, $this->title);
|
||||
if ($this->isColumnModified(PodcastPeer::CREATOR)) $criteria->add(PodcastPeer::CREATOR, $this->creator);
|
||||
if ($this->isColumnModified(PodcastPeer::DESCRIPTION)) $criteria->add(PodcastPeer::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(PodcastPeer::LANGUAGE)) $criteria->add(PodcastPeer::LANGUAGE, $this->language);
|
||||
if ($this->isColumnModified(PodcastPeer::COPYRIGHT)) $criteria->add(PodcastPeer::COPYRIGHT, $this->copyright);
|
||||
if ($this->isColumnModified(PodcastPeer::LINK)) $criteria->add(PodcastPeer::LINK, $this->link);
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_AUTHOR)) $criteria->add(PodcastPeer::ITUNES_AUTHOR, $this->itunes_author);
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_KEYWORDS)) $criteria->add(PodcastPeer::ITUNES_KEYWORDS, $this->itunes_keywords);
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_SUMMARY)) $criteria->add(PodcastPeer::ITUNES_SUMMARY, $this->itunes_summary);
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_SUBTITLE)) $criteria->add(PodcastPeer::ITUNES_SUBTITLE, $this->itunes_subtitle);
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_CATEGORY)) $criteria->add(PodcastPeer::ITUNES_CATEGORY, $this->itunes_category);
|
||||
if ($this->isColumnModified(PodcastPeer::ITUNES_EXPLICIT)) $criteria->add(PodcastPeer::ITUNES_EXPLICIT, $this->itunes_explicit);
|
||||
if ($this->isColumnModified(PodcastPeer::AUTO_INGEST)) $criteria->add(PodcastPeer::AUTO_INGEST, $this->auto_ingest);
|
||||
if ($this->isColumnModified(PodcastPeer::OWNER)) $criteria->add(PodcastPeer::OWNER, $this->owner);
|
||||
if ($this->isColumnModified(PodcastPeer::TYPE)) $criteria->add(PodcastPeer::TYPE, $this->type);
|
||||
if ($this->isColumnModified(PodcastPeer::DESCENDANT_CLASS)) $criteria->add(PodcastPeer::DESCENDANT_CLASS, $this->descendant_class);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -1604,21 +1554,20 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
*/
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setDbUrl($this->getDbUrl());
|
||||
$copyObj->setDbTitle($this->getDbTitle());
|
||||
$copyObj->setDbCreator($this->getDbCreator());
|
||||
$copyObj->setDbDescription($this->getDbDescription());
|
||||
$copyObj->setDbLanguage($this->getDbLanguage());
|
||||
$copyObj->setDbCopyright($this->getDbCopyright());
|
||||
$copyObj->setDbLink($this->getDbLink());
|
||||
$copyObj->setDbItunesAuthor($this->getDbItunesAuthor());
|
||||
$copyObj->setDbItunesKeywords($this->getDbItunesKeywords());
|
||||
$copyObj->setDbItunesSummary($this->getDbItunesSummary());
|
||||
$copyObj->setDbItunesSubtitle($this->getDbItunesSubtitle());
|
||||
$copyObj->setDbItunesCategory($this->getDbItunesCategory());
|
||||
$copyObj->setDbItunesExplicit($this->getDbItunesExplicit());
|
||||
$copyObj->setDbAutoIngest($this->getDbAutoIngest());
|
||||
$copyObj->setDbOwner($this->getDbOwner());
|
||||
$copyObj->setDbType($this->getDbType());
|
||||
$copyObj->setDescendantClass($this->getDescendantClass());
|
||||
|
||||
if ($deepCopy && !$this->startCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -1633,6 +1582,16 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
$relObj = $this->getStationPodcast();
|
||||
if ($relObj) {
|
||||
$copyObj->setStationPodcast($relObj->copy($deepCopy));
|
||||
}
|
||||
|
||||
$relObj = $this->getImportedPodcast();
|
||||
if ($relObj) {
|
||||
$copyObj->setImportedPodcast($relObj->copy($deepCopy));
|
||||
}
|
||||
|
||||
//unflag object copy
|
||||
$this->startCopy = false;
|
||||
} // if ($deepCopy)
|
||||
|
@ -2001,32 +1960,102 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->getPodcastEpisodess($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single StationPodcast object, which is related to this object by a one-to-one relationship.
|
||||
*
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @return StationPodcast
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getStationPodcast(PropelPDO $con = null)
|
||||
{
|
||||
|
||||
if ($this->singleStationPodcast === null && !$this->isNew()) {
|
||||
$this->singleStationPodcast = StationPodcastQuery::create()->findPk($this->getPrimaryKey(), $con);
|
||||
}
|
||||
|
||||
return $this->singleStationPodcast;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a single StationPodcast object as related to this object by a one-to-one relationship.
|
||||
*
|
||||
* @param StationPodcast $v StationPodcast
|
||||
* @return Podcast The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setStationPodcast(StationPodcast $v = null)
|
||||
{
|
||||
$this->singleStationPodcast = $v;
|
||||
|
||||
// Make sure that that the passed-in StationPodcast isn't already associated with this object
|
||||
if ($v !== null && $v->getPodcast(null, false) === null) {
|
||||
$v->setPodcast($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single ImportedPodcast object, which is related to this object by a one-to-one relationship.
|
||||
*
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @return ImportedPodcast
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getImportedPodcast(PropelPDO $con = null)
|
||||
{
|
||||
|
||||
if ($this->singleImportedPodcast === null && !$this->isNew()) {
|
||||
$this->singleImportedPodcast = ImportedPodcastQuery::create()->findPk($this->getPrimaryKey(), $con);
|
||||
}
|
||||
|
||||
return $this->singleImportedPodcast;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a single ImportedPodcast object as related to this object by a one-to-one relationship.
|
||||
*
|
||||
* @param ImportedPodcast $v ImportedPodcast
|
||||
* @return Podcast The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setImportedPodcast(ImportedPodcast $v = null)
|
||||
{
|
||||
$this->singleImportedPodcast = $v;
|
||||
|
||||
// Make sure that that the passed-in ImportedPodcast isn't already associated with this object
|
||||
if ($v !== null && $v->getPodcast(null, false) === null) {
|
||||
$v->setPodcast($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->id = null;
|
||||
$this->url = null;
|
||||
$this->title = null;
|
||||
$this->creator = null;
|
||||
$this->description = null;
|
||||
$this->language = null;
|
||||
$this->copyright = null;
|
||||
$this->link = null;
|
||||
$this->itunes_author = null;
|
||||
$this->itunes_keywords = null;
|
||||
$this->itunes_summary = null;
|
||||
$this->itunes_subtitle = null;
|
||||
$this->itunes_category = null;
|
||||
$this->itunes_explicit = null;
|
||||
$this->auto_ingest = null;
|
||||
$this->owner = null;
|
||||
$this->type = null;
|
||||
$this->descendant_class = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->alreadyInClearAllReferencesDeep = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
$this->resetModified();
|
||||
$this->setNew(true);
|
||||
$this->setDeleted(false);
|
||||
|
@ -2050,6 +2079,12 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->singleStationPodcast) {
|
||||
$this->singleStationPodcast->clearAllReferences($deep);
|
||||
}
|
||||
if ($this->singleImportedPodcast) {
|
||||
$this->singleImportedPodcast->clearAllReferences($deep);
|
||||
}
|
||||
if ($this->aCcSubjs instanceof Persistent) {
|
||||
$this->aCcSubjs->clearAllReferences($deep);
|
||||
}
|
||||
|
@ -2061,6 +2096,14 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
$this->collPodcastEpisodess->clearIterator();
|
||||
}
|
||||
$this->collPodcastEpisodess = null;
|
||||
if ($this->singleStationPodcast instanceof PropelCollection) {
|
||||
$this->singleStationPodcast->clearIterator();
|
||||
}
|
||||
$this->singleStationPodcast = null;
|
||||
if ($this->singleImportedPodcast instanceof PropelCollection) {
|
||||
$this->singleImportedPodcast->clearIterator();
|
||||
}
|
||||
$this->singleImportedPodcast = null;
|
||||
$this->aCcSubjs = null;
|
||||
}
|
||||
|
||||
|
@ -2084,4 +2127,32 @@ abstract class BasePodcast extends BaseObject implements Persistent
|
|||
return $this->alreadyInSave;
|
||||
}
|
||||
|
||||
// concrete_inheritance_parent behavior
|
||||
|
||||
/**
|
||||
* Whether or not this object is the parent of a child object
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasChildObject()
|
||||
{
|
||||
return $this->getDescendantClass() !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child object of this object
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getChildObject()
|
||||
{
|
||||
if (!$this->hasChildObject()) {
|
||||
return null;
|
||||
}
|
||||
$childObjectClass = $this->getDescendantClass();
|
||||
$childObject = PropelQuery::from($childObjectClass)->findPk($this->getPrimaryKey());
|
||||
|
||||
return $childObject->hasChildObject() ? $childObject->getChildObject() : $childObject;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,26 +18,23 @@ abstract class BasePodcastPeer
|
|||
const TABLE_NAME = 'podcast';
|
||||
|
||||
/** the related Propel class for this table */
|
||||
const OM_CLASS = 'Podcast';
|
||||
const OM_CLASS = '';
|
||||
|
||||
/** the related TableMap class for this table */
|
||||
const TM_CLASS = 'PodcastTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 16;
|
||||
const NUM_COLUMNS = 15;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
|
||||
const NUM_HYDRATE_COLUMNS = 16;
|
||||
const NUM_HYDRATE_COLUMNS = 15;
|
||||
|
||||
/** the column name for the id field */
|
||||
const ID = 'podcast.id';
|
||||
|
||||
/** the column name for the url field */
|
||||
const URL = 'podcast.url';
|
||||
|
||||
/** the column name for the title field */
|
||||
const TITLE = 'podcast.title';
|
||||
|
||||
|
@ -53,6 +50,9 @@ abstract class BasePodcastPeer
|
|||
/** the column name for the copyright field */
|
||||
const COPYRIGHT = 'podcast.copyright';
|
||||
|
||||
/** the column name for the link field */
|
||||
const LINK = 'podcast.link';
|
||||
|
||||
/** the column name for the itunes_author field */
|
||||
const ITUNES_AUTHOR = 'podcast.itunes_author';
|
||||
|
||||
|
@ -71,14 +71,11 @@ abstract class BasePodcastPeer
|
|||
/** the column name for the itunes_explicit field */
|
||||
const ITUNES_EXPLICIT = 'podcast.itunes_explicit';
|
||||
|
||||
/** the column name for the auto_ingest field */
|
||||
const AUTO_INGEST = 'podcast.auto_ingest';
|
||||
|
||||
/** the column name for the owner field */
|
||||
const OWNER = 'podcast.owner';
|
||||
|
||||
/** the column name for the type field */
|
||||
const TYPE = 'podcast.type';
|
||||
/** the column name for the descendant_class field */
|
||||
const DESCENDANT_CLASS = 'podcast.descendant_class';
|
||||
|
||||
/** The default string format for model objects of the related table **/
|
||||
const DEFAULT_STRING_FORMAT = 'YAML';
|
||||
|
@ -99,12 +96,12 @@ abstract class BasePodcastPeer
|
|||
* e.g. PodcastPeer::$fieldNames[PodcastPeer::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbUrl', 'DbTitle', 'DbCreator', 'DbDescription', 'DbLanguage', 'DbCopyright', 'DbItunesAuthor', 'DbItunesKeywords', 'DbItunesSummary', 'DbItunesSubtitle', 'DbItunesCategory', 'DbItunesExplicit', 'DbAutoIngest', 'DbOwner', 'DbType', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbUrl', 'dbTitle', 'dbCreator', 'dbDescription', 'dbLanguage', 'dbCopyright', 'dbItunesAuthor', 'dbItunesKeywords', 'dbItunesSummary', 'dbItunesSubtitle', 'dbItunesCategory', 'dbItunesExplicit', 'dbAutoIngest', 'dbOwner', 'dbType', ),
|
||||
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID, PodcastPeer::URL, PodcastPeer::TITLE, PodcastPeer::CREATOR, PodcastPeer::DESCRIPTION, PodcastPeer::LANGUAGE, PodcastPeer::COPYRIGHT, PodcastPeer::ITUNES_AUTHOR, PodcastPeer::ITUNES_KEYWORDS, PodcastPeer::ITUNES_SUMMARY, PodcastPeer::ITUNES_SUBTITLE, PodcastPeer::ITUNES_CATEGORY, PodcastPeer::ITUNES_EXPLICIT, PodcastPeer::AUTO_INGEST, PodcastPeer::OWNER, PodcastPeer::TYPE, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'URL', 'TITLE', 'CREATOR', 'DESCRIPTION', 'LANGUAGE', 'COPYRIGHT', 'ITUNES_AUTHOR', 'ITUNES_KEYWORDS', 'ITUNES_SUMMARY', 'ITUNES_SUBTITLE', 'ITUNES_CATEGORY', 'ITUNES_EXPLICIT', 'AUTO_INGEST', 'OWNER', 'TYPE', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'url', 'title', 'creator', 'description', 'language', 'copyright', 'itunes_author', 'itunes_keywords', 'itunes_summary', 'itunes_subtitle', 'itunes_category', 'itunes_explicit', 'auto_ingest', 'owner', 'type', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTitle', 'DbCreator', 'DbDescription', 'DbLanguage', 'DbCopyright', 'DbLink', 'DbItunesAuthor', 'DbItunesKeywords', 'DbItunesSummary', 'DbItunesSubtitle', 'DbItunesCategory', 'DbItunesExplicit', 'DbOwner', 'DescendantClass', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTitle', 'dbCreator', 'dbDescription', 'dbLanguage', 'dbCopyright', 'dbLink', 'dbItunesAuthor', 'dbItunesKeywords', 'dbItunesSummary', 'dbItunesSubtitle', 'dbItunesCategory', 'dbItunesExplicit', 'dbOwner', 'descendantClass', ),
|
||||
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID, PodcastPeer::TITLE, PodcastPeer::CREATOR, PodcastPeer::DESCRIPTION, PodcastPeer::LANGUAGE, PodcastPeer::COPYRIGHT, PodcastPeer::LINK, PodcastPeer::ITUNES_AUTHOR, PodcastPeer::ITUNES_KEYWORDS, PodcastPeer::ITUNES_SUMMARY, PodcastPeer::ITUNES_SUBTITLE, PodcastPeer::ITUNES_CATEGORY, PodcastPeer::ITUNES_EXPLICIT, PodcastPeer::OWNER, PodcastPeer::DESCENDANT_CLASS, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TITLE', 'CREATOR', 'DESCRIPTION', 'LANGUAGE', 'COPYRIGHT', 'LINK', 'ITUNES_AUTHOR', 'ITUNES_KEYWORDS', 'ITUNES_SUMMARY', 'ITUNES_SUBTITLE', 'ITUNES_CATEGORY', 'ITUNES_EXPLICIT', 'OWNER', 'DESCENDANT_CLASS', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'title', 'creator', 'description', 'language', 'copyright', 'link', 'itunes_author', 'itunes_keywords', 'itunes_summary', 'itunes_subtitle', 'itunes_category', 'itunes_explicit', 'owner', 'descendant_class', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -114,12 +111,12 @@ abstract class BasePodcastPeer
|
|||
* e.g. PodcastPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbUrl' => 1, 'DbTitle' => 2, 'DbCreator' => 3, 'DbDescription' => 4, 'DbLanguage' => 5, 'DbCopyright' => 6, 'DbItunesAuthor' => 7, 'DbItunesKeywords' => 8, 'DbItunesSummary' => 9, 'DbItunesSubtitle' => 10, 'DbItunesCategory' => 11, 'DbItunesExplicit' => 12, 'DbAutoIngest' => 13, 'DbOwner' => 14, 'DbType' => 15, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbUrl' => 1, 'dbTitle' => 2, 'dbCreator' => 3, 'dbDescription' => 4, 'dbLanguage' => 5, 'dbCopyright' => 6, 'dbItunesAuthor' => 7, 'dbItunesKeywords' => 8, 'dbItunesSummary' => 9, 'dbItunesSubtitle' => 10, 'dbItunesCategory' => 11, 'dbItunesExplicit' => 12, 'dbAutoIngest' => 13, 'dbOwner' => 14, 'dbType' => 15, ),
|
||||
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID => 0, PodcastPeer::URL => 1, PodcastPeer::TITLE => 2, PodcastPeer::CREATOR => 3, PodcastPeer::DESCRIPTION => 4, PodcastPeer::LANGUAGE => 5, PodcastPeer::COPYRIGHT => 6, PodcastPeer::ITUNES_AUTHOR => 7, PodcastPeer::ITUNES_KEYWORDS => 8, PodcastPeer::ITUNES_SUMMARY => 9, PodcastPeer::ITUNES_SUBTITLE => 10, PodcastPeer::ITUNES_CATEGORY => 11, PodcastPeer::ITUNES_EXPLICIT => 12, PodcastPeer::AUTO_INGEST => 13, PodcastPeer::OWNER => 14, PodcastPeer::TYPE => 15, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'URL' => 1, 'TITLE' => 2, 'CREATOR' => 3, 'DESCRIPTION' => 4, 'LANGUAGE' => 5, 'COPYRIGHT' => 6, 'ITUNES_AUTHOR' => 7, 'ITUNES_KEYWORDS' => 8, 'ITUNES_SUMMARY' => 9, 'ITUNES_SUBTITLE' => 10, 'ITUNES_CATEGORY' => 11, 'ITUNES_EXPLICIT' => 12, 'AUTO_INGEST' => 13, 'OWNER' => 14, 'TYPE' => 15, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'url' => 1, 'title' => 2, 'creator' => 3, 'description' => 4, 'language' => 5, 'copyright' => 6, 'itunes_author' => 7, 'itunes_keywords' => 8, 'itunes_summary' => 9, 'itunes_subtitle' => 10, 'itunes_category' => 11, 'itunes_explicit' => 12, 'auto_ingest' => 13, 'owner' => 14, 'type' => 15, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTitle' => 1, 'DbCreator' => 2, 'DbDescription' => 3, 'DbLanguage' => 4, 'DbCopyright' => 5, 'DbLink' => 6, 'DbItunesAuthor' => 7, 'DbItunesKeywords' => 8, 'DbItunesSummary' => 9, 'DbItunesSubtitle' => 10, 'DbItunesCategory' => 11, 'DbItunesExplicit' => 12, 'DbOwner' => 13, 'DescendantClass' => 14, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTitle' => 1, 'dbCreator' => 2, 'dbDescription' => 3, 'dbLanguage' => 4, 'dbCopyright' => 5, 'dbLink' => 6, 'dbItunesAuthor' => 7, 'dbItunesKeywords' => 8, 'dbItunesSummary' => 9, 'dbItunesSubtitle' => 10, 'dbItunesCategory' => 11, 'dbItunesExplicit' => 12, 'dbOwner' => 13, 'descendantClass' => 14, ),
|
||||
BasePeer::TYPE_COLNAME => array (PodcastPeer::ID => 0, PodcastPeer::TITLE => 1, PodcastPeer::CREATOR => 2, PodcastPeer::DESCRIPTION => 3, PodcastPeer::LANGUAGE => 4, PodcastPeer::COPYRIGHT => 5, PodcastPeer::LINK => 6, PodcastPeer::ITUNES_AUTHOR => 7, PodcastPeer::ITUNES_KEYWORDS => 8, PodcastPeer::ITUNES_SUMMARY => 9, PodcastPeer::ITUNES_SUBTITLE => 10, PodcastPeer::ITUNES_CATEGORY => 11, PodcastPeer::ITUNES_EXPLICIT => 12, PodcastPeer::OWNER => 13, PodcastPeer::DESCENDANT_CLASS => 14, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TITLE' => 1, 'CREATOR' => 2, 'DESCRIPTION' => 3, 'LANGUAGE' => 4, 'COPYRIGHT' => 5, 'LINK' => 6, 'ITUNES_AUTHOR' => 7, 'ITUNES_KEYWORDS' => 8, 'ITUNES_SUMMARY' => 9, 'ITUNES_SUBTITLE' => 10, 'ITUNES_CATEGORY' => 11, 'ITUNES_EXPLICIT' => 12, 'OWNER' => 13, 'DESCENDANT_CLASS' => 14, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'title' => 1, 'creator' => 2, 'description' => 3, 'language' => 4, 'copyright' => 5, 'link' => 6, 'itunes_author' => 7, 'itunes_keywords' => 8, 'itunes_summary' => 9, 'itunes_subtitle' => 10, 'itunes_category' => 11, 'itunes_explicit' => 12, 'owner' => 13, 'descendant_class' => 14, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -194,38 +191,36 @@ abstract class BasePodcastPeer
|
|||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(PodcastPeer::ID);
|
||||
$criteria->addSelectColumn(PodcastPeer::URL);
|
||||
$criteria->addSelectColumn(PodcastPeer::TITLE);
|
||||
$criteria->addSelectColumn(PodcastPeer::CREATOR);
|
||||
$criteria->addSelectColumn(PodcastPeer::DESCRIPTION);
|
||||
$criteria->addSelectColumn(PodcastPeer::LANGUAGE);
|
||||
$criteria->addSelectColumn(PodcastPeer::COPYRIGHT);
|
||||
$criteria->addSelectColumn(PodcastPeer::LINK);
|
||||
$criteria->addSelectColumn(PodcastPeer::ITUNES_AUTHOR);
|
||||
$criteria->addSelectColumn(PodcastPeer::ITUNES_KEYWORDS);
|
||||
$criteria->addSelectColumn(PodcastPeer::ITUNES_SUMMARY);
|
||||
$criteria->addSelectColumn(PodcastPeer::ITUNES_SUBTITLE);
|
||||
$criteria->addSelectColumn(PodcastPeer::ITUNES_CATEGORY);
|
||||
$criteria->addSelectColumn(PodcastPeer::ITUNES_EXPLICIT);
|
||||
$criteria->addSelectColumn(PodcastPeer::AUTO_INGEST);
|
||||
$criteria->addSelectColumn(PodcastPeer::OWNER);
|
||||
$criteria->addSelectColumn(PodcastPeer::TYPE);
|
||||
$criteria->addSelectColumn(PodcastPeer::DESCENDANT_CLASS);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.id');
|
||||
$criteria->addSelectColumn($alias . '.url');
|
||||
$criteria->addSelectColumn($alias . '.title');
|
||||
$criteria->addSelectColumn($alias . '.creator');
|
||||
$criteria->addSelectColumn($alias . '.description');
|
||||
$criteria->addSelectColumn($alias . '.language');
|
||||
$criteria->addSelectColumn($alias . '.copyright');
|
||||
$criteria->addSelectColumn($alias . '.link');
|
||||
$criteria->addSelectColumn($alias . '.itunes_author');
|
||||
$criteria->addSelectColumn($alias . '.itunes_keywords');
|
||||
$criteria->addSelectColumn($alias . '.itunes_summary');
|
||||
$criteria->addSelectColumn($alias . '.itunes_subtitle');
|
||||
$criteria->addSelectColumn($alias . '.itunes_category');
|
||||
$criteria->addSelectColumn($alias . '.itunes_explicit');
|
||||
$criteria->addSelectColumn($alias . '.auto_ingest');
|
||||
$criteria->addSelectColumn($alias . '.owner');
|
||||
$criteria->addSelectColumn($alias . '.type');
|
||||
$criteria->addSelectColumn($alias . '.descendant_class');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,6 +428,12 @@ abstract class BasePodcastPeer
|
|||
// Invalidate objects in PodcastEpisodesPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
PodcastEpisodesPeer::clearInstancePool();
|
||||
// Invalidate objects in StationPodcastPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
StationPodcastPeer::clearInstancePool();
|
||||
// Invalidate objects in ImportedPodcastPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
ImportedPodcastPeer::clearInstancePool();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -519,6 +520,11 @@ abstract class BasePodcastPeer
|
|||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj->hydrate($row, $startcol, true); // rehydrate
|
||||
$col = $startcol + PodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
} elseif (null == $key) {
|
||||
// empty resultset, probably from a left join
|
||||
// since this table is abstract, we can't hydrate an empty object
|
||||
$obj = null;
|
||||
$col = $startcol + PodcastPeer::NUM_HYDRATE_COLUMNS;
|
||||
} else {
|
||||
$cls = PodcastPeer::OM_CLASS;
|
||||
$obj = new $cls();
|
||||
|
@ -793,13 +799,10 @@ abstract class BasePodcastPeer
|
|||
/**
|
||||
* The class that the Peer will make instances of.
|
||||
*
|
||||
*
|
||||
* @return string ClassName
|
||||
* This method must be overridden by the stub subclass, because
|
||||
* Podcast is declared abstract in the schema.
|
||||
*/
|
||||
public static function getOMClass($row = 0, $colnum = 0)
|
||||
{
|
||||
return PodcastPeer::OM_CLASS;
|
||||
}
|
||||
abstract public static function getOMClass($row = 0, $colnum = 0);
|
||||
|
||||
/**
|
||||
* Performs an INSERT on the database, given a Podcast or Criteria object.
|
||||
|
|
|
@ -7,38 +7,36 @@
|
|||
*
|
||||
*
|
||||
* @method PodcastQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method PodcastQuery orderByDbUrl($order = Criteria::ASC) Order by the url column
|
||||
* @method PodcastQuery orderByDbTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method PodcastQuery orderByDbCreator($order = Criteria::ASC) Order by the creator column
|
||||
* @method PodcastQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method PodcastQuery orderByDbLanguage($order = Criteria::ASC) Order by the language column
|
||||
* @method PodcastQuery orderByDbCopyright($order = Criteria::ASC) Order by the copyright column
|
||||
* @method PodcastQuery orderByDbLink($order = Criteria::ASC) Order by the link column
|
||||
* @method PodcastQuery orderByDbItunesAuthor($order = Criteria::ASC) Order by the itunes_author column
|
||||
* @method PodcastQuery orderByDbItunesKeywords($order = Criteria::ASC) Order by the itunes_keywords column
|
||||
* @method PodcastQuery orderByDbItunesSummary($order = Criteria::ASC) Order by the itunes_summary column
|
||||
* @method PodcastQuery orderByDbItunesSubtitle($order = Criteria::ASC) Order by the itunes_subtitle column
|
||||
* @method PodcastQuery orderByDbItunesCategory($order = Criteria::ASC) Order by the itunes_category column
|
||||
* @method PodcastQuery orderByDbItunesExplicit($order = Criteria::ASC) Order by the itunes_explicit column
|
||||
* @method PodcastQuery orderByDbAutoIngest($order = Criteria::ASC) Order by the auto_ingest column
|
||||
* @method PodcastQuery orderByDbOwner($order = Criteria::ASC) Order by the owner column
|
||||
* @method PodcastQuery orderByDbType($order = Criteria::ASC) Order by the type column
|
||||
* @method PodcastQuery orderByDescendantClass($order = Criteria::ASC) Order by the descendant_class column
|
||||
*
|
||||
* @method PodcastQuery groupByDbId() Group by the id column
|
||||
* @method PodcastQuery groupByDbUrl() Group by the url column
|
||||
* @method PodcastQuery groupByDbTitle() Group by the title column
|
||||
* @method PodcastQuery groupByDbCreator() Group by the creator column
|
||||
* @method PodcastQuery groupByDbDescription() Group by the description column
|
||||
* @method PodcastQuery groupByDbLanguage() Group by the language column
|
||||
* @method PodcastQuery groupByDbCopyright() Group by the copyright column
|
||||
* @method PodcastQuery groupByDbLink() Group by the link column
|
||||
* @method PodcastQuery groupByDbItunesAuthor() Group by the itunes_author column
|
||||
* @method PodcastQuery groupByDbItunesKeywords() Group by the itunes_keywords column
|
||||
* @method PodcastQuery groupByDbItunesSummary() Group by the itunes_summary column
|
||||
* @method PodcastQuery groupByDbItunesSubtitle() Group by the itunes_subtitle column
|
||||
* @method PodcastQuery groupByDbItunesCategory() Group by the itunes_category column
|
||||
* @method PodcastQuery groupByDbItunesExplicit() Group by the itunes_explicit column
|
||||
* @method PodcastQuery groupByDbAutoIngest() Group by the auto_ingest column
|
||||
* @method PodcastQuery groupByDbOwner() Group by the owner column
|
||||
* @method PodcastQuery groupByDbType() Group by the type column
|
||||
* @method PodcastQuery groupByDescendantClass() Group by the descendant_class column
|
||||
*
|
||||
* @method PodcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method PodcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -52,41 +50,47 @@
|
|||
* @method PodcastQuery rightJoinPodcastEpisodes($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PodcastEpisodes relation
|
||||
* @method PodcastQuery innerJoinPodcastEpisodes($relationAlias = null) Adds a INNER JOIN clause to the query using the PodcastEpisodes relation
|
||||
*
|
||||
* @method PodcastQuery leftJoinStationPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the StationPodcast relation
|
||||
* @method PodcastQuery rightJoinStationPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the StationPodcast relation
|
||||
* @method PodcastQuery innerJoinStationPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the StationPodcast relation
|
||||
*
|
||||
* @method PodcastQuery leftJoinImportedPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportedPodcast relation
|
||||
* @method PodcastQuery rightJoinImportedPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportedPodcast relation
|
||||
* @method PodcastQuery innerJoinImportedPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportedPodcast relation
|
||||
*
|
||||
* @method Podcast findOne(PropelPDO $con = null) Return the first Podcast matching the query
|
||||
* @method Podcast findOneOrCreate(PropelPDO $con = null) Return the first Podcast matching the query, or a new Podcast object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method Podcast findOneByDbUrl(string $url) Return the first Podcast filtered by the url column
|
||||
* @method Podcast findOneByDbTitle(string $title) Return the first Podcast filtered by the title column
|
||||
* @method Podcast findOneByDbCreator(string $creator) Return the first Podcast filtered by the creator column
|
||||
* @method Podcast findOneByDbDescription(string $description) Return the first Podcast filtered by the description column
|
||||
* @method Podcast findOneByDbLanguage(string $language) Return the first Podcast filtered by the language column
|
||||
* @method Podcast findOneByDbCopyright(string $copyright) Return the first Podcast filtered by the copyright column
|
||||
* @method Podcast findOneByDbLink(string $link) Return the first Podcast filtered by the link column
|
||||
* @method Podcast findOneByDbItunesAuthor(string $itunes_author) Return the first Podcast filtered by the itunes_author column
|
||||
* @method Podcast findOneByDbItunesKeywords(string $itunes_keywords) Return the first Podcast filtered by the itunes_keywords column
|
||||
* @method Podcast findOneByDbItunesSummary(string $itunes_summary) Return the first Podcast filtered by the itunes_summary column
|
||||
* @method Podcast findOneByDbItunesSubtitle(string $itunes_subtitle) Return the first Podcast filtered by the itunes_subtitle column
|
||||
* @method Podcast findOneByDbItunesCategory(string $itunes_category) Return the first Podcast filtered by the itunes_category column
|
||||
* @method Podcast findOneByDbItunesExplicit(string $itunes_explicit) Return the first Podcast filtered by the itunes_explicit column
|
||||
* @method Podcast findOneByDbAutoIngest(boolean $auto_ingest) Return the first Podcast filtered by the auto_ingest column
|
||||
* @method Podcast findOneByDbOwner(int $owner) Return the first Podcast filtered by the owner column
|
||||
* @method Podcast findOneByDbType(int $type) Return the first Podcast filtered by the type column
|
||||
* @method Podcast findOneByDescendantClass(string $descendant_class) Return the first Podcast filtered by the descendant_class column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return Podcast objects filtered by the id column
|
||||
* @method array findByDbUrl(string $url) Return Podcast objects filtered by the url column
|
||||
* @method array findByDbTitle(string $title) Return Podcast objects filtered by the title column
|
||||
* @method array findByDbCreator(string $creator) Return Podcast objects filtered by the creator column
|
||||
* @method array findByDbDescription(string $description) Return Podcast objects filtered by the description column
|
||||
* @method array findByDbLanguage(string $language) Return Podcast objects filtered by the language column
|
||||
* @method array findByDbCopyright(string $copyright) Return Podcast objects filtered by the copyright column
|
||||
* @method array findByDbLink(string $link) Return Podcast objects filtered by the link column
|
||||
* @method array findByDbItunesAuthor(string $itunes_author) Return Podcast objects filtered by the itunes_author column
|
||||
* @method array findByDbItunesKeywords(string $itunes_keywords) Return Podcast objects filtered by the itunes_keywords column
|
||||
* @method array findByDbItunesSummary(string $itunes_summary) Return Podcast objects filtered by the itunes_summary column
|
||||
* @method array findByDbItunesSubtitle(string $itunes_subtitle) Return Podcast objects filtered by the itunes_subtitle column
|
||||
* @method array findByDbItunesCategory(string $itunes_category) Return Podcast objects filtered by the itunes_category column
|
||||
* @method array findByDbItunesExplicit(string $itunes_explicit) Return Podcast objects filtered by the itunes_explicit column
|
||||
* @method array findByDbAutoIngest(boolean $auto_ingest) Return Podcast objects filtered by the auto_ingest column
|
||||
* @method array findByDbOwner(int $owner) Return Podcast objects filtered by the owner column
|
||||
* @method array findByDbType(int $type) Return Podcast objects filtered by the type column
|
||||
* @method array findByDescendantClass(string $descendant_class) Return Podcast objects filtered by the descendant_class column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -194,7 +198,7 @@ abstract class BasePodcastQuery extends ModelCriteria
|
|||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT "id", "url", "title", "creator", "description", "language", "copyright", "itunes_author", "itunes_keywords", "itunes_summary", "itunes_subtitle", "itunes_category", "itunes_explicit", "auto_ingest", "owner", "type" FROM "podcast" WHERE "id" = :p0';
|
||||
$sql = 'SELECT "id", "title", "creator", "description", "language", "copyright", "link", "itunes_author", "itunes_keywords", "itunes_summary", "itunes_subtitle", "itunes_category", "itunes_explicit", "owner", "descendant_class" FROM "podcast" WHERE "id" = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
|
@ -325,35 +329,6 @@ abstract class BasePodcastQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(PodcastPeer::ID, $dbId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the url column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbUrl('fooValue'); // WHERE url = 'fooValue'
|
||||
* $query->filterByDbUrl('%fooValue%'); // WHERE url LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbUrl The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbUrl($dbUrl = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbUrl)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbUrl)) {
|
||||
$dbUrl = str_replace('*', '%', $dbUrl);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(PodcastPeer::URL, $dbUrl, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
|
@ -499,6 +474,35 @@ abstract class BasePodcastQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(PodcastPeer::COPYRIGHT, $dbCopyright, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByDbLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbLink The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLink($dbLink = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbLink)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbLink)) {
|
||||
$dbLink = str_replace('*', '%', $dbLink);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(PodcastPeer::LINK, $dbLink, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_author column
|
||||
*
|
||||
|
@ -673,33 +677,6 @@ abstract class BasePodcastQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(PodcastPeer::ITUNES_EXPLICIT, $dbItunesExplicit, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the auto_ingest column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbAutoIngest(true); // WHERE auto_ingest = true
|
||||
* $query->filterByDbAutoIngest('yes'); // WHERE auto_ingest = true
|
||||
* </code>
|
||||
*
|
||||
* @param boolean|string $dbAutoIngest The value to use as filter.
|
||||
* Non-boolean arguments are converted using the following rules:
|
||||
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
|
||||
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
|
||||
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbAutoIngest($dbAutoIngest = null, $comparison = null)
|
||||
{
|
||||
if (is_string($dbAutoIngest)) {
|
||||
$dbAutoIngest = in_array(strtolower($dbAutoIngest), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(PodcastPeer::AUTO_INGEST, $dbAutoIngest, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the owner column
|
||||
*
|
||||
|
@ -745,45 +722,32 @@ abstract class BasePodcastQuery extends ModelCriteria
|
|||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the type column
|
||||
* Filter the query on the descendant_class column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbType(1234); // WHERE type = 1234
|
||||
* $query->filterByDbType(array(12, 34)); // WHERE type IN (12, 34)
|
||||
* $query->filterByDbType(array('min' => 12)); // WHERE type >= 12
|
||||
* $query->filterByDbType(array('max' => 12)); // WHERE type <= 12
|
||||
* $query->filterByDescendantClass('fooValue'); // WHERE descendant_class = 'fooValue'
|
||||
* $query->filterByDescendantClass('%fooValue%'); // WHERE descendant_class LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $dbType The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $descendantClass The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbType($dbType = null, $comparison = null)
|
||||
public function filterByDescendantClass($descendantClass = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbType)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbType['min'])) {
|
||||
$this->addUsingAlias(PodcastPeer::TYPE, $dbType['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbType['max'])) {
|
||||
$this->addUsingAlias(PodcastPeer::TYPE, $dbType['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
if (null === $comparison) {
|
||||
if (is_array($descendantClass)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $descendantClass)) {
|
||||
$descendantClass = str_replace('*', '%', $descendantClass);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(PodcastPeer::TYPE, $dbType, $comparison);
|
||||
return $this->addUsingAlias(PodcastPeer::DESCENDANT_CLASS, $descendantClass, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -936,6 +900,154 @@ abstract class BasePodcastQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'PodcastEpisodes', 'PodcastEpisodesQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related StationPodcast object
|
||||
*
|
||||
* @param StationPodcast|PropelObjectCollection $stationPodcast the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByStationPodcast($stationPodcast, $comparison = null)
|
||||
{
|
||||
if ($stationPodcast instanceof StationPodcast) {
|
||||
return $this
|
||||
->addUsingAlias(PodcastPeer::ID, $stationPodcast->getDbId(), $comparison);
|
||||
} elseif ($stationPodcast instanceof PropelObjectCollection) {
|
||||
return $this
|
||||
->useStationPodcastQuery()
|
||||
->filterByPrimaryKeys($stationPodcast->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByStationPodcast() only accepts arguments of type StationPodcast or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the StationPodcast relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinStationPodcast($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('StationPodcast');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'StationPodcast');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the StationPodcast relation StationPodcast object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return StationPodcastQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useStationPodcastQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinStationPodcast($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'StationPodcast', 'StationPodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related ImportedPodcast object
|
||||
*
|
||||
* @param ImportedPodcast|PropelObjectCollection $importedPodcast the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByImportedPodcast($importedPodcast, $comparison = null)
|
||||
{
|
||||
if ($importedPodcast instanceof ImportedPodcast) {
|
||||
return $this
|
||||
->addUsingAlias(PodcastPeer::ID, $importedPodcast->getDbId(), $comparison);
|
||||
} elseif ($importedPodcast instanceof PropelObjectCollection) {
|
||||
return $this
|
||||
->useImportedPodcastQuery()
|
||||
->filterByPrimaryKeys($importedPodcast->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByImportedPodcast() only accepts arguments of type ImportedPodcast or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportedPodcast relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return PodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportedPodcast($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportedPodcast');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportedPodcast');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportedPodcast relation ImportedPodcast object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ImportedPodcastQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportedPodcastQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinImportedPodcast($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportedPodcast', 'ImportedPodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
1751
airtime_mvc/application/models/airtime/om/BaseStationPodcast.php
Normal file
1751
airtime_mvc/application/models/airtime/om/BaseStationPodcast.php
Normal file
File diff suppressed because it is too large
Load diff
1449
airtime_mvc/application/models/airtime/om/BaseStationPodcastPeer.php
Normal file
1449
airtime_mvc/application/models/airtime/om/BaseStationPodcastPeer.php
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,882 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'station_podcast' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method StationPodcastQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method StationPodcastQuery orderByDbTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method StationPodcastQuery orderByDbCreator($order = Criteria::ASC) Order by the creator column
|
||||
* @method StationPodcastQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method StationPodcastQuery orderByDbLanguage($order = Criteria::ASC) Order by the language column
|
||||
* @method StationPodcastQuery orderByDbCopyright($order = Criteria::ASC) Order by the copyright column
|
||||
* @method StationPodcastQuery orderByDbLink($order = Criteria::ASC) Order by the link column
|
||||
* @method StationPodcastQuery orderByDbItunesAuthor($order = Criteria::ASC) Order by the itunes_author column
|
||||
* @method StationPodcastQuery orderByDbItunesKeywords($order = Criteria::ASC) Order by the itunes_keywords column
|
||||
* @method StationPodcastQuery orderByDbItunesSummary($order = Criteria::ASC) Order by the itunes_summary column
|
||||
* @method StationPodcastQuery orderByDbItunesSubtitle($order = Criteria::ASC) Order by the itunes_subtitle column
|
||||
* @method StationPodcastQuery orderByDbItunesCategory($order = Criteria::ASC) Order by the itunes_category column
|
||||
* @method StationPodcastQuery orderByDbItunesExplicit($order = Criteria::ASC) Order by the itunes_explicit column
|
||||
* @method StationPodcastQuery orderByDbOwner($order = Criteria::ASC) Order by the owner column
|
||||
*
|
||||
* @method StationPodcastQuery groupByDbId() Group by the id column
|
||||
* @method StationPodcastQuery groupByDbTitle() Group by the title column
|
||||
* @method StationPodcastQuery groupByDbCreator() Group by the creator column
|
||||
* @method StationPodcastQuery groupByDbDescription() Group by the description column
|
||||
* @method StationPodcastQuery groupByDbLanguage() Group by the language column
|
||||
* @method StationPodcastQuery groupByDbCopyright() Group by the copyright column
|
||||
* @method StationPodcastQuery groupByDbLink() Group by the link column
|
||||
* @method StationPodcastQuery groupByDbItunesAuthor() Group by the itunes_author column
|
||||
* @method StationPodcastQuery groupByDbItunesKeywords() Group by the itunes_keywords column
|
||||
* @method StationPodcastQuery groupByDbItunesSummary() Group by the itunes_summary column
|
||||
* @method StationPodcastQuery groupByDbItunesSubtitle() Group by the itunes_subtitle column
|
||||
* @method StationPodcastQuery groupByDbItunesCategory() Group by the itunes_category column
|
||||
* @method StationPodcastQuery groupByDbItunesExplicit() Group by the itunes_explicit column
|
||||
* @method StationPodcastQuery groupByDbOwner() Group by the owner column
|
||||
*
|
||||
* @method StationPodcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method StationPodcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method StationPodcastQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method StationPodcastQuery leftJoinPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the Podcast relation
|
||||
* @method StationPodcastQuery rightJoinPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Podcast relation
|
||||
* @method StationPodcastQuery innerJoinPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the Podcast relation
|
||||
*
|
||||
* @method StationPodcastQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
|
||||
* @method StationPodcastQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
|
||||
* @method StationPodcastQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
|
||||
*
|
||||
* @method StationPodcast findOne(PropelPDO $con = null) Return the first StationPodcast matching the query
|
||||
* @method StationPodcast findOneOrCreate(PropelPDO $con = null) Return the first StationPodcast matching the query, or a new StationPodcast object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method StationPodcast findOneByDbTitle(string $title) Return the first StationPodcast filtered by the title column
|
||||
* @method StationPodcast findOneByDbCreator(string $creator) Return the first StationPodcast filtered by the creator column
|
||||
* @method StationPodcast findOneByDbDescription(string $description) Return the first StationPodcast filtered by the description column
|
||||
* @method StationPodcast findOneByDbLanguage(string $language) Return the first StationPodcast filtered by the language column
|
||||
* @method StationPodcast findOneByDbCopyright(string $copyright) Return the first StationPodcast filtered by the copyright column
|
||||
* @method StationPodcast findOneByDbLink(string $link) Return the first StationPodcast filtered by the link column
|
||||
* @method StationPodcast findOneByDbItunesAuthor(string $itunes_author) Return the first StationPodcast filtered by the itunes_author column
|
||||
* @method StationPodcast findOneByDbItunesKeywords(string $itunes_keywords) Return the first StationPodcast filtered by the itunes_keywords column
|
||||
* @method StationPodcast findOneByDbItunesSummary(string $itunes_summary) Return the first StationPodcast filtered by the itunes_summary column
|
||||
* @method StationPodcast findOneByDbItunesSubtitle(string $itunes_subtitle) Return the first StationPodcast filtered by the itunes_subtitle column
|
||||
* @method StationPodcast findOneByDbItunesCategory(string $itunes_category) Return the first StationPodcast filtered by the itunes_category column
|
||||
* @method StationPodcast findOneByDbItunesExplicit(string $itunes_explicit) Return the first StationPodcast filtered by the itunes_explicit column
|
||||
* @method StationPodcast findOneByDbOwner(int $owner) Return the first StationPodcast filtered by the owner column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return StationPodcast objects filtered by the id column
|
||||
* @method array findByDbTitle(string $title) Return StationPodcast objects filtered by the title column
|
||||
* @method array findByDbCreator(string $creator) Return StationPodcast objects filtered by the creator column
|
||||
* @method array findByDbDescription(string $description) Return StationPodcast objects filtered by the description column
|
||||
* @method array findByDbLanguage(string $language) Return StationPodcast objects filtered by the language column
|
||||
* @method array findByDbCopyright(string $copyright) Return StationPodcast objects filtered by the copyright column
|
||||
* @method array findByDbLink(string $link) Return StationPodcast objects filtered by the link column
|
||||
* @method array findByDbItunesAuthor(string $itunes_author) Return StationPodcast objects filtered by the itunes_author column
|
||||
* @method array findByDbItunesKeywords(string $itunes_keywords) Return StationPodcast objects filtered by the itunes_keywords column
|
||||
* @method array findByDbItunesSummary(string $itunes_summary) Return StationPodcast objects filtered by the itunes_summary column
|
||||
* @method array findByDbItunesSubtitle(string $itunes_subtitle) Return StationPodcast objects filtered by the itunes_subtitle column
|
||||
* @method array findByDbItunesCategory(string $itunes_category) Return StationPodcast objects filtered by the itunes_category column
|
||||
* @method array findByDbItunesExplicit(string $itunes_explicit) Return StationPodcast objects filtered by the itunes_explicit column
|
||||
* @method array findByDbOwner(int $owner) Return StationPodcast objects filtered by the owner column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
abstract class BaseStationPodcastQuery extends PodcastQuery
|
||||
{
|
||||
/**
|
||||
* Initializes internal state of BaseStationPodcastQuery object.
|
||||
*
|
||||
* @param string $dbName The dabase name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
|
||||
{
|
||||
if (null === $dbName) {
|
||||
$dbName = 'airtime';
|
||||
}
|
||||
if (null === $modelName) {
|
||||
$modelName = 'StationPodcast';
|
||||
}
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new StationPodcastQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param StationPodcastQuery|Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return StationPodcastQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof StationPodcastQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new StationPodcastQuery(null, null, $modelAlias);
|
||||
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con an optional connection object
|
||||
*
|
||||
* @return StationPodcast|StationPodcast[]|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = StationPodcastPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(StationPodcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias of findPk to use instance pooling
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return StationPodcast A model object, or null if the key is not found
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function findOneByDbId($key, $con = null)
|
||||
{
|
||||
return $this->findPk($key, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return StationPodcast A model object, or null if the key is not found
|
||||
* @throws PropelException
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT "id", "title", "creator", "description", "language", "copyright", "link", "itunes_author", "itunes_keywords", "itunes_summary", "itunes_subtitle", "itunes_category", "itunes_explicit", "owner" FROM "station_podcast" WHERE "id" = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$obj = new StationPodcast();
|
||||
$obj->hydrate($row);
|
||||
StationPodcastPeer::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return StationPodcast|StationPodcast[]|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$stmt = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param PropelPDO $con an optional connection object
|
||||
*
|
||||
* @return PropelObjectCollection|StationPodcast[]|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$stmt = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($stmt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbId(1234); // WHERE id = 1234
|
||||
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
|
||||
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByPodcast()
|
||||
*
|
||||
* @param mixed $dbId The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbId($dbId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbId['min'])) {
|
||||
$this->addUsingAlias(StationPodcastPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbId['max'])) {
|
||||
$this->addUsingAlias(StationPodcastPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ID, $dbId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByDbTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbTitle The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbTitle($dbTitle = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbTitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbTitle)) {
|
||||
$dbTitle = str_replace('*', '%', $dbTitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::TITLE, $dbTitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the creator column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbCreator('fooValue'); // WHERE creator = 'fooValue'
|
||||
* $query->filterByDbCreator('%fooValue%'); // WHERE creator LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbCreator The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCreator($dbCreator = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCreator)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCreator)) {
|
||||
$dbCreator = str_replace('*', '%', $dbCreator);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::CREATOR, $dbCreator, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbDescription('fooValue'); // WHERE description = 'fooValue'
|
||||
* $query->filterByDbDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbDescription The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbDescription($dbDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbDescription)) {
|
||||
$dbDescription = str_replace('*', '%', $dbDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::DESCRIPTION, $dbDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the language column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbLanguage('fooValue'); // WHERE language = 'fooValue'
|
||||
* $query->filterByDbLanguage('%fooValue%'); // WHERE language LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbLanguage The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLanguage($dbLanguage = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbLanguage)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbLanguage)) {
|
||||
$dbLanguage = str_replace('*', '%', $dbLanguage);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::LANGUAGE, $dbLanguage, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the copyright column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbCopyright('fooValue'); // WHERE copyright = 'fooValue'
|
||||
* $query->filterByDbCopyright('%fooValue%'); // WHERE copyright LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbCopyright The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCopyright($dbCopyright = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCopyright)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCopyright)) {
|
||||
$dbCopyright = str_replace('*', '%', $dbCopyright);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::COPYRIGHT, $dbCopyright, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the link column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbLink('fooValue'); // WHERE link = 'fooValue'
|
||||
* $query->filterByDbLink('%fooValue%'); // WHERE link LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbLink The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLink($dbLink = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbLink)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbLink)) {
|
||||
$dbLink = str_replace('*', '%', $dbLink);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::LINK, $dbLink, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_author column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesAuthor('fooValue'); // WHERE itunes_author = 'fooValue'
|
||||
* $query->filterByDbItunesAuthor('%fooValue%'); // WHERE itunes_author LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesAuthor The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesAuthor($dbItunesAuthor = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesAuthor)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesAuthor)) {
|
||||
$dbItunesAuthor = str_replace('*', '%', $dbItunesAuthor);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ITUNES_AUTHOR, $dbItunesAuthor, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_keywords column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesKeywords('fooValue'); // WHERE itunes_keywords = 'fooValue'
|
||||
* $query->filterByDbItunesKeywords('%fooValue%'); // WHERE itunes_keywords LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesKeywords The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesKeywords($dbItunesKeywords = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesKeywords)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesKeywords)) {
|
||||
$dbItunesKeywords = str_replace('*', '%', $dbItunesKeywords);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ITUNES_KEYWORDS, $dbItunesKeywords, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_summary column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesSummary('fooValue'); // WHERE itunes_summary = 'fooValue'
|
||||
* $query->filterByDbItunesSummary('%fooValue%'); // WHERE itunes_summary LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesSummary The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesSummary($dbItunesSummary = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesSummary)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesSummary)) {
|
||||
$dbItunesSummary = str_replace('*', '%', $dbItunesSummary);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ITUNES_SUMMARY, $dbItunesSummary, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_subtitle column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesSubtitle('fooValue'); // WHERE itunes_subtitle = 'fooValue'
|
||||
* $query->filterByDbItunesSubtitle('%fooValue%'); // WHERE itunes_subtitle LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesSubtitle The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesSubtitle($dbItunesSubtitle = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesSubtitle)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesSubtitle)) {
|
||||
$dbItunesSubtitle = str_replace('*', '%', $dbItunesSubtitle);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ITUNES_SUBTITLE, $dbItunesSubtitle, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_category column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesCategory('fooValue'); // WHERE itunes_category = 'fooValue'
|
||||
* $query->filterByDbItunesCategory('%fooValue%'); // WHERE itunes_category LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesCategory The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesCategory($dbItunesCategory = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesCategory)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesCategory)) {
|
||||
$dbItunesCategory = str_replace('*', '%', $dbItunesCategory);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ITUNES_CATEGORY, $dbItunesCategory, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the itunes_explicit column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbItunesExplicit('fooValue'); // WHERE itunes_explicit = 'fooValue'
|
||||
* $query->filterByDbItunesExplicit('%fooValue%'); // WHERE itunes_explicit LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $dbItunesExplicit The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbItunesExplicit($dbItunesExplicit = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbItunesExplicit)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbItunesExplicit)) {
|
||||
$dbItunesExplicit = str_replace('*', '%', $dbItunesExplicit);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::ITUNES_EXPLICIT, $dbItunesExplicit, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the owner column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDbOwner(1234); // WHERE owner = 1234
|
||||
* $query->filterByDbOwner(array(12, 34)); // WHERE owner IN (12, 34)
|
||||
* $query->filterByDbOwner(array('min' => 12)); // WHERE owner >= 12
|
||||
* $query->filterByDbOwner(array('max' => 12)); // WHERE owner <= 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByCcSubjs()
|
||||
*
|
||||
* @param mixed $dbOwner The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbOwner($dbOwner = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbOwner)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbOwner['min'])) {
|
||||
$this->addUsingAlias(StationPodcastPeer::OWNER, $dbOwner['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbOwner['max'])) {
|
||||
$this->addUsingAlias(StationPodcastPeer::OWNER, $dbOwner['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(StationPodcastPeer::OWNER, $dbOwner, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related Podcast object
|
||||
*
|
||||
* @param Podcast|PropelObjectCollection $podcast The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByPodcast($podcast, $comparison = null)
|
||||
{
|
||||
if ($podcast instanceof Podcast) {
|
||||
return $this
|
||||
->addUsingAlias(StationPodcastPeer::ID, $podcast->getDbId(), $comparison);
|
||||
} elseif ($podcast instanceof PropelObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(StationPodcastPeer::ID, $podcast->toKeyValue('PrimaryKey', 'DbId'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByPodcast() only accepts arguments of type Podcast or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Podcast relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinPodcast($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Podcast');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Podcast');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Podcast relation Podcast object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return PodcastQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function usePodcastQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinPodcast($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Podcast', 'PodcastQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcSubjs object
|
||||
*
|
||||
* @param CcSubjs|PropelObjectCollection $ccSubjs The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
* @throws PropelException - if the provided filter is invalid.
|
||||
*/
|
||||
public function filterByCcSubjs($ccSubjs, $comparison = null)
|
||||
{
|
||||
if ($ccSubjs instanceof CcSubjs) {
|
||||
return $this
|
||||
->addUsingAlias(StationPodcastPeer::OWNER, $ccSubjs->getDbId(), $comparison);
|
||||
} elseif ($ccSubjs instanceof PropelObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(StationPodcastPeer::OWNER, $ccSubjs->toKeyValue('PrimaryKey', 'DbId'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByCcSubjs() only accepts arguments of type CcSubjs or PropelCollection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcSubjs relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcSubjs($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcSubjs');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcSubjs');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcSubjs relation CcSubjs object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcSubjsQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcSubjs($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param StationPodcast $stationPodcast Object to remove from the list of results
|
||||
*
|
||||
* @return StationPodcastQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($stationPodcast = null)
|
||||
{
|
||||
if ($stationPodcast) {
|
||||
$this->addUsingAlias(StationPodcastPeer::ID, $stationPodcast->getDbId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
|
@ -81,7 +81,7 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
|||
}
|
||||
|
||||
try {
|
||||
// $requestData = json_decode($this->getRequest()->getRawBody(), true);
|
||||
//$requestData = json_decode($this->getRequest()->getRawBody(), true);
|
||||
$requestData = $this->getRequest()->getPost();
|
||||
$podcast = Podcast::create($requestData);
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ class Rest_PodcastEpisodesController extends Zend_Rest_Controller
|
|||
}
|
||||
|
||||
try {
|
||||
//$requestData = json_decode($this->getRequest()->getRawBody(), true);
|
||||
$requestData = $this->getRequest()->getPost();
|
||||
$requestData = json_decode($this->getRequest()->getRawBody(), true);
|
||||
//$requestData = $this->getRequest()->getPost();
|
||||
|
||||
$episode = PodcastEpisodes::create($id, $requestData);
|
||||
|
||||
|
@ -125,7 +125,7 @@ class Rest_PodcastEpisodesController extends Zend_Rest_Controller
|
|||
|
||||
public function putAction()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function getId()
|
||||
|
|
|
@ -61,9 +61,101 @@ class Application_Service_PodcastService extends Application_Service_ThirdPartyC
|
|||
}
|
||||
}
|
||||
|
||||
public static function getPodcastEpisodeFeed($podcast)
|
||||
public static function createStationRssFeed()
|
||||
{
|
||||
//TODO: get station feed podcast ID
|
||||
|
||||
//hack
|
||||
$id = 1;
|
||||
try {
|
||||
$podcast = PodcastQuery::create()->findPk($id);
|
||||
if (!$podcast) {
|
||||
throw new PodcastNotFoundException();
|
||||
}
|
||||
|
||||
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"/>');
|
||||
|
||||
$channel = $xml->addChild("channel");
|
||||
$channel->addChild("title", $podcast->getDbTitle());
|
||||
$channel->addChild("link", $podcast->getDbLink());
|
||||
$channel->addChild("description", $podcast->getDbDescription());
|
||||
$channel->addChild("language", $podcast->getDbLanguage());
|
||||
$channel->addChild("copyright", $podcast->getDbCopyright());
|
||||
|
||||
$imageUrl = Application_Common_HTTPHelper::getStationUrl()."images/airtime_logo.png";
|
||||
$image = $channel->addChild("image");
|
||||
$image->addChild("title", "image title");
|
||||
$image->addChild("url", $imageUrl);
|
||||
$image->addChild("link", Application_Common_HTTPHelper::getStationUrl());
|
||||
|
||||
$xml->addAttribute('xmlns:xmlns:itunes', ITUNES_XML_NAMESPACE_URL);
|
||||
$channel->addChild("xmlns:itunes:author", $podcast->getDbItunesAuthor());
|
||||
$channel->addChild("xmlns:itunes:keywords", $podcast->getDbItunesKeywords());
|
||||
$channel->addChild("xmlns:itunes:summary", $podcast->getDbItunesSummary());
|
||||
$channel->addChild("xmlns:itunes:subtitle", $podcast->getDbItunesSubtitle());
|
||||
$channel->addChild("xmlns:itunes:explicit", $podcast->getDbItunesExplicit());
|
||||
|
||||
$itunesImage = $channel->addChild("xmlns:itunes:image");
|
||||
$itunesImage->addAttribute("href", $imageUrl);
|
||||
|
||||
// Need to split categories into separate tags
|
||||
$itunesCategories = explode(",", $podcast->getDbItunesCategory());
|
||||
foreach ($itunesCategories as $c) {
|
||||
$category = $channel->addChild("xmlns:itunes:category");
|
||||
$category->addAttribute("text", $c);
|
||||
}
|
||||
|
||||
$episodes = PodcastEpisodesQuery::create()->filterByDbPodcastId($id)->find();
|
||||
foreach ($episodes as $episode) {
|
||||
$item = $channel->addChild("item");
|
||||
$publishedFile = CcFilesQuery::create()->findPk($episode->getDbFileId());
|
||||
|
||||
//title
|
||||
$item->addChild("title", $publishedFile->getDbTrackTitle());
|
||||
|
||||
//link - do we need this?
|
||||
|
||||
//pubDate
|
||||
$item->addChild("pubDate", $episode->getDbPublicationDate());
|
||||
|
||||
//category
|
||||
foreach($itunesCategories as $c) {
|
||||
$item->addChild("category", $c);
|
||||
}
|
||||
|
||||
//guid
|
||||
$guid = $item->addChild("guid", $episode->getDbEpisodeGuid());
|
||||
$guid->addAttribute("isPermaLink", "false");
|
||||
|
||||
//description
|
||||
$item->addChild("description", $publishedFile->getDbDescription());
|
||||
|
||||
//encolsure - url, length, type attribs
|
||||
$enclosure = $item->addChild("enclosure");
|
||||
$enclosure->addAttribute("url", $episode->getDbDownloadUrl());
|
||||
$enclosure->addAttribute("length", Application_Common_DateHelper::calculateLengthInSeconds($publishedFile->getDbLength()));
|
||||
$enclosure->addAttribute("type", $publishedFile->getDbMime());
|
||||
|
||||
//itunes:subtitle
|
||||
$item->addChild("xmlns:itunes:subtitle", $publishedFile->getDbTrackTitle());
|
||||
|
||||
//itunes:summary
|
||||
$item->addChild("xmlns:itunes:summary", $publishedFile->getDbDescription());
|
||||
|
||||
//itunes:author
|
||||
$item->addChild("xmlns:itunes:author", $publishedFile->getDbArtistName());
|
||||
|
||||
//itunes:explicit - skip this?
|
||||
|
||||
//itunes:duration
|
||||
$item->addChild("xmlns:itunes:duration", $publishedFile->getDbLength());
|
||||
}
|
||||
|
||||
return $xml->asXML();
|
||||
|
||||
} catch (FeedException $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -563,28 +563,40 @@
|
|||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<table name="podcast" phpName="Podcast">
|
||||
<table name="podcast" phpName="Podcast" abstract="true">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="url" phpName="DbUrl" type="VARCHAR" size="4096" required="true" />
|
||||
<column name="title" phpName="DbTitle" type="VARCHAR" size="4096" required="true" />
|
||||
<column name="creator" phpName="DbCreator" type="VARCHAR" size="4096" />
|
||||
<column name="description" phpName="DbDescription" type="VARCHAR" size="4096" />
|
||||
<column name="language" phpName="DbLanguage" type="VARCHAR" size="4096" />
|
||||
<column name="copyright" phpName="DbCopyright" type="VARCHAR" size="4096" />
|
||||
<column name="link" phpName="DbLink" type="VARCHAR" size="4096" />
|
||||
<column name="itunes_author" phpName="DbItunesAuthor" type="VARCHAR" size="4096" />
|
||||
<column name="itunes_keywords" phpName="DbItunesKeywords" type="VARCHAR" size="4096" />
|
||||
<column name="itunes_summary" phpName="DbItunesSummary" type="VARCHAR" size="4096" />
|
||||
<column name="itunes_subtitle" phpName="DbItunesSubtitle" type="VARCHAR" size="4096" />
|
||||
<column name="itunes_category" phpName="DbItunesCategory" type="VARCHAR" size="4096" />
|
||||
<column name="itunes_explicit" phpName="DbItunesExplicit" type="VARCHAR" size="4096" />
|
||||
<column name="auto_ingest" phpName="DbAutoIngest" type="BOOLEAN" required="true" defaultValue="false"/>
|
||||
<column name="owner" phpName="DbOwner" type="INTEGER" />
|
||||
<column name="type" phpName="DbType" type="INTEGER" required="true" defaultValue="1"/>
|
||||
<foreign-key foreignTable="cc_subjs" name="podcast_owner_fkey" onDelete="CASCADE">
|
||||
<reference local="owner" foreign="id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<table name="station_podcast" phpName="StationPodcast">
|
||||
<behavior name="concrete_inheritance">
|
||||
<parameter name="extends" value="podcast" />
|
||||
</behavior>
|
||||
</table>
|
||||
|
||||
<table name="imported_podcast" phpName="ImportedPodcast">
|
||||
<column name="url" phpName="DbUrl" type="VARCHAR" size="4096" required="true" />
|
||||
<column name="auto_ingest" phpName="DbAutoIngest" type="BOOLEAN" required="true" defaultValue="false"/>
|
||||
<behavior name="concrete_inheritance">
|
||||
<parameter name="extends" value="podcast" />
|
||||
</behavior>
|
||||
</table>
|
||||
|
||||
<table name="podcast_episodes" phpName="PodcastEpisodes">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="file_id" phpName="DbFileId" type="INTEGER" />
|
||||
|
|
|
@ -716,21 +716,72 @@ DROP TABLE IF EXISTS "podcast" CASCADE;
|
|||
CREATE TABLE "podcast"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"url" VARCHAR(4096) NOT NULL,
|
||||
"title" VARCHAR(4096) NOT NULL,
|
||||
"creator" VARCHAR(4096),
|
||||
"description" VARCHAR(4096),
|
||||
"language" VARCHAR(4096),
|
||||
"copyright" VARCHAR(4096),
|
||||
"link" VARCHAR(4096),
|
||||
"itunes_author" VARCHAR(4096),
|
||||
"itunes_keywords" VARCHAR(4096),
|
||||
"itunes_summary" VARCHAR(4096),
|
||||
"itunes_subtitle" VARCHAR(4096),
|
||||
"itunes_category" VARCHAR(4096),
|
||||
"itunes_explicit" VARCHAR(4096),
|
||||
"owner" INTEGER,
|
||||
"descendant_class" VARCHAR(100),
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- station_podcast
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS "station_podcast" CASCADE;
|
||||
|
||||
CREATE TABLE "station_podcast"
|
||||
(
|
||||
"id" INTEGER NOT NULL,
|
||||
"title" VARCHAR(4096) NOT NULL,
|
||||
"creator" VARCHAR(4096),
|
||||
"description" VARCHAR(4096),
|
||||
"language" VARCHAR(4096),
|
||||
"copyright" VARCHAR(4096),
|
||||
"link" VARCHAR(4096),
|
||||
"itunes_author" VARCHAR(4096),
|
||||
"itunes_keywords" VARCHAR(4096),
|
||||
"itunes_summary" VARCHAR(4096),
|
||||
"itunes_subtitle" VARCHAR(4096),
|
||||
"itunes_category" VARCHAR(4096),
|
||||
"itunes_explicit" VARCHAR(4096),
|
||||
"owner" INTEGER,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- imported_podcast
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS "imported_podcast" CASCADE;
|
||||
|
||||
CREATE TABLE "imported_podcast"
|
||||
(
|
||||
"url" VARCHAR(4096) NOT NULL,
|
||||
"auto_ingest" BOOLEAN DEFAULT 'f' NOT NULL,
|
||||
"id" INTEGER NOT NULL,
|
||||
"title" VARCHAR(4096) NOT NULL,
|
||||
"creator" VARCHAR(4096),
|
||||
"description" VARCHAR(4096),
|
||||
"language" VARCHAR(4096),
|
||||
"copyright" VARCHAR(4096),
|
||||
"link" VARCHAR(4096),
|
||||
"itunes_author" VARCHAR(4096),
|
||||
"itunes_keywords" VARCHAR(4096),
|
||||
"itunes_summary" VARCHAR(4096),
|
||||
"itunes_subtitle" VARCHAR(4096),
|
||||
"itunes_category" VARCHAR(4096),
|
||||
"itunes_explicit" VARCHAR(4096),
|
||||
"auto_ingest" BOOLEAN DEFAULT 'f' NOT NULL,
|
||||
"owner" INTEGER,
|
||||
"type" INTEGER DEFAULT 1 NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -928,6 +979,26 @@ ALTER TABLE "podcast" ADD CONSTRAINT "podcast_owner_fkey"
|
|||
REFERENCES "cc_subjs" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "station_podcast" ADD CONSTRAINT "station_podcast_FK_1"
|
||||
FOREIGN KEY ("id")
|
||||
REFERENCES "podcast" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "station_podcast" ADD CONSTRAINT "station_podcast_FK_2"
|
||||
FOREIGN KEY ("owner")
|
||||
REFERENCES "cc_subjs" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "imported_podcast" ADD CONSTRAINT "imported_podcast_FK_1"
|
||||
FOREIGN KEY ("id")
|
||||
REFERENCES "podcast" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "imported_podcast" ADD CONSTRAINT "imported_podcast_FK_2"
|
||||
FOREIGN KEY ("owner")
|
||||
REFERENCES "cc_subjs" ("id")
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "podcast_episodes" ADD CONSTRAINT "podcast_episodes_cc_files_fkey"
|
||||
FOREIGN KEY ("file_id")
|
||||
REFERENCES "cc_files" ("id")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue