diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index 8bf8d58aa..f3bf8f561 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -28,7 +28,6 @@ $CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC); date_default_timezone_set(Application_Model_Preference::GetTimezone()); Logging::setLogPath('/var/log/airtime/zendphp.log'); -Logging::log("bootstrap"); Zend_Validate::setDefaultNamespaces("Zend"); @@ -67,7 +66,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js','text/javascript'); $view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip2.min.js','text/javascript'); $view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js'); - + $view->headScript()->appendScript("var baseUrl='$baseUrl/'"); //scripts for now playing bar $view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/helperfunctions.js','text/javascript'); diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php index 859567e15..ef3b99a4b 100644 --- a/airtime_mvc/application/configs/classmap-airtime-conf.php +++ b/airtime_mvc/application/configs/classmap-airtime-conf.php @@ -134,11 +134,11 @@ return array ( 'BaseCcLoginAttemptsPeer' => 'airtime/om/BaseCcLoginAttemptsPeer.php', 'BaseCcLoginAttempts' => 'airtime/om/BaseCcLoginAttempts.php', 'BaseCcLoginAttemptsQuery' => 'airtime/om/BaseCcLoginAttemptsQuery.php', - 'CcComponentTableMap' => 'airtime/map/CcComponentTableMap.php', - 'CcComponentPeer' => 'airtime/CcComponentPeer.php', - 'CcComponent' => 'airtime/CcComponent.php', - 'CcComponentQuery' => 'airtime/CcComponentQuery.php', - 'BaseCcComponentPeer' => 'airtime/om/BaseCcComponentPeer.php', - 'BaseCcComponent' => 'airtime/om/BaseCcComponent.php', - 'BaseCcComponentQuery' => 'airtime/om/BaseCcComponentQuery.php', + 'CcServiceRegisterTableMap' => 'airtime/map/CcServiceRegisterTableMap.php', + 'CcServiceRegisterPeer' => 'airtime/CcServiceRegisterPeer.php', + 'CcServiceRegister' => 'airtime/CcServiceRegister.php', + 'CcServiceRegisterQuery' => 'airtime/CcServiceRegisterQuery.php', + 'BaseCcServiceRegisterPeer' => 'airtime/om/BaseCcServiceRegisterPeer.php', + 'BaseCcServiceRegister' => 'airtime/om/BaseCcServiceRegister.php', + 'BaseCcServiceRegisterQuery' => 'airtime/om/BaseCcServiceRegisterQuery.php', ); \ No newline at end of file diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 2795ee987..25db6011b 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -78,10 +78,10 @@ class PreferenceController extends Zend_Controller_Action Application_Model_Preference::SetStationWebSite($values["StationWebSite"]); Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]); Application_Model_Preference::SetPublicise($values["Publicise"]); - + $form->Logo->receive(); $imagePath = $form->Logo->getFileName(); - + Application_Model_Preference::SetStationCountry($values["Country"]); Application_Model_Preference::SetStationCity($values["City"]); Application_Model_Preference::SetStationDescription($values["Description"]); @@ -105,36 +105,36 @@ class PreferenceController extends Zend_Controller_Action $this->view->form = $form; //$form->render($this->view); } - + public function directoryConfigAction() { if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ $request = $this->getRequest(); $baseUrl = $request->getBaseUrl(); - + $this->view->headScript()->appendFile($baseUrl.'/js/serverbrowse/serverbrowser.js','text/javascript'); $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/musicdirs.js','text/javascript'); - + $watched_dirs_pref = new Application_Form_WatchedDirPreferences(); - + $this->view->form = $watched_dirs_pref; } } - + public function streamSettingAction() { $request = $this->getRequest(); $baseUrl = $request->getBaseUrl(); - + $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/streamsetting.js','text/javascript'); - + // get current settings $temp = Application_Model_StreamSetting::getStreamSetting(); $setting = array(); foreach ($temp as $t){ $setting[$t['keyname']] = $t['value']; } - + // get predefined type and bitrate from pref table $temp_types = Application_Model_Preference::GetStreamType(); $stream_types = array(); @@ -146,7 +146,7 @@ class PreferenceController extends Zend_Controller_Action } $stream_types[trim($type)] = $temp; } - + $temp_bitrate = Application_Model_Preference::GetStreamBitrate(); $max_bitrate = intval(Application_Model_Preference::GetMaxBitrate()); $stream_bitrates = array(); @@ -155,7 +155,7 @@ class PreferenceController extends Zend_Controller_Action $stream_bitrates[trim($type)] = strtoupper(trim($type))." Kbit/s"; } } - + $num_of_stream = intval(Application_Model_Preference::GetNumOfStreams()); $form = new Application_Form_StreamSetting(); $form->setSetting($setting); @@ -195,7 +195,7 @@ class PreferenceController extends Zend_Controller_Action } } $this->view->num_stream = $num_of_stream; - $this->view->disable_stream_conf = Application_Model_Preference::GetDisableStreamConf(); + $this->view->enable_stream_conf = Application_Model_Preference::GetEnableStreamConf(); $this->view->form = $form; } @@ -275,7 +275,7 @@ class PreferenceController extends Zend_Controller_Action $watched_dirs_form = new Application_Form_WatchedDirPreferences(); $this->view->subform = $watched_dirs_form->render(); } - + public function isImportInProgressAction(){ $now = time(); $res = false; diff --git a/airtime_mvc/application/forms/StreamSetting.php b/airtime_mvc/application/forms/StreamSetting.php index 746215b11..cb7735cb5 100644 --- a/airtime_mvc/application/forms/StreamSetting.php +++ b/airtime_mvc/application/forms/StreamSetting.php @@ -3,29 +3,29 @@ class Application_Form_StreamSetting extends Zend_Form { private $setting; - + public function init() { - + } - + public function setSetting($setting){ $this->setting = $setting; } - - public function startFrom(){ + + public function startFrom() { $setting = $this->setting; $output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device'); $output_sound_device->setLabel('Enabled') ->setRequired(false) ->setValue(($setting['output_sound_device'] == "true")?1:0) ->setDecorators(array('ViewHelper')); - if(Application_Model_Preference::GetDisableStreamConf() == "true"){ + if (Application_Model_Preference::GetEnableStreamConf() == "false"){ $output_sound_device->setAttrib("readonly", true); } $this->addElement($output_sound_device); } - + public function isValid($data){ $this->populate(array("output_sound_device"=>$data)); return true; diff --git a/airtime_mvc/application/forms/StreamSettingSubForm.php b/airtime_mvc/application/forms/StreamSettingSubForm.php index 5a3e37e65..c8398d806 100644 --- a/airtime_mvc/application/forms/StreamSettingSubForm.php +++ b/airtime_mvc/application/forms/StreamSettingSubForm.php @@ -4,43 +4,43 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ private $setting; private $stream_types; private $stream_bitrates; - + public function init() { - + } - + public function setPrefix($prefix){ $this->prefix = $prefix; } - + public function setSetting($setting){ $this->setting = $setting; } - + public function setStreamTypes($stream_types){ $this->stream_types = $stream_types; } - + public function setStreamBitrates($stream_bitrates){ $this->stream_bitrates = $stream_bitrates; } - + public function startForm(){ $prefix = "s".$this->prefix; $stream_number = $this->prefix; $setting = $this->setting; $stream_types = $this->stream_types; $stream_bitrates = $this->stream_bitrates; - + $this->setIsArray(true); $this->setElementsBelongTo($prefix."_data"); - + $disable_all = false; - if(Application_Model_Preference::GetDisableStreamConf() == "true"){ + if(Application_Model_Preference::GetEnableStreamConf() == "false"){ $disable_all = true; } - + $enable = new Zend_Form_Element_Checkbox('enable'); $enable->setLabel('Enabled:') ->setValue($setting[$prefix.'_output'] != 'disabled'?1:0) @@ -49,7 +49,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $enable->setAttrib("disabled", "disabled"); } $this->addElement($enable); - + $type = new Zend_Form_Element_Select('type'); $type->setLabel("Stream Type:") ->setMultiOptions($stream_types) @@ -59,7 +59,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $type->setAttrib("disabled", "disabled"); } $this->addElement($type); - + $bitrate = new Zend_Form_Element_Select('bitrate'); $bitrate->setLabel("Bit Rate:") ->setMultiOptions($stream_bitrates) @@ -70,7 +70,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ } $this->addElement($type); $this->addElement($bitrate); - + $output = new Zend_Form_Element_Select('output'); $output->setLabel("Service Type:") ->setMultiOptions(array("icecast"=>"Icecast", "shoutcast"=>"Shoutcast")) @@ -80,7 +80,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $output->setAttrib("disabled", "disabled"); } $this->addElement($output); - + $host = new Zend_Form_Element_Text('host'); $host->setLabel("Server") ->setValue(isset($setting[$prefix.'_host'])?$setting[$prefix.'_host']:"") @@ -89,7 +89,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $host->setAttrib("disabled", "disabled"); } $this->addElement($host); - + $port = new Zend_Form_Element_Text('port'); $port->setLabel("Port") ->setValue(isset($setting[$prefix.'_port'])?$setting[$prefix.'_port']:"") @@ -100,7 +100,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $port->setAttrib("disabled", "disabled"); } $this->addElement($port); - + $pass = new Zend_Form_Element_Text('pass'); $pass->setLabel("Password") ->setValue(isset($setting[$prefix.'_pass'])?$setting[$prefix.'_pass']:"") @@ -109,7 +109,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $pass->setAttrib("disabled", "disabled"); } $this->addElement($pass); - + $genre = new Zend_Form_Element_Text('genre'); $genre->setLabel("Genre") ->setValue(isset($setting[$prefix.'_genre'])?$setting[$prefix.'_genre']:"") @@ -118,7 +118,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $genre->setAttrib("disabled", "disabled"); } $this->addElement($genre); - + $url = new Zend_Form_Element_Text('url'); $url->setLabel("URL") ->setValue(isset($setting[$prefix.'_url'])?$setting[$prefix.'_url']:"") @@ -127,7 +127,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $url->setAttrib("disabled", "disabled"); } $this->addElement($url); - + $description = new Zend_Form_Element_Text('description'); $description->setLabel("Name/Description") ->setValue(isset($setting[$prefix.'_description'])?$setting[$prefix.'_description']:"") @@ -136,7 +136,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $description->setAttrib("disabled", "disabled"); } $this->addElement($description); - + $mount = new Zend_Form_Element_Text('mount'); $mount->setLabel("Mount Point") ->setValue(isset($setting[$prefix.'_mount'])?$setting[$prefix.'_mount']:"") @@ -145,7 +145,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $mount->setAttrib("disabled", "disabled"); } $this->addElement($mount); - + $user = new Zend_Form_Element_Text('user'); $user->setLabel("Username") ->setValue(isset($setting[$prefix.'_user'])?$setting[$prefix.'_user']:"") @@ -154,12 +154,12 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $user->setAttrib("disabled", "disabled"); } $this->addElement($user); - + $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number)) )); } - + public function isValid ($data){ $isValid = parent::isValid($data); if($data['enable'] == 1){ diff --git a/airtime_mvc/application/models/Component.php b/airtime_mvc/application/models/Component.php index b3df2c00e..2771f79eb 100644 --- a/airtime_mvc/application/models/Component.php +++ b/airtime_mvc/application/models/Component.php @@ -3,10 +3,10 @@ class Application_Model_Component { public static function Register($p_componentName, $p_ipAddress){ - $component = CcComponentQuery::create()->findOneByDbName($p_componentName); + $component = CcServiceRegisterQuery::create()->findOneByDbName($p_componentName); if ($component == NULL){ - $component = new CcComponent(); + $component = new CcServiceRegister(); $component->setDbName($p_componentName); } diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index f96475111..b565cdfb1 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -259,13 +259,13 @@ class Application_Model_Preference public static function GetStationDescription(){ return self::GetValue("description"); } - + public static function SetTimezone($timezone){ self::SetValue("timezone", $timezone); date_default_timezone_set($timezone); $md = array("timezone" => $timezone); } - + public static function GetTimezone(){ return self::GetValue("timezone"); } @@ -328,11 +328,11 @@ class Application_Model_Preference $url = $systemInfoArray["AIRTIME_VERSION_URL"]; $index = strpos($url,'/api/'); $url = substr($url, 0, $index); - + $headerInfo = get_headers(trim($url),1); $outputArray['WEB_SERVER'] = $headerInfo['Server'][0]; } - + $outputArray['NUM_OF_USERS'] = Application_Model_User::getUserCount(); $outputArray['NUM_OF_SONGS'] = Application_Model_StoredFile::getFileCount(); $outputArray['NUM_OF_PLAYLISTS'] = Application_Model_Playlist::getPlaylistCount(); @@ -365,74 +365,74 @@ class Application_Model_Preference public static function GetRemindMeDate(){ return self::GetValue("remindme"); } - + public static function SetImportTimestamp(){ $now = time(); if(self::GetImportTimestamp()+5 < $now){ self::SetValue("import_timestamp", $now); } } - + public static function GetImportTimestamp(){ return self::GetValue("import_timestamp"); } - + public static function GetStreamType(){ $st = self::GetValue("stream_type"); return explode(',', $st); } - + public static function GetStreamBitrate(){ $sb = self::GetValue("stream_bitrate"); return explode(',', $sb); } - + public static function SetPrivacyPolicyCheck($flag){ self::SetValue("privacy_policy", $flag); } - + public static function GetPrivacyPolicyCheck(){ return self::GetValue("privacy_policy"); } - + public static function SetNumOfStreams($num){ self::SetValue("num_of_streams", intval($num)); } - + public static function GetNumOfStreams(){ return self::GetValue("num_of_streams"); } - + public static function SetMaxBitrate($bitrate){ self::SetValue("max_bitrate", intval($bitrate)); } - + public static function GetMaxBitrate(){ return self::GetValue("max_bitrate"); } - + public static function SetPlanLevel($plan){ self::SetValue("plan_level", $plan); } - + public static function GetPlanLevel(){ return self::GetValue("plan_level"); } - + public static function SetTrialEndingDate($date){ self::SetValue("trial_end_date", $date); } - + public static function GetTrialEndingDate(){ return self::GetValue("trial_end_date"); } - - public static function SetDisableStreamConf($bool){ - self::SetValue("disable_stream_conf", $bool); + + public static function SetEnableStreamConf($bool){ + self::SetValue("enable_stream_conf", $bool); } - - public static function GetDisableStreamConf(){ - return self::GetValue("disable_stream_conf"); + + public static function GetEnableStreamConf(){ + return self::GetValue("enable_stream_conf"); } public static function GetAirtimeVersion(){ diff --git a/airtime_mvc/application/models/Systemstatus.php b/airtime_mvc/application/models/Systemstatus.php index be115c56e..202498a80 100644 --- a/airtime_mvc/application/models/Systemstatus.php +++ b/airtime_mvc/application/models/Systemstatus.php @@ -118,7 +118,7 @@ class Application_Model_Systemstatus public static function GetPypoStatus(){ - $component = CcComponentQuery::create()->findOneByDbName("pypo"); + $component = CcServiceRegisterQuery::create()->findOneByDbName("pypo"); $ip = $component->getDbIp(); $docRoot = self::GetMonitStatus($ip); @@ -129,7 +129,7 @@ class Application_Model_Systemstatus public static function GetLiquidsoapStatus(){ - $component = CcComponentQuery::create()->findOneByDbName("pypo"); + $component = CcServiceRegisterQuery::create()->findOneByDbName("pypo"); $ip = $component->getDbIp(); $docRoot = self::GetMonitStatus($ip); @@ -140,7 +140,7 @@ class Application_Model_Systemstatus public static function GetShowRecorderStatus(){ - $component = CcComponentQuery::create()->findOneByDbName("show-recorder"); + $component = CcServiceRegisterQuery::create()->findOneByDbName("show-recorder"); $ip = $component->getDbIp(); $docRoot = self::GetMonitStatus($ip); @@ -151,7 +151,7 @@ class Application_Model_Systemstatus public static function GetMediaMonitorStatus(){ - $component = CcComponentQuery::create()->findOneByDbName("media-monitor"); + $component = CcServiceRegisterQuery::create()->findOneByDbName("media-monitor"); $ip = $component->getDbIp(); $docRoot = self::GetMonitStatus($ip); diff --git a/airtime_mvc/application/models/airtime/CcServiceRegister.php b/airtime_mvc/application/models/airtime/CcServiceRegister.php new file mode 100644 index 000000000..5a9859305 --- /dev/null +++ b/airtime_mvc/application/models/airtime/CcServiceRegister.php @@ -0,0 +1,18 @@ +setName('cc_component'); - $this->setPhpName('CcComponent'); - $this->setClassname('CcComponent'); + $this->setName('cc_service_register'); + $this->setPhpName('CcServiceRegister'); + $this->setClassname('CcServiceRegister'); $this->setPackage('airtime'); $this->setUseIdGenerator(false); // columns @@ -49,4 +49,4 @@ class CcComponentTableMap extends TableMap { { } // buildRelations() -} // CcComponentTableMap +} // CcServiceRegisterTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcComponent.php b/airtime_mvc/application/models/airtime/om/BaseCcServiceRegister.php similarity index 88% rename from airtime_mvc/application/models/airtime/om/BaseCcComponent.php rename to airtime_mvc/application/models/airtime/om/BaseCcServiceRegister.php index 32101737c..dbb3aa6a2 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcComponent.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcServiceRegister.php @@ -2,25 +2,25 @@ /** - * Base class that represents a row from the 'cc_component' table. + * Base class that represents a row from the 'cc_service_register' table. * * * * @package propel.generator.airtime.om */ -abstract class BaseCcComponent extends BaseObject implements Persistent +abstract class BaseCcServiceRegister extends BaseObject implements Persistent { /** * Peer class name */ - const PEER = 'CcComponentPeer'; + const PEER = 'CcServiceRegisterPeer'; /** * The Peer class. * Instance provides a convenient way of calling static methods on a class * that calling code may not be able to identify. - * @var CcComponentPeer + * @var CcServiceRegisterPeer */ protected static $peer; @@ -74,7 +74,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent * Set the value of [name] column. * * @param string $v new value - * @return CcComponent The current object (for fluent API support) + * @return CcServiceRegister The current object (for fluent API support) */ public function setDbName($v) { @@ -84,7 +84,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent if ($this->name !== $v) { $this->name = $v; - $this->modifiedColumns[] = CcComponentPeer::NAME; + $this->modifiedColumns[] = CcServiceRegisterPeer::NAME; } return $this; @@ -94,7 +94,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent * Set the value of [ip] column. * * @param string $v new value - * @return CcComponent The current object (for fluent API support) + * @return CcServiceRegister The current object (for fluent API support) */ public function setDbIp($v) { @@ -104,7 +104,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent if ($this->ip !== $v) { $this->ip = $v; - $this->modifiedColumns[] = CcComponentPeer::IP; + $this->modifiedColumns[] = CcServiceRegisterPeer::IP; } return $this; @@ -152,10 +152,10 @@ abstract class BaseCcComponent extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 2; // 2 = CcComponentPeer::NUM_COLUMNS - CcComponentPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 2; // 2 = CcServiceRegisterPeer::NUM_COLUMNS - CcServiceRegisterPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { - throw new PropelException("Error populating CcComponent object", $e); + throw new PropelException("Error populating CcServiceRegister object", $e); } } @@ -198,13 +198,13 @@ abstract class BaseCcComponent extends BaseObject implements Persistent } if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_READ); } // We don't need to alter the object instance pool; we're just modifying this instance // already in the pool. - $stmt = CcComponentPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $stmt = CcServiceRegisterPeer::doSelectStmt($this->buildPkeyCriteria(), $con); $row = $stmt->fetch(PDO::FETCH_NUM); $stmt->closeCursor(); if (!$row) { @@ -233,14 +233,14 @@ abstract class BaseCcComponent extends BaseObject implements Persistent } if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $con->beginTransaction(); try { $ret = $this->preDelete($con); if ($ret) { - CcComponentQuery::create() + CcServiceRegisterQuery::create() ->filterByPrimaryKey($this->getPrimaryKey()) ->delete($con); $this->postDelete($con); @@ -275,7 +275,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent } if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $con->beginTransaction(); @@ -295,7 +295,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent $this->postUpdate($con); } $this->postSave($con); - CcComponentPeer::addInstanceToPool($this); + CcServiceRegisterPeer::addInstanceToPool($this); } else { $affectedRows = 0; } @@ -333,7 +333,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent $affectedRows = 1; $this->setNew(false); } else { - $affectedRows = CcComponentPeer::doUpdate($this, $con); + $affectedRows = CcServiceRegisterPeer::doUpdate($this, $con); } $this->resetModified(); // [HL] After being saved an object is no longer 'modified' @@ -405,7 +405,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent $failureMap = array(); - if (($retval = CcComponentPeer::doValidate($this, $columns)) !== true) { + if (($retval = CcServiceRegisterPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); } @@ -428,7 +428,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent */ public function getByName($name, $type = BasePeer::TYPE_PHPNAME) { - $pos = CcComponentPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $pos = CcServiceRegisterPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); $field = $this->getByPosition($pos); return $field; } @@ -470,7 +470,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent */ public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) { - $keys = CcComponentPeer::getFieldNames($keyType); + $keys = CcServiceRegisterPeer::getFieldNames($keyType); $result = array( $keys[0] => $this->getDbName(), $keys[1] => $this->getDbIp(), @@ -490,7 +490,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent */ public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) { - $pos = CcComponentPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $pos = CcServiceRegisterPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); return $this->setByPosition($pos, $value); } @@ -533,7 +533,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { - $keys = CcComponentPeer::getFieldNames($keyType); + $keys = CcServiceRegisterPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setDbName($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDbIp($arr[$keys[1]]); @@ -546,10 +546,10 @@ abstract class BaseCcComponent extends BaseObject implements Persistent */ public function buildCriteria() { - $criteria = new Criteria(CcComponentPeer::DATABASE_NAME); + $criteria = new Criteria(CcServiceRegisterPeer::DATABASE_NAME); - if ($this->isColumnModified(CcComponentPeer::NAME)) $criteria->add(CcComponentPeer::NAME, $this->name); - if ($this->isColumnModified(CcComponentPeer::IP)) $criteria->add(CcComponentPeer::IP, $this->ip); + if ($this->isColumnModified(CcServiceRegisterPeer::NAME)) $criteria->add(CcServiceRegisterPeer::NAME, $this->name); + if ($this->isColumnModified(CcServiceRegisterPeer::IP)) $criteria->add(CcServiceRegisterPeer::IP, $this->ip); return $criteria; } @@ -564,8 +564,8 @@ abstract class BaseCcComponent extends BaseObject implements Persistent */ public function buildPkeyCriteria() { - $criteria = new Criteria(CcComponentPeer::DATABASE_NAME); - $criteria->add(CcComponentPeer::NAME, $this->name); + $criteria = new Criteria(CcServiceRegisterPeer::DATABASE_NAME); + $criteria->add(CcServiceRegisterPeer::NAME, $this->name); return $criteria; } @@ -605,7 +605,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of CcComponent (or compatible) type. + * @param object $copyObj An object of CcServiceRegister (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ @@ -626,7 +626,7 @@ abstract class BaseCcComponent extends BaseObject implements Persistent * objects. * * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return CcComponent Clone of current object. + * @return CcServiceRegister Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -645,12 +645,12 @@ abstract class BaseCcComponent extends BaseObject implements Persistent * same instance for all member of this class. The method could therefore * be static, but this would prevent one from overriding the behavior. * - * @return CcComponentPeer + * @return CcServiceRegisterPeer */ public function getPeer() { if (self::$peer === null) { - self::$peer = new CcComponentPeer(); + self::$peer = new CcServiceRegisterPeer(); } return self::$peer; } @@ -705,4 +705,4 @@ abstract class BaseCcComponent extends BaseObject implements Persistent throw new PropelException('Call to undefined method: ' . $name); } -} // BaseCcComponent +} // BaseCcServiceRegister diff --git a/airtime_mvc/application/models/airtime/om/BaseCcComponentPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcServiceRegisterPeer.php similarity index 77% rename from airtime_mvc/application/models/airtime/om/BaseCcComponentPeer.php rename to airtime_mvc/application/models/airtime/om/BaseCcServiceRegisterPeer.php index 038bf1380..ab7d35634 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcComponentPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcServiceRegisterPeer.php @@ -2,28 +2,28 @@ /** - * Base static class for performing query and update operations on the 'cc_component' table. + * Base static class for performing query and update operations on the 'cc_service_register' table. * * * * @package propel.generator.airtime.om */ -abstract class BaseCcComponentPeer { +abstract class BaseCcServiceRegisterPeer { /** the default database name for this class */ const DATABASE_NAME = 'airtime'; /** the table name for this class */ - const TABLE_NAME = 'cc_component'; + const TABLE_NAME = 'cc_service_register'; /** the related Propel class for this table */ - const OM_CLASS = 'CcComponent'; + const OM_CLASS = 'CcServiceRegister'; /** A class that can be returned by this peer. */ - const CLASS_DEFAULT = 'airtime.CcComponent'; + const CLASS_DEFAULT = 'airtime.CcServiceRegister'; /** the related TableMap class for this table */ - const TM_CLASS = 'CcComponentTableMap'; + const TM_CLASS = 'CcServiceRegisterTableMap'; /** The total number of columns. */ const NUM_COLUMNS = 2; @@ -32,16 +32,16 @@ abstract class BaseCcComponentPeer { const NUM_LAZY_LOAD_COLUMNS = 0; /** the column name for the NAME field */ - const NAME = 'cc_component.NAME'; + const NAME = 'cc_service_register.NAME'; /** the column name for the IP field */ - const IP = 'cc_component.IP'; + const IP = 'cc_service_register.IP'; /** - * An identiy map to hold any loaded instances of CcComponent objects. + * An identiy map to hold any loaded instances of CcServiceRegister objects. * This must be public so that other peer classes can access this when hydrating from JOIN * queries. - * @var array CcComponent[] + * @var array CcServiceRegister[] */ public static $instances = array(); @@ -122,12 +122,12 @@ abstract class BaseCcComponentPeer { * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * * @param string $alias The alias for the current table. - * @param string $column The column name for current table. (i.e. CcComponentPeer::COLUMN_NAME). + * @param string $column The column name for current table. (i.e. CcServiceRegisterPeer::COLUMN_NAME). * @return string */ public static function alias($alias, $column) { - return str_replace(CcComponentPeer::TABLE_NAME.'.', $alias.'.', $column); + return str_replace(CcServiceRegisterPeer::TABLE_NAME.'.', $alias.'.', $column); } /** @@ -145,8 +145,8 @@ abstract class BaseCcComponentPeer { public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { - $criteria->addSelectColumn(CcComponentPeer::NAME); - $criteria->addSelectColumn(CcComponentPeer::IP); + $criteria->addSelectColumn(CcServiceRegisterPeer::NAME); + $criteria->addSelectColumn(CcServiceRegisterPeer::IP); } else { $criteria->addSelectColumn($alias . '.NAME'); $criteria->addSelectColumn($alias . '.IP'); @@ -169,21 +169,21 @@ abstract class BaseCcComponentPeer { // We need to set the primary table name, since in the case that there are no WHERE columns // it will be impossible for the BasePeer::createSelectSql() method to determine which // tables go into the FROM clause. - $criteria->setPrimaryTableName(CcComponentPeer::TABLE_NAME); + $criteria->setPrimaryTableName(CcServiceRegisterPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - CcComponentPeer::addSelectColumns($criteria); + CcServiceRegisterPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_READ); } // BasePeer returns a PDOStatement $stmt = BasePeer::doCount($criteria, $con); @@ -201,7 +201,7 @@ abstract class BaseCcComponentPeer { * * @param Criteria $criteria object used to create the SELECT statement. * @param PropelPDO $con - * @return CcComponent + * @return CcServiceRegister * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -209,7 +209,7 @@ abstract class BaseCcComponentPeer { { $critcopy = clone $criteria; $critcopy->setLimit(1); - $objects = CcComponentPeer::doSelect($critcopy, $con); + $objects = CcServiceRegisterPeer::doSelect($critcopy, $con); if ($objects) { return $objects[0]; } @@ -226,7 +226,7 @@ abstract class BaseCcComponentPeer { */ public static function doSelect(Criteria $criteria, PropelPDO $con = null) { - return CcComponentPeer::populateObjects(CcComponentPeer::doSelectStmt($criteria, $con)); + return CcServiceRegisterPeer::populateObjects(CcServiceRegisterPeer::doSelectStmt($criteria, $con)); } /** * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. @@ -244,12 +244,12 @@ abstract class BaseCcComponentPeer { public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_READ); } if (!$criteria->hasSelectClause()) { $criteria = clone $criteria; - CcComponentPeer::addSelectColumns($criteria); + CcServiceRegisterPeer::addSelectColumns($criteria); } // Set the correct dbName @@ -267,10 +267,10 @@ abstract class BaseCcComponentPeer { * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * - * @param CcComponent $value A CcComponent object. + * @param CcServiceRegister $value A CcServiceRegister object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ - public static function addInstanceToPool(CcComponent $obj, $key = null) + public static function addInstanceToPool(CcServiceRegister $obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { @@ -288,18 +288,18 @@ abstract class BaseCcComponentPeer { * methods in your stub classes -- you may need to explicitly remove objects * from the cache in order to prevent returning objects that no longer exist. * - * @param mixed $value A CcComponent object or a primary key value. + * @param mixed $value A CcServiceRegister object or a primary key value. */ public static function removeInstanceFromPool($value) { if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof CcComponent) { + if (is_object($value) && $value instanceof CcServiceRegister) { $key = (string) $value->getDbName(); } elseif (is_scalar($value)) { // assume we've been passed a primary key $key = (string) $value; } else { - $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcComponent object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcServiceRegister object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); throw $e; } @@ -314,7 +314,7 @@ abstract class BaseCcComponentPeer { * a multi-column primary key, a serialize()d version of the primary key will be returned. * * @param string $key The key (@see getPrimaryKeyHash()) for this instance. - * @return CcComponent Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @return CcServiceRegister Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. * @see getPrimaryKeyHash() */ public static function getInstanceFromPool($key) @@ -338,7 +338,7 @@ abstract class BaseCcComponentPeer { } /** - * Method to invalidate the instance pool of all tables related to cc_component + * Method to invalidate the instance pool of all tables related to cc_service_register * by a foreign key with ON DELETE CASCADE */ public static function clearRelatedInstancePool() @@ -390,11 +390,11 @@ abstract class BaseCcComponentPeer { $results = array(); // set the class once to avoid overhead in the loop - $cls = CcComponentPeer::getOMClass(false); + $cls = CcServiceRegisterPeer::getOMClass(false); // populate the object(s) while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = CcComponentPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = CcComponentPeer::getInstanceFromPool($key))) { + $key = CcServiceRegisterPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcServiceRegisterPeer::getInstanceFromPool($key))) { // We no longer rehydrate the object, since this can cause data loss. // See http://www.propelorm.org/ticket/509 // $obj->hydrate($row, 0, true); // rehydrate @@ -403,7 +403,7 @@ abstract class BaseCcComponentPeer { $obj = new $cls(); $obj->hydrate($row); $results[] = $obj; - CcComponentPeer::addInstanceToPool($obj, $key); + CcServiceRegisterPeer::addInstanceToPool($obj, $key); } // if key exists } $stmt->closeCursor(); @@ -416,21 +416,21 @@ abstract class BaseCcComponentPeer { * @param int $startcol The 0-based offset for reading from the resultset row. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. - * @return array (CcComponent object, last column rank) + * @return array (CcServiceRegister object, last column rank) */ public static function populateObject($row, $startcol = 0) { - $key = CcComponentPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = CcComponentPeer::getInstanceFromPool($key))) { + $key = CcServiceRegisterPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcServiceRegisterPeer::getInstanceFromPool($key))) { // We no longer rehydrate the object, since this can cause data loss. // See http://www.propelorm.org/ticket/509 // $obj->hydrate($row, $startcol, true); // rehydrate - $col = $startcol + CcComponentPeer::NUM_COLUMNS; + $col = $startcol + CcServiceRegisterPeer::NUM_COLUMNS; } else { - $cls = CcComponentPeer::OM_CLASS; + $cls = CcServiceRegisterPeer::OM_CLASS; $obj = new $cls(); $col = $obj->hydrate($row, $startcol); - CcComponentPeer::addInstanceToPool($obj, $key); + CcServiceRegisterPeer::addInstanceToPool($obj, $key); } return array($obj, $col); } @@ -451,10 +451,10 @@ abstract class BaseCcComponentPeer { */ public static function buildTableMap() { - $dbMap = Propel::getDatabaseMap(BaseCcComponentPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BaseCcComponentPeer::TABLE_NAME)) + $dbMap = Propel::getDatabaseMap(BaseCcServiceRegisterPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcServiceRegisterPeer::TABLE_NAME)) { - $dbMap->addTableObject(new CcComponentTableMap()); + $dbMap->addTableObject(new CcServiceRegisterTableMap()); } } @@ -471,13 +471,13 @@ abstract class BaseCcComponentPeer { */ public static function getOMClass($withPrefix = true) { - return $withPrefix ? CcComponentPeer::CLASS_DEFAULT : CcComponentPeer::OM_CLASS; + return $withPrefix ? CcServiceRegisterPeer::CLASS_DEFAULT : CcServiceRegisterPeer::OM_CLASS; } /** - * Method perform an INSERT on the database, given a CcComponent or Criteria object. + * Method perform an INSERT on the database, given a CcServiceRegister or Criteria object. * - * @param mixed $values Criteria or CcComponent object containing data that is used to create the INSERT statement. + * @param mixed $values Criteria or CcServiceRegister object containing data that is used to create the INSERT statement. * @param PropelPDO $con the PropelPDO connection to use * @return mixed The new primary key. * @throws PropelException Any exceptions caught during processing will be @@ -486,13 +486,13 @@ abstract class BaseCcComponentPeer { public static function doInsert($values, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity } else { - $criteria = $values->buildCriteria(); // build Criteria from CcComponent object + $criteria = $values->buildCriteria(); // build Criteria from CcServiceRegister object } @@ -514,9 +514,9 @@ abstract class BaseCcComponentPeer { } /** - * Method perform an UPDATE on the database, given a CcComponent or Criteria object. + * Method perform an UPDATE on the database, given a CcServiceRegister or Criteria object. * - * @param mixed $values Criteria or CcComponent object containing data that is used to create the UPDATE statement. + * @param mixed $values Criteria or CcServiceRegister object containing data that is used to create the UPDATE statement. * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). * @return int The number of affected rows (if supported by underlying database driver). * @throws PropelException Any exceptions caught during processing will be @@ -525,7 +525,7 @@ abstract class BaseCcComponentPeer { public static function doUpdate($values, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $selectCriteria = new Criteria(self::DATABASE_NAME); @@ -533,15 +533,15 @@ abstract class BaseCcComponentPeer { if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity - $comparison = $criteria->getComparison(CcComponentPeer::NAME); - $value = $criteria->remove(CcComponentPeer::NAME); + $comparison = $criteria->getComparison(CcServiceRegisterPeer::NAME); + $value = $criteria->remove(CcServiceRegisterPeer::NAME); if ($value) { - $selectCriteria->add(CcComponentPeer::NAME, $value, $comparison); + $selectCriteria->add(CcServiceRegisterPeer::NAME, $value, $comparison); } else { - $selectCriteria->setPrimaryTableName(CcComponentPeer::TABLE_NAME); + $selectCriteria->setPrimaryTableName(CcServiceRegisterPeer::TABLE_NAME); } - } else { // $values is CcComponent object + } else { // $values is CcServiceRegister object $criteria = $values->buildCriteria(); // gets full criteria $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) } @@ -553,26 +553,26 @@ abstract class BaseCcComponentPeer { } /** - * Method to DELETE all rows from the cc_component table. + * Method to DELETE all rows from the cc_service_register table. * * @return int The number of affected rows (if supported by underlying database driver). */ public static function doDeleteAll($con = null) { if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $affectedRows = 0; // initialize var to track total num of affected rows try { // use transaction because $criteria could contain info // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->beginTransaction(); - $affectedRows += BasePeer::doDeleteAll(CcComponentPeer::TABLE_NAME, $con, CcComponentPeer::DATABASE_NAME); + $affectedRows += BasePeer::doDeleteAll(CcServiceRegisterPeer::TABLE_NAME, $con, CcServiceRegisterPeer::DATABASE_NAME); // Because this db requires some delete cascade/set null emulation, we have to // clear the cached instance *after* the emulation has happened (since // instances get re-added by the select statement contained therein). - CcComponentPeer::clearInstancePool(); - CcComponentPeer::clearRelatedInstancePool(); + CcServiceRegisterPeer::clearInstancePool(); + CcServiceRegisterPeer::clearRelatedInstancePool(); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -582,9 +582,9 @@ abstract class BaseCcComponentPeer { } /** - * Method perform a DELETE on the database, given a CcComponent or Criteria object OR a primary key value. + * Method perform a DELETE on the database, given a CcServiceRegister or Criteria object OR a primary key value. * - * @param mixed $values Criteria or CcComponent object or primary key or array of primary keys + * @param mixed $values Criteria or CcServiceRegister object or primary key or array of primary keys * which is used to create the DELETE statement * @param PropelPDO $con the connection to use * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows @@ -595,27 +595,27 @@ abstract class BaseCcComponentPeer { public static function doDelete($values, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { // invalidate the cache for all objects of this type, since we have no // way of knowing (without running a query) what objects should be invalidated // from the cache based on this Criteria. - CcComponentPeer::clearInstancePool(); + CcServiceRegisterPeer::clearInstancePool(); // rename for clarity $criteria = clone $values; - } elseif ($values instanceof CcComponent) { // it's a model object + } elseif ($values instanceof CcServiceRegister) { // it's a model object // invalidate the cache for this single object - CcComponentPeer::removeInstanceFromPool($values); + CcServiceRegisterPeer::removeInstanceFromPool($values); // create criteria based on pk values $criteria = $values->buildPkeyCriteria(); } else { // it's a primary key, or an array of pks $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(CcComponentPeer::NAME, (array) $values, Criteria::IN); + $criteria->add(CcServiceRegisterPeer::NAME, (array) $values, Criteria::IN); // invalidate the cache for this object(s) foreach ((array) $values as $singleval) { - CcComponentPeer::removeInstanceFromPool($singleval); + CcServiceRegisterPeer::removeInstanceFromPool($singleval); } } @@ -630,7 +630,7 @@ abstract class BaseCcComponentPeer { $con->beginTransaction(); $affectedRows += BasePeer::doDelete($criteria, $con); - CcComponentPeer::clearRelatedInstancePool(); + CcServiceRegisterPeer::clearRelatedInstancePool(); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -640,24 +640,24 @@ abstract class BaseCcComponentPeer { } /** - * Validates all modified columns of given CcComponent object. + * Validates all modified columns of given CcServiceRegister object. * If parameter $columns is either a single column name or an array of column names * than only those columns are validated. * * NOTICE: This does not apply to primary or foreign keys for now. * - * @param CcComponent $obj The object to validate. + * @param CcServiceRegister $obj The object to validate. * @param mixed $cols Column name or array of column names. * * @return mixed TRUE if all columns are valid or the error message of the first invalid column. */ - public static function doValidate(CcComponent $obj, $cols = null) + public static function doValidate(CcServiceRegister $obj, $cols = null) { $columns = array(); if ($cols) { - $dbMap = Propel::getDatabaseMap(CcComponentPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(CcComponentPeer::TABLE_NAME); + $dbMap = Propel::getDatabaseMap(CcServiceRegisterPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcServiceRegisterPeer::TABLE_NAME); if (! is_array($cols)) { $cols = array($cols); @@ -673,7 +673,7 @@ abstract class BaseCcComponentPeer { } - return BasePeer::doValidate(CcComponentPeer::DATABASE_NAME, CcComponentPeer::TABLE_NAME, $columns); + return BasePeer::doValidate(CcServiceRegisterPeer::DATABASE_NAME, CcServiceRegisterPeer::TABLE_NAME, $columns); } /** @@ -681,23 +681,23 @@ abstract class BaseCcComponentPeer { * * @param string $pk the primary key. * @param PropelPDO $con the connection to use - * @return CcComponent + * @return CcServiceRegister */ public static function retrieveByPK($pk, PropelPDO $con = null) { - if (null !== ($obj = CcComponentPeer::getInstanceFromPool((string) $pk))) { + if (null !== ($obj = CcServiceRegisterPeer::getInstanceFromPool((string) $pk))) { return $obj; } if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria = new Criteria(CcComponentPeer::DATABASE_NAME); - $criteria->add(CcComponentPeer::NAME, $pk); + $criteria = new Criteria(CcServiceRegisterPeer::DATABASE_NAME); + $criteria->add(CcServiceRegisterPeer::NAME, $pk); - $v = CcComponentPeer::doSelect($criteria, $con); + $v = CcServiceRegisterPeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; } @@ -713,23 +713,23 @@ abstract class BaseCcComponentPeer { public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(CcComponentPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(CcServiceRegisterPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { - $criteria = new Criteria(CcComponentPeer::DATABASE_NAME); - $criteria->add(CcComponentPeer::NAME, $pks, Criteria::IN); - $objs = CcComponentPeer::doSelect($criteria, $con); + $criteria = new Criteria(CcServiceRegisterPeer::DATABASE_NAME); + $criteria->add(CcServiceRegisterPeer::NAME, $pks, Criteria::IN); + $objs = CcServiceRegisterPeer::doSelect($criteria, $con); } return $objs; } -} // BaseCcComponentPeer +} // BaseCcServiceRegisterPeer // This is the static code needed to register the TableMap for this table with the main Propel class. // -BaseCcComponentPeer::buildTableMap(); +BaseCcServiceRegisterPeer::buildTableMap(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcComponentQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcServiceRegisterQuery.php similarity index 54% rename from airtime_mvc/application/models/airtime/om/BaseCcComponentQuery.php rename to airtime_mvc/application/models/airtime/om/BaseCcServiceRegisterQuery.php index 0bf1702cf..a8df529a7 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcComponentQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcServiceRegisterQuery.php @@ -2,60 +2,60 @@ /** - * Base class that represents a query for the 'cc_component' table. + * Base class that represents a query for the 'cc_service_register' table. * * * - * @method CcComponentQuery orderByDbName($order = Criteria::ASC) Order by the name column - * @method CcComponentQuery orderByDbIp($order = Criteria::ASC) Order by the ip column + * @method CcServiceRegisterQuery orderByDbName($order = Criteria::ASC) Order by the name column + * @method CcServiceRegisterQuery orderByDbIp($order = Criteria::ASC) Order by the ip column * - * @method CcComponentQuery groupByDbName() Group by the name column - * @method CcComponentQuery groupByDbIp() Group by the ip column + * @method CcServiceRegisterQuery groupByDbName() Group by the name column + * @method CcServiceRegisterQuery groupByDbIp() Group by the ip column * - * @method CcComponentQuery leftJoin($relation) Adds a LEFT JOIN clause to the query - * @method CcComponentQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query - * @method CcComponentQuery innerJoin($relation) Adds a INNER JOIN clause to the query + * @method CcServiceRegisterQuery leftJoin($relation) Adds a LEFT JOIN clause to the query + * @method CcServiceRegisterQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query + * @method CcServiceRegisterQuery innerJoin($relation) Adds a INNER JOIN clause to the query * - * @method CcComponent findOne(PropelPDO $con = null) Return the first CcComponent matching the query - * @method CcComponent findOneOrCreate(PropelPDO $con = null) Return the first CcComponent matching the query, or a new CcComponent object populated from the query conditions when no match is found + * @method CcServiceRegister findOne(PropelPDO $con = null) Return the first CcServiceRegister matching the query + * @method CcServiceRegister findOneOrCreate(PropelPDO $con = null) Return the first CcServiceRegister matching the query, or a new CcServiceRegister object populated from the query conditions when no match is found * - * @method CcComponent findOneByDbName(string $name) Return the first CcComponent filtered by the name column - * @method CcComponent findOneByDbIp(string $ip) Return the first CcComponent filtered by the ip column + * @method CcServiceRegister findOneByDbName(string $name) Return the first CcServiceRegister filtered by the name column + * @method CcServiceRegister findOneByDbIp(string $ip) Return the first CcServiceRegister filtered by the ip column * - * @method array findByDbName(string $name) Return CcComponent objects filtered by the name column - * @method array findByDbIp(string $ip) Return CcComponent objects filtered by the ip column + * @method array findByDbName(string $name) Return CcServiceRegister objects filtered by the name column + * @method array findByDbIp(string $ip) Return CcServiceRegister objects filtered by the ip column * * @package propel.generator.airtime.om */ -abstract class BaseCcComponentQuery extends ModelCriteria +abstract class BaseCcServiceRegisterQuery extends ModelCriteria { /** - * Initializes internal state of BaseCcComponentQuery object. + * Initializes internal state of BaseCcServiceRegisterQuery 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 = 'airtime', $modelName = 'CcComponent', $modelAlias = null) + public function __construct($dbName = 'airtime', $modelName = 'CcServiceRegister', $modelAlias = null) { parent::__construct($dbName, $modelName, $modelAlias); } /** - * Returns a new CcComponentQuery object. + * Returns a new CcServiceRegisterQuery object. * * @param string $modelAlias The alias of a model in the query * @param Criteria $criteria Optional Criteria to build the query from * - * @return CcComponentQuery + * @return CcServiceRegisterQuery */ public static function create($modelAlias = null, $criteria = null) { - if ($criteria instanceof CcComponentQuery) { + if ($criteria instanceof CcServiceRegisterQuery) { return $criteria; } - $query = new CcComponentQuery(); + $query = new CcServiceRegisterQuery(); if (null !== $modelAlias) { $query->setModelAlias($modelAlias); } @@ -74,11 +74,11 @@ abstract class BaseCcComponentQuery extends ModelCriteria * @param mixed $key Primary key to use for the query * @param PropelPDO $con an optional connection object * - * @return CcComponent|array|mixed the result, formatted by the current formatter + * @return CcServiceRegister|array|mixed the result, formatted by the current formatter */ public function findPk($key, $con = null) { - if ((null !== ($obj = CcComponentPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + if ((null !== ($obj = CcServiceRegisterPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { // the object is alredy in the instance pool return $obj; } else { @@ -114,11 +114,11 @@ abstract class BaseCcComponentQuery extends ModelCriteria * * @param mixed $key Primary key to use for the query * - * @return CcComponentQuery The current query, for fluid interface + * @return CcServiceRegisterQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { - return $this->addUsingAlias(CcComponentPeer::NAME, $key, Criteria::EQUAL); + return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $key, Criteria::EQUAL); } /** @@ -126,11 +126,11 @@ abstract class BaseCcComponentQuery extends ModelCriteria * * @param array $keys The list of primary key to use for the query * - * @return CcComponentQuery The current query, for fluid interface + * @return CcServiceRegisterQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { - return $this->addUsingAlias(CcComponentPeer::NAME, $keys, Criteria::IN); + return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $keys, Criteria::IN); } /** @@ -140,7 +140,7 @@ abstract class BaseCcComponentQuery extends ModelCriteria * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return CcComponentQuery The current query, for fluid interface + * @return CcServiceRegisterQuery The current query, for fluid interface */ public function filterByDbName($dbName = null, $comparison = null) { @@ -152,7 +152,7 @@ abstract class BaseCcComponentQuery extends ModelCriteria $comparison = Criteria::LIKE; } } - return $this->addUsingAlias(CcComponentPeer::NAME, $dbName, $comparison); + return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $dbName, $comparison); } /** @@ -162,7 +162,7 @@ abstract class BaseCcComponentQuery extends ModelCriteria * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return CcComponentQuery The current query, for fluid interface + * @return CcServiceRegisterQuery The current query, for fluid interface */ public function filterByDbIp($dbIp = null, $comparison = null) { @@ -174,23 +174,23 @@ abstract class BaseCcComponentQuery extends ModelCriteria $comparison = Criteria::LIKE; } } - return $this->addUsingAlias(CcComponentPeer::IP, $dbIp, $comparison); + return $this->addUsingAlias(CcServiceRegisterPeer::IP, $dbIp, $comparison); } /** * Exclude object from result * - * @param CcComponent $ccComponent Object to remove from the list of results + * @param CcServiceRegister $ccServiceRegister Object to remove from the list of results * - * @return CcComponentQuery The current query, for fluid interface + * @return CcServiceRegisterQuery The current query, for fluid interface */ - public function prune($ccComponent = null) + public function prune($ccServiceRegister = null) { - if ($ccComponent) { - $this->addUsingAlias(CcComponentPeer::NAME, $ccComponent->getDbName(), Criteria::NOT_EQUAL); + if ($ccServiceRegister) { + $this->addUsingAlias(CcServiceRegisterPeer::NAME, $ccServiceRegister->getDbName(), Criteria::NOT_EQUAL); } return $this; } -} // BaseCcComponentQuery +} // BaseCcServiceRegisterQuery diff --git a/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml b/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml index cc78da874..12976ef57 100644 --- a/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml +++ b/airtime_mvc/application/views/scripts/dashboard/stream-player.phtml @@ -1,4 +1,5 @@
+

Live stream