diff --git a/workflow/engine/classes/model/om/BaseAddonsManager.php b/workflow/engine/classes/model/om/BaseAddonsManager.php index d24bda7d5..a399db26b 100644 --- a/workflow/engine/classes/model/om/BaseAddonsManager.php +++ b/workflow/engine/classes/model/om/BaseAddonsManager.php @@ -4,7 +4,6 @@ require_once 'propel/om/BaseObject.php'; require_once 'propel/om/Persistent.php'; - include_once 'propel/util/Criteria.php'; include_once 'classes/model/AddonsManagerPeer.php'; @@ -12,9 +11,9 @@ include_once 'classes/model/AddonsManagerPeer.php'; /** * Base class that represents a row from the 'ADDONS_MANAGER' table. * - * * - * @package workflow.classes.model.om + * + * @package workflow.classes.model.om */ abstract class BaseAddonsManager extends BaseObject implements Persistent { @@ -23,453 +22,445 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * The Peer class. * Instance provides a convenient way of calling static methods on a class * that calling code may not be able to identify. - * @var AddonsManagerPeer - */ + * + * @var AddonsManagerPeer + */ protected static $peer; /** * The value for the addon_id field. - * @var string + * + * @var string */ protected $addon_id; /** * The value for the store_id field. - * @var string + * + * @var string */ protected $store_id; /** * The value for the addon_name field. - * @var string + * + * @var string */ protected $addon_name; /** * The value for the addon_nick field. - * @var string + * + * @var string */ protected $addon_nick; /** * The value for the addon_download_filename field. - * @var string + * + * @var string */ protected $addon_download_filename; /** * The value for the addon_description field. - * @var string + * + * @var string */ protected $addon_description; /** * The value for the addon_state field. - * @var string + * + * @var string */ protected $addon_state; /** * The value for the addon_state_changed field. - * @var int + * + * @var int */ protected $addon_state_changed; /** * The value for the addon_status field. - * @var string + * + * @var string */ protected $addon_status; /** * The value for the addon_version field. - * @var string + * + * @var string */ protected $addon_version; /** * The value for the addon_type field. - * @var string + * + * @var string */ protected $addon_type; /** * The value for the addon_publisher field. - * @var string + * + * @var string */ protected $addon_publisher; /** * The value for the addon_release_date field. - * @var int + * + * @var int */ protected $addon_release_date; /** * The value for the addon_release_type field. - * @var string + * + * @var string */ protected $addon_release_type; /** * The value for the addon_release_notes field. - * @var string + * + * @var string */ protected $addon_release_notes; /** * The value for the addon_download_url field. - * @var string + * + * @var string */ protected $addon_download_url; /** * The value for the addon_download_progress field. - * @var double + * + * @var double */ protected $addon_download_progress; /** * The value for the addon_download_md5 field. - * @var string + * + * @var string */ protected $addon_download_md5; /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. - * @var boolean + * + * @var boolean */ protected $alreadyInSave = false; /** * Flag to prevent endless validation loop, if this object is referenced * by another object which falls in this transaction. - * @var boolean + * + * @var boolean */ protected $alreadyInValidation = false; /** * Get the [addon_id] column value. - * - * @return string + * + * @return string */ - public function getAddonId() + public function getAddonId () { - return $this->addon_id; } /** * Get the [store_id] column value. - * - * @return string + * + * @return string */ - public function getStoreId() + public function getStoreId () { - return $this->store_id; } /** * Get the [addon_name] column value. - * - * @return string + * + * @return string */ - public function getAddonName() + public function getAddonName () { - return $this->addon_name; } /** * Get the [addon_nick] column value. - * - * @return string + * + * @return string */ - public function getAddonNick() + public function getAddonNick () { - return $this->addon_nick; } /** * Get the [addon_download_filename] column value. - * - * @return string + * + * @return string */ - public function getAddonDownloadFilename() + public function getAddonDownloadFilename () { - return $this->addon_download_filename; } /** * Get the [addon_description] column value. - * - * @return string + * + * @return string */ - public function getAddonDescription() + public function getAddonDescription () { - return $this->addon_description; } /** * Get the [addon_state] column value. - * - * @return string + * + * @return string */ - public function getAddonState() + public function getAddonState () { - return $this->addon_state; } /** * Get the [optionally formatted] [addon_state_changed] column value. - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the integer unix timestamp will be returned. - * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). - * @throws PropelException - if unable to convert the date/time to timestamp. + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the integer unix timestamp will be returned. + * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). + * @throws PropelException - if unable to convert the date/time to timestamp. */ - public function getAddonStateChanged($format = 'Y-m-d H:i:s') + public function getAddonStateChanged ($format = 'Y-m-d H:i:s') { - if ($this->addon_state_changed === null || $this->addon_state_changed === '') { return null; - } elseif (!is_int($this->addon_state_changed)) { + } elseif (! is_int( $this->addon_state_changed )) { // a non-timestamp value was set externally, so we convert it - $ts = strtotime($this->addon_state_changed); - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse value of [addon_state_changed] as date/time value: " . - var_export($this->addon_state_changed, true)); + $ts = strtotime( $this->addon_state_changed ); + if ($ts === - 1 || $ts === false) { + // in PHP 5.1 return value changes to FALSE + throw new PropelException( "Unable to parse value of [addon_state_changed] as date/time value: " . var_export( $this->addon_state_changed, true ) ); } } else { $ts = $this->addon_state_changed; } if ($format === null) { return $ts; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $ts); + } elseif (strpos( $format, '%' ) !== false) { + return strftime( $format, $ts ); } else { - return date($format, $ts); + return date( $format, $ts ); } } /** * Get the [addon_status] column value. - * - * @return string + * + * @return string */ - public function getAddonStatus() + public function getAddonStatus () { - return $this->addon_status; } /** * Get the [addon_version] column value. - * - * @return string + * + * @return string */ - public function getAddonVersion() + public function getAddonVersion () { - return $this->addon_version; } /** * Get the [addon_type] column value. - * - * @return string + * + * @return string */ - public function getAddonType() + public function getAddonType () { - return $this->addon_type; } /** * Get the [addon_publisher] column value. - * - * @return string + * + * @return string */ - public function getAddonPublisher() + public function getAddonPublisher () { - return $this->addon_publisher; } /** * Get the [optionally formatted] [addon_release_date] column value. - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the integer unix timestamp will be returned. - * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). - * @throws PropelException - if unable to convert the date/time to timestamp. + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the integer unix timestamp will be returned. + * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). + * @throws PropelException - if unable to convert the date/time to timestamp. */ - public function getAddonReleaseDate($format = 'Y-m-d H:i:s') + public function getAddonReleaseDate ($format = 'Y-m-d H:i:s') { - if ($this->addon_release_date === null || $this->addon_release_date === '') { return null; - } elseif (!is_int($this->addon_release_date)) { + } elseif (! is_int( $this->addon_release_date )) { // a non-timestamp value was set externally, so we convert it - $ts = strtotime($this->addon_release_date); - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse value of [addon_release_date] as date/time value: " . - var_export($this->addon_release_date, true)); + $ts = strtotime( $this->addon_release_date ); + if ($ts === - 1 || $ts === false) { + // in PHP 5.1 return value changes to FALSE + throw new PropelException( "Unable to parse value of [addon_release_date] as date/time value: " . var_export( $this->addon_release_date, true ) ); } } else { $ts = $this->addon_release_date; } if ($format === null) { return $ts; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $ts); + } elseif (strpos( $format, '%' ) !== false) { + return strftime( $format, $ts ); } else { - return date($format, $ts); + return date( $format, $ts ); } } /** * Get the [addon_release_type] column value. - * - * @return string + * + * @return string */ - public function getAddonReleaseType() + public function getAddonReleaseType () { - return $this->addon_release_type; } /** * Get the [addon_release_notes] column value. - * - * @return string + * + * @return string */ - public function getAddonReleaseNotes() + public function getAddonReleaseNotes () { - return $this->addon_release_notes; } /** * Get the [addon_download_url] column value. - * - * @return string + * + * @return string */ - public function getAddonDownloadUrl() + public function getAddonDownloadUrl () { - return $this->addon_download_url; } /** * Get the [addon_download_progress] column value. - * - * @return double + * + * @return double */ - public function getAddonDownloadProgress() + public function getAddonDownloadProgress () { - return $this->addon_download_progress; } /** * Get the [addon_download_md5] column value. - * - * @return string + * + * @return string */ - public function getAddonDownloadMd5() + public function getAddonDownloadMd5 () { - return $this->addon_download_md5; } /** * Set the value of [addon_id] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonId($v) + public function setAddonId ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_id !== $v) { $this->addon_id = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_ID; } - } // setAddonId() /** * Set the value of [store_id] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setStoreId($v) + public function setStoreId ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->store_id !== $v) { $this->store_id = $v; $this->modifiedColumns[] = AddonsManagerPeer::STORE_ID; } - } // setStoreId() /** * Set the value of [addon_name] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonName($v) + public function setAddonName ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_name !== $v) { $this->addon_name = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_NAME; } - } // setAddonName() /** * Set the value of [addon_nick] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonNick($v) + public function setAddonNick ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_nick !== $v) { $this->addon_nick = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_NICK; @@ -479,88 +470,74 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Set the value of [addon_download_filename] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonDownloadFilename($v) + public function setAddonDownloadFilename ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_download_filename !== $v) { $this->addon_download_filename = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME; } - } // setAddonDownloadFilename() /** * Set the value of [addon_description] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonDescription($v) + public function setAddonDescription ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_description !== $v) { $this->addon_description = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DESCRIPTION; } - } // setAddonDescription() /** * Set the value of [addon_state] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonState($v) + public function setAddonState ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_state !== $v) { $this->addon_state = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE; } - } // setAddonState() /** * Set the value of [addon_state_changed] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setAddonStateChanged($v) + public function setAddonStateChanged ($v) { - - if ($v !== null && !is_int($v)) { - $ts = strtotime($v); - //Date/time accepts null values - if ($v == '') { - $ts = null; - } - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse date/time value for [addon_state_changed] from input: " . - var_export($v, true)); + if ($v !== null && ! is_int( $v )) { + $ts = strtotime( $v ); + if ($ts === - 1 || $ts === false) { + // in PHP 5.1 return value changes to FALSE + throw new PropelException( "Unable to parse date/time value for [addon_state_changed] from input: " . var_export( $v, true ) ); } } else { $ts = $v; @@ -569,115 +546,97 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent $this->addon_state_changed = $ts; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE_CHANGED; } - } // setAddonStateChanged() /** * Set the value of [addon_status] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonStatus($v) + public function setAddonStatus ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_status !== $v) { $this->addon_status = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATUS; } - } // setAddonStatus() /** * Set the value of [addon_version] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonVersion($v) + public function setAddonVersion ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_version !== $v) { $this->addon_version = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_VERSION; } - } // setAddonVersion() /** * Set the value of [addon_type] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonType($v) + public function setAddonType ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_type !== $v) { $this->addon_type = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_TYPE; } - } // setAddonType() /** * Set the value of [addon_publisher] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonPublisher($v) + public function setAddonPublisher ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->addon_publisher !== $v) { $this->addon_publisher = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_PUBLISHER; } - } // setAddonPublisher() /** * Set the value of [addon_release_date] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setAddonReleaseDate($v) + public function setAddonReleaseDate ($v) { - - if ($v !== null && !is_int($v)) { - $ts = strtotime($v); - //Date/time accepts null values - if ($v == '') { - $ts = null; - } - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse date/time value for [addon_release_date] from input: " . - var_export($v, true)); + if ($v !== null && ! is_int( $v )) { + $ts = strtotime( $v ); + if ($ts === - 1 || $ts === false) { + // in PHP 5.1 return value changes to FALSE + throw new PropelException( "Unable to parse date/time value for [addon_release_date] from input: " . var_export( $v, true ) ); } } else { $ts = $v; @@ -686,21 +645,19 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent $this->addon_release_date = $ts; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_RELEASE_DATE; } - } // setAddonReleaseDate() /** * Set the value of [addon_release_type] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonReleaseType($v) + public function setAddonReleaseType ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -713,16 +670,15 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Set the value of [addon_release_notes] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonReleaseNotes($v) + public function setAddonReleaseNotes ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -735,16 +691,15 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Set the value of [addon_download_url] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonDownloadUrl($v) + public function setAddonDownloadUrl ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -752,37 +707,33 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent $this->addon_download_url = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_URL; } - } // setAddonDownloadUrl() /** * Set the value of [addon_download_progress] column. - * - * @param double $v new value - * @return void + * + * @param double $v new value + * @return void */ - public function setAddonDownloadProgress($v) + public function setAddonDownloadProgress ($v) { - if ($this->addon_download_progress !== $v) { $this->addon_download_progress = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS; } - } // setAddonDownloadProgress() /** * Set the value of [addon_download_md5] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setAddonDownloadMd5($v) + public function setAddonDownloadMd5 ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -797,90 +748,90 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * Hydrates (populates) the object variables with values from the database resultset. * * An offset (1-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, + * with a subset of the columns in the resultset rows. This is needed, for example, * for results of JOIN queries where the resultset row includes columns from two or * more tables. * - * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. - * @param int $startcol 1-based offset column which indicates which restultset column to start with. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. + * @param int $startcol 1-based offset column which indicates which restultset column to start with. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. */ - public function hydrate(ResultSet $rs, $startcol = 1) + public function hydrate (ResultSet $rs, $startcol = 1) { try { - $this->addon_id = $rs->getString($startcol + 0); + $this->addon_id = $rs->getString( $startcol + 0 ); - $this->store_id = $rs->getString($startcol + 1); + $this->store_id = $rs->getString( $startcol + 1 ); - $this->addon_name = $rs->getString($startcol + 2); + $this->addon_name = $rs->getString( $startcol + 2 ); - $this->addon_nick = $rs->getString($startcol + 3); + $this->addon_nick = $rs->getString( $startcol + 3 ); - $this->addon_download_filename = $rs->getString($startcol + 4); + $this->addon_download_filename = $rs->getString( $startcol + 4 ); - $this->addon_description = $rs->getString($startcol + 5); + $this->addon_description = $rs->getString( $startcol + 5 ); - $this->addon_state = $rs->getString($startcol + 6); + $this->addon_state = $rs->getString( $startcol + 6 ); - $this->addon_state_changed = $rs->getTimestamp($startcol + 7, null); + $this->addon_state_changed = $rs->getTimestamp( $startcol + 7, null ); - $this->addon_status = $rs->getString($startcol + 8); + $this->addon_status = $rs->getString( $startcol + 8 ); - $this->addon_version = $rs->getString($startcol + 9); + $this->addon_version = $rs->getString( $startcol + 9 ); - $this->addon_type = $rs->getString($startcol + 10); + $this->addon_type = $rs->getString( $startcol + 10 ); - $this->addon_publisher = $rs->getString($startcol + 11); + $this->addon_publisher = $rs->getString( $startcol + 11 ); - $this->addon_release_date = $rs->getTimestamp($startcol + 12, null); + $this->addon_release_date = $rs->getTimestamp( $startcol + 12, null ); - $this->addon_release_type = $rs->getString($startcol + 13); + $this->addon_release_type = $rs->getString( $startcol + 13 ); - $this->addon_release_notes = $rs->getString($startcol + 14); + $this->addon_release_notes = $rs->getString( $startcol + 14 ); - $this->addon_download_url = $rs->getString($startcol + 15); + $this->addon_download_url = $rs->getString( $startcol + 15 ); - $this->addon_download_progress = $rs->getFloat($startcol + 16); + $this->addon_download_progress = $rs->getFloat( $startcol + 16 ); - $this->addon_download_md5 = $rs->getString($startcol + 17); + $this->addon_download_md5 = $rs->getString( $startcol + 17 ); $this->resetModified(); - $this->setNew(false); + $this->setNew( false ); // FIXME - using NUM_COLUMNS may be clearer. return $startcol + 18; // 18 = AddonsManagerPeer::NUM_COLUMNS - AddonsManagerPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { - throw new PropelException("Error populating AddonsManager object", $e); + throw new PropelException( "Error populating AddonsManager object", $e ); } } /** * Removes this object from datastore and sets delete attribute. * - * @param Connection $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() + * @param Connection $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() */ - public function delete($con = null) + public function delete ($con = null) { if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); + throw new PropelException( "This object has already been deleted." ); } if ($con === null) { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); + $con = Propel::getConnection( AddonsManagerPeer::DATABASE_NAME ); } try { $con->begin(); - AddonsManagerPeer::doDelete($this, $con); - $this->setDeleted(true); + AddonsManagerPeer::doDelete( $this, $con ); + $this->setDeleted( true ); $con->commit(); } catch (PropelException $e) { $con->rollback(); @@ -889,28 +840,29 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent } /** - * Stores the object in the database. If the object is new, - * it inserts it; otherwise an update is performed. This method + * Stores the object in the database. + * If the object is new, + * it inserts it; otherwise an update is performed. This method * wraps the doSave() worker method in a transaction. * - * @param Connection $con - * @return int The number of rows affected by this insert/update - * @throws PropelException - * @see doSave() + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() */ - public function save($con = null) + public function save ($con = null) { if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); + throw new PropelException( "You cannot save an object that has been deleted." ); } if ($con === null) { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); + $con = Propel::getConnection( AddonsManagerPeer::DATABASE_NAME ); } try { $con->begin(); - $affectedRows = $this->doSave($con); + $affectedRows = $this->doSave( $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -925,29 +877,27 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param Connection $con - * @return int The number of rows affected by this insert/update and any referring - * @throws PropelException - * @see save() + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() */ - protected function doSave($con) + protected function doSave ($con) { $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { + if (! $this->alreadyInSave) { $this->alreadyInSave = true; - // If this object has been modified, then save it to the database. if ($this->isModified()) { if ($this->isNew()) { - $pk = AddonsManagerPeer::doInsert($this, $con); + $pk = AddonsManagerPeer::doInsert( $this, $con ); $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which - // should always be true here (even though technically - // BasePeer::doInsert() can insert multiple rows). - - $this->setNew(false); + // should always be true here (even though technically + // BasePeer::doInsert() can insert multiple rows). + $this->setNew( false ); } else { - $affectedRows += AddonsManagerPeer::doUpdate($this, $con); + $affectedRows += AddonsManagerPeer::doUpdate( $this, $con ); } $this->resetModified(); // [HL] After being saved an object is no longer 'modified' } @@ -959,18 +909,19 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Array of ValidationFailed objects. - * @var array ValidationFailed[] + * + * @var array ValidationFailed[] */ - protected $validationFailures = array(); + protected $validationFailures = array (); /** * Gets any ValidationFailed objects that resulted from last call to validate(). * * - * @return array ValidationFailed[] - * @see validate() + * @return array ValidationFailed[] + * @see validate() */ - public function getValidationFailures() + public function getValidationFailures () { return $this->validationFailures; } @@ -981,16 +932,16 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * If $columns is either a column name or an array of column names * only those columns are validated. * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() */ - public function validate($columns = null) + public function validate ($columns = null) { - $res = $this->doValidate($columns); + $res = $this->doValidate( $columns ); if ($res === true) { - $this->validationFailures = array(); + $this->validationFailures = array (); return true; } else { $this->validationFailures = $res; @@ -1002,59 +953,55 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * This function performs the validation work for complex object models. * * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise + * also be validated. If all pass then true is returned; otherwise * an aggreagated array of ValidationFailed objects will be returned. * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; - array of ValidationFailed objects otherwise. + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. */ - protected function doValidate($columns = null) + protected function doValidate ($columns = null) { - if (!$this->alreadyInValidation) { + if (! $this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; - $failureMap = array(); + $failureMap = array (); - - if (($retval = AddonsManagerPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); + if (($retval = AddonsManagerPeer::doValidate( $this, $columns )) !== true) { + $failureMap = array_merge( $failureMap, $retval ); } - - $this->alreadyInValidation = false; } - return (!empty($failureMap) ? $failureMap : true); + return (! empty( $failureMap ) ? $failureMap : true); } /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return mixed Value of field. */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + public function getByName ($name, $type = BasePeer::TYPE_PHPNAME) { - $pos = AddonsManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); + $pos = AddonsManagerPeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); + return $this->getByPosition( $pos ); } /** * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos + * @param int $pos position in xml schema + * @return mixed Value of field at $pos */ - public function getByPosition($pos) + public function getByPosition ($pos) { - switch($pos) { + switch ($pos) { case 0: return $this->getAddonId(); break; @@ -1121,14 +1068,14 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return an associative array containing the field names (as keys) and field values + * @param string $keyType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return an associative array containing the field names (as keys) and field values */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME) + public function toArray ($keyType = BasePeer::TYPE_PHPNAME) { - $keys = AddonsManagerPeer::getFieldNames($keyType); - $result = array( + $keys = AddonsManagerPeer::getFieldNames( $keyType ); + $result = array ( $keys[0] => $this->getAddonId(), $keys[1] => $this->getStoreId(), $keys[2] => $this->getAddonName(), @@ -1146,7 +1093,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent $keys[14] => $this->getAddonReleaseNotes(), $keys[15] => $this->getAddonDownloadUrl(), $keys[16] => $this->getAddonDownloadProgress(), - $keys[17] => $this->getAddonDownloadMd5(), + $keys[17] => $this->getAddonDownloadMd5() ); return $result; } @@ -1154,83 +1101,83 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Sets a field from the object by name passed in as a string. * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return void + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return void */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + public function setByName ($name, $value, $type = BasePeer::TYPE_PHPNAME) { - $pos = AddonsManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); + $pos = AddonsManagerPeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); + return $this->setByPosition( $pos, $value ); } /** * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void */ - public function setByPosition($pos, $value) + public function setByPosition ($pos, $value) { - switch($pos) { + switch ($pos) { case 0: - $this->setAddonId($value); + $this->setAddonId( $value ); break; case 1: - $this->setStoreId($value); + $this->setStoreId( $value ); break; case 2: - $this->setAddonName($value); + $this->setAddonName( $value ); break; case 3: - $this->setAddonNick($value); + $this->setAddonNick( $value ); break; case 4: - $this->setAddonDownloadFilename($value); + $this->setAddonDownloadFilename( $value ); break; case 5: - $this->setAddonDescription($value); + $this->setAddonDescription( $value ); break; case 6: - $this->setAddonState($value); + $this->setAddonState( $value ); break; case 7: - $this->setAddonStateChanged($value); + $this->setAddonStateChanged( $value ); break; case 8: - $this->setAddonStatus($value); + $this->setAddonStatus( $value ); break; case 9: - $this->setAddonVersion($value); + $this->setAddonVersion( $value ); break; case 10: - $this->setAddonType($value); + $this->setAddonType( $value ); break; case 11: - $this->setAddonPublisher($value); + $this->setAddonPublisher( $value ); break; case 12: - $this->setAddonReleaseDate($value); + $this->setAddonReleaseDate( $value ); break; case 13: - $this->setAddonReleaseType($value); + $this->setAddonReleaseType( $value ); break; case 14: - $this->setAddonReleaseNotes($value); + $this->setAddonReleaseNotes( $value ); break; case 15: - $this->setAddonDownloadUrl($value); + $this->setAddonDownloadUrl( $value ); break; case 16: - $this->setAddonDownloadProgress($value); + $this->setAddonDownloadProgress( $value ); break; case 17: - $this->setAddonDownloadMd5($value); + $this->setAddonDownloadMd5( $value ); break; } // switch() } @@ -1239,7 +1186,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * Populates the object using an array. * * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column + * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * @@ -1247,170 +1194,134 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + public function fromArray ($arr, $keyType = BasePeer::TYPE_PHPNAME) { - $keys = AddonsManagerPeer::getFieldNames($keyType); + $keys = AddonsManagerPeer::getFieldNames( $keyType ); - if (array_key_exists($keys[0], $arr)) { - $this->setAddonId($arr[$keys[0]]); + if (array_key_exists( $keys[0], $arr )) { + $this->setAddonId( $arr[$keys[0]] ); } - - if (array_key_exists($keys[1], $arr)) { - $this->setStoreId($arr[$keys[1]]); + if (array_key_exists( $keys[1], $arr )) { + $this->setStoreId( $arr[$keys[1]] ); } - - if (array_key_exists($keys[2], $arr)) { - $this->setAddonName($arr[$keys[2]]); + if (array_key_exists( $keys[2], $arr )) { + $this->setAddonName( $arr[$keys[2]] ); } - - if (array_key_exists($keys[3], $arr)) { - $this->setAddonNick($arr[$keys[3]]); + if (array_key_exists( $keys[3], $arr )) { + $this->setAddonNick( $arr[$keys[3]] ); } - - if (array_key_exists($keys[4], $arr)) { - $this->setAddonDownloadFilename($arr[$keys[4]]); + if (array_key_exists( $keys[4], $arr )) { + $this->setAddonDownloadFilename( $arr[$keys[4]] ); } - - if (array_key_exists($keys[5], $arr)) { - $this->setAddonDescription($arr[$keys[5]]); + if (array_key_exists( $keys[5], $arr )) { + $this->setAddonDescription( $arr[$keys[5]] ); } - - if (array_key_exists($keys[6], $arr)) { - $this->setAddonState($arr[$keys[6]]); + if (array_key_exists( $keys[6], $arr )) { + $this->setAddonState( $arr[$keys[6]] ); } - - if (array_key_exists($keys[7], $arr)) { - $this->setAddonStateChanged($arr[$keys[7]]); + if (array_key_exists( $keys[7], $arr )) { + $this->setAddonStateChanged( $arr[$keys[7]] ); } - - if (array_key_exists($keys[8], $arr)) { - $this->setAddonStatus($arr[$keys[8]]); + if (array_key_exists( $keys[8], $arr )) { + $this->setAddonStatus( $arr[$keys[8]] ); } - - if (array_key_exists($keys[9], $arr)) { - $this->setAddonVersion($arr[$keys[9]]); + if (array_key_exists( $keys[9], $arr )) { + $this->setAddonVersion( $arr[$keys[9]] ); } - - if (array_key_exists($keys[10], $arr)) { - $this->setAddonType($arr[$keys[10]]); + if (array_key_exists( $keys[10], $arr )) { + $this->setAddonType( $arr[$keys[10]] ); } - - if (array_key_exists($keys[11], $arr)) { - $this->setAddonPublisher($arr[$keys[11]]); + if (array_key_exists( $keys[11], $arr )) { + $this->setAddonPublisher( $arr[$keys[11]] ); } - - if (array_key_exists($keys[12], $arr)) { - $this->setAddonReleaseDate($arr[$keys[12]]); + if (array_key_exists( $keys[12], $arr )) { + $this->setAddonReleaseDate( $arr[$keys[12]] ); } - - if (array_key_exists($keys[13], $arr)) { - $this->setAddonReleaseType($arr[$keys[13]]); + if (array_key_exists( $keys[13], $arr )) { + $this->setAddonReleaseType( $arr[$keys[13]] ); } - - if (array_key_exists($keys[14], $arr)) { - $this->setAddonReleaseNotes($arr[$keys[14]]); + if (array_key_exists( $keys[14], $arr )) { + $this->setAddonReleaseNotes( $arr[$keys[14]] ); } - - if (array_key_exists($keys[15], $arr)) { - $this->setAddonDownloadUrl($arr[$keys[15]]); + if (array_key_exists( $keys[15], $arr )) { + $this->setAddonDownloadUrl( $arr[$keys[15]] ); } - - if (array_key_exists($keys[16], $arr)) { - $this->setAddonDownloadProgress($arr[$keys[16]]); + if (array_key_exists( $keys[16], $arr )) { + $this->setAddonDownloadProgress( $arr[$keys[16]] ); } - - if (array_key_exists($keys[17], $arr)) { - $this->setAddonDownloadMd5($arr[$keys[17]]); + if (array_key_exists( $keys[17], $arr )) { + $this->setAddonDownloadMd5( $arr[$keys[17]] ); } - } /** * Build a Criteria object containing the values of all modified columns in this object. * - * @return Criteria The Criteria object containing all modified values. + * @return Criteria The Criteria object containing all modified values. */ - public function buildCriteria() + public function buildCriteria () { - $criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME); + $criteria = new Criteria( AddonsManagerPeer::DATABASE_NAME ); - if ($this->isColumnModified(AddonsManagerPeer::ADDON_ID)) { - $criteria->add(AddonsManagerPeer::ADDON_ID, $this->addon_id); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_ID )) { + $criteria->add( AddonsManagerPeer::ADDON_ID, $this->addon_id ); } - - if ($this->isColumnModified(AddonsManagerPeer::STORE_ID)) { - $criteria->add(AddonsManagerPeer::STORE_ID, $this->store_id); + if ($this->isColumnModified( AddonsManagerPeer::STORE_ID )) { + $criteria->add( AddonsManagerPeer::STORE_ID, $this->store_id ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_NAME)) { - $criteria->add(AddonsManagerPeer::ADDON_NAME, $this->addon_name); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_NAME )) { + $criteria->add( AddonsManagerPeer::ADDON_NAME, $this->addon_name ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_NICK)) { - $criteria->add(AddonsManagerPeer::ADDON_NICK, $this->addon_nick); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_NICK )) { + $criteria->add( AddonsManagerPeer::ADDON_NICK, $this->addon_nick ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, $this->addon_download_filename); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME )) { + $criteria->add( AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, $this->addon_download_filename ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DESCRIPTION)) { - $criteria->add(AddonsManagerPeer::ADDON_DESCRIPTION, $this->addon_description); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_DESCRIPTION )) { + $criteria->add( AddonsManagerPeer::ADDON_DESCRIPTION, $this->addon_description ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE)) { - $criteria->add(AddonsManagerPeer::ADDON_STATE, $this->addon_state); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_STATE )) { + $criteria->add( AddonsManagerPeer::ADDON_STATE, $this->addon_state ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATE_CHANGED)) { - $criteria->add(AddonsManagerPeer::ADDON_STATE_CHANGED, $this->addon_state_changed); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_STATE_CHANGED )) { + $criteria->add( AddonsManagerPeer::ADDON_STATE_CHANGED, $this->addon_state_changed ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_STATUS)) { - $criteria->add(AddonsManagerPeer::ADDON_STATUS, $this->addon_status); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_STATUS )) { + $criteria->add( AddonsManagerPeer::ADDON_STATUS, $this->addon_status ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_VERSION)) { - $criteria->add(AddonsManagerPeer::ADDON_VERSION, $this->addon_version); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_VERSION )) { + $criteria->add( AddonsManagerPeer::ADDON_VERSION, $this->addon_version ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_TYPE)) { - $criteria->add(AddonsManagerPeer::ADDON_TYPE, $this->addon_type); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_TYPE )) { + $criteria->add( AddonsManagerPeer::ADDON_TYPE, $this->addon_type ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_PUBLISHER)) { - $criteria->add(AddonsManagerPeer::ADDON_PUBLISHER, $this->addon_publisher); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_PUBLISHER )) { + $criteria->add( AddonsManagerPeer::ADDON_PUBLISHER, $this->addon_publisher ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_DATE)) { - $criteria->add(AddonsManagerPeer::ADDON_RELEASE_DATE, $this->addon_release_date); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_RELEASE_DATE )) { + $criteria->add( AddonsManagerPeer::ADDON_RELEASE_DATE, $this->addon_release_date ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_TYPE)) { - $criteria->add(AddonsManagerPeer::ADDON_RELEASE_TYPE, $this->addon_release_type); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_RELEASE_TYPE )) { + $criteria->add( AddonsManagerPeer::ADDON_RELEASE_TYPE, $this->addon_release_type ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_RELEASE_NOTES)) { - $criteria->add(AddonsManagerPeer::ADDON_RELEASE_NOTES, $this->addon_release_notes); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_RELEASE_NOTES )) { + $criteria->add( AddonsManagerPeer::ADDON_RELEASE_NOTES, $this->addon_release_notes ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_URL)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_URL, $this->addon_download_url); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_DOWNLOAD_URL )) { + $criteria->add( AddonsManagerPeer::ADDON_DOWNLOAD_URL, $this->addon_download_url ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, $this->addon_download_progress); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS )) { + $criteria->add( AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, $this->addon_download_progress ); } - - if ($this->isColumnModified(AddonsManagerPeer::ADDON_DOWNLOAD_MD5)) { - $criteria->add(AddonsManagerPeer::ADDON_DOWNLOAD_MD5, $this->addon_download_md5); + if ($this->isColumnModified( AddonsManagerPeer::ADDON_DOWNLOAD_MD5 )) { + $criteria->add( AddonsManagerPeer::ADDON_DOWNLOAD_MD5, $this->addon_download_md5 ); } - return $criteria; } @@ -1420,14 +1331,14 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * Unlike buildCriteria() this method includes the primary key values regardless * of whether or not they have been modified. * - * @return Criteria The Criteria object containing value(s) for primary key(s). + * @return Criteria The Criteria object containing value(s) for primary key(s). */ - public function buildPkeyCriteria() + public function buildPkeyCriteria () { - $criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME); + $criteria = new Criteria( AddonsManagerPeer::DATABASE_NAME ); - $criteria->add(AddonsManagerPeer::ADDON_ID, $this->addon_id); - $criteria->add(AddonsManagerPeer::STORE_ID, $this->store_id); + $criteria->add( AddonsManagerPeer::ADDON_ID, $this->addon_id ); + $criteria->add( AddonsManagerPeer::STORE_ID, $this->store_id ); return $criteria; } @@ -1435,11 +1346,12 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Returns the composite primary key for this object. * The array elements will be in same order as specified in XML. - * @return array + * + * @return array */ - public function getPrimaryKey() + public function getPrimaryKey () { - $pks = array(); + $pks = array (); $pks[0] = $this->getAddonId(); @@ -1451,15 +1363,15 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent /** * Set the [composite] primary key. * - * @param array $keys The elements of the composite key (order must match the order in XML file). - * @return void + * @param array $keys The elements of the composite key (order must match the order in XML file). + * @return void */ - public function setPrimaryKey($keys) + public function setPrimaryKey ($keys) { - $this->setAddonId($keys[0]); + $this->setAddonId( $keys[0] ); - $this->setStoreId($keys[1]); + $this->setStoreId( $keys[1] ); } @@ -1469,51 +1381,49 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of AddonsManager (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException + * @param object $copyObj An object of AddonsManager (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException */ - public function copyInto($copyObj, $deepCopy = false) + public function copyInto ($copyObj, $deepCopy = false) { + $copyObj->setAddonName( $this->addon_name ); - $copyObj->setAddonName($this->addon_name); + $copyObj->setAddonNick( $this->addon_nick ); - $copyObj->setAddonNick($this->addon_nick); + $copyObj->setAddonDownloadFilename( $this->addon_download_filename ); - $copyObj->setAddonDownloadFilename($this->addon_download_filename); + $copyObj->setAddonDescription( $this->addon_description ); - $copyObj->setAddonDescription($this->addon_description); + $copyObj->setAddonState( $this->addon_state ); - $copyObj->setAddonState($this->addon_state); + $copyObj->setAddonStateChanged( $this->addon_state_changed ); - $copyObj->setAddonStateChanged($this->addon_state_changed); + $copyObj->setAddonStatus( $this->addon_status ); - $copyObj->setAddonStatus($this->addon_status); + $copyObj->setAddonVersion( $this->addon_version ); - $copyObj->setAddonVersion($this->addon_version); + $copyObj->setAddonType( $this->addon_type ); - $copyObj->setAddonType($this->addon_type); + $copyObj->setAddonPublisher( $this->addon_publisher ); - $copyObj->setAddonPublisher($this->addon_publisher); + $copyObj->setAddonReleaseDate( $this->addon_release_date ); - $copyObj->setAddonReleaseDate($this->addon_release_date); + $copyObj->setAddonReleaseType( $this->addon_release_type ); - $copyObj->setAddonReleaseType($this->addon_release_type); + $copyObj->setAddonReleaseNotes( $this->addon_release_notes ); - $copyObj->setAddonReleaseNotes($this->addon_release_notes); + $copyObj->setAddonDownloadUrl( $this->addon_download_url ); - $copyObj->setAddonDownloadUrl($this->addon_download_url); + $copyObj->setAddonDownloadProgress( $this->addon_download_progress ); - $copyObj->setAddonDownloadProgress($this->addon_download_progress); + $copyObj->setAddonDownloadMd5( $this->addon_download_md5 ); - $copyObj->setAddonDownloadMd5($this->addon_download_md5); + $copyObj->setNew( true ); + $copyObj->setAddonId( null ); // this is a pkey column, so set to default value - $copyObj->setNew(true); - - $copyObj->setAddonId(NULL); // this is a pkey column, so set to default value - - $copyObj->setStoreId(NULL); // this is a pkey column, so set to default value + $copyObj->setStoreId( null ); // this is a pkey column, so set to default value } @@ -1525,16 +1435,16 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return AddonsManager Clone of current object. - * @throws PropelException + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return AddonsManager Clone of current object. + * @throws PropelException */ - public function copy($deepCopy = false) + public function copy ($deepCopy = false) { // we use get_class(), because this might be a subclass - $clazz = get_class($this); + $clazz = get_class( $this ); $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); + $this->copyInto( $copyObj, $deepCopy ); return $copyObj; } @@ -1545,9 +1455,9 @@ abstract class BaseAddonsManager 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 AddonsManagerPeer + * @return AddonsManagerPeer */ - public function getPeer() + public function getPeer () { if (self::$peer === null) { self::$peer = new AddonsManagerPeer(); diff --git a/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php b/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php index 87373c1e8..bafd9deb4 100644 --- a/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php +++ b/workflow/engine/classes/model/om/BaseAddonsManagerPeer.php @@ -8,87 +8,133 @@ include_once 'classes/model/AddonsManager.php'; /** * Base static class for performing query and update operations on the 'ADDONS_MANAGER' table. * - * * - * @package workflow.classes.model.om + * + * @package workflow.classes.model.om */ abstract class BaseAddonsManagerPeer { - /** the default database name for this class */ + /** + * the default database name for this class + */ const DATABASE_NAME = 'workflow'; - /** the table name for this class */ + /** + * the table name for this class + */ const TABLE_NAME = 'ADDONS_MANAGER'; - /** A class that can be returned by this peer. */ + /** + * A class that can be returned by this peer. + */ const CLASS_DEFAULT = 'classes.model.AddonsManager'; - /** The total number of columns. */ + /** + * The total number of columns. + */ const NUM_COLUMNS = 18; - /** The number of lazy-loaded columns. */ + /** + * The number of lazy-loaded columns. + */ const NUM_LAZY_LOAD_COLUMNS = 0; - - /** the column name for the ADDON_ID field */ + /** + * the column name for the ADDON_ID field + */ const ADDON_ID = 'ADDONS_MANAGER.ADDON_ID'; - /** the column name for the STORE_ID field */ + /** + * the column name for the STORE_ID field + */ const STORE_ID = 'ADDONS_MANAGER.STORE_ID'; - /** the column name for the ADDON_NAME field */ + /** + * the column name for the ADDON_NAME field + */ const ADDON_NAME = 'ADDONS_MANAGER.ADDON_NAME'; - /** the column name for the ADDON_NICK field */ + /** + * the column name for the ADDON_NICK field + */ const ADDON_NICK = 'ADDONS_MANAGER.ADDON_NICK'; - /** the column name for the ADDON_DOWNLOAD_FILENAME field */ + /** + * the column name for the ADDON_DOWNLOAD_FILENAME field + */ const ADDON_DOWNLOAD_FILENAME = 'ADDONS_MANAGER.ADDON_DOWNLOAD_FILENAME'; - /** the column name for the ADDON_DESCRIPTION field */ + /** + * the column name for the ADDON_DESCRIPTION field + */ const ADDON_DESCRIPTION = 'ADDONS_MANAGER.ADDON_DESCRIPTION'; - /** the column name for the ADDON_STATE field */ + /** + * the column name for the ADDON_STATE field + */ const ADDON_STATE = 'ADDONS_MANAGER.ADDON_STATE'; - /** the column name for the ADDON_STATE_CHANGED field */ + /** + * the column name for the ADDON_STATE_CHANGED field + */ const ADDON_STATE_CHANGED = 'ADDONS_MANAGER.ADDON_STATE_CHANGED'; - /** the column name for the ADDON_STATUS field */ + /** + * the column name for the ADDON_STATUS field + */ const ADDON_STATUS = 'ADDONS_MANAGER.ADDON_STATUS'; - /** the column name for the ADDON_VERSION field */ + /** + * the column name for the ADDON_VERSION field + */ const ADDON_VERSION = 'ADDONS_MANAGER.ADDON_VERSION'; - /** the column name for the ADDON_TYPE field */ + /** + * the column name for the ADDON_TYPE field + */ const ADDON_TYPE = 'ADDONS_MANAGER.ADDON_TYPE'; - /** the column name for the ADDON_PUBLISHER field */ + /** + * the column name for the ADDON_PUBLISHER field + */ const ADDON_PUBLISHER = 'ADDONS_MANAGER.ADDON_PUBLISHER'; - /** the column name for the ADDON_RELEASE_DATE field */ + /** + * the column name for the ADDON_RELEASE_DATE field + */ const ADDON_RELEASE_DATE = 'ADDONS_MANAGER.ADDON_RELEASE_DATE'; - /** the column name for the ADDON_RELEASE_TYPE field */ + /** + * the column name for the ADDON_RELEASE_TYPE field + */ const ADDON_RELEASE_TYPE = 'ADDONS_MANAGER.ADDON_RELEASE_TYPE'; - /** the column name for the ADDON_RELEASE_NOTES field */ + /** + * the column name for the ADDON_RELEASE_NOTES field + */ const ADDON_RELEASE_NOTES = 'ADDONS_MANAGER.ADDON_RELEASE_NOTES'; - /** the column name for the ADDON_DOWNLOAD_URL field */ + /** + * the column name for the ADDON_DOWNLOAD_URL field + */ const ADDON_DOWNLOAD_URL = 'ADDONS_MANAGER.ADDON_DOWNLOAD_URL'; - /** the column name for the ADDON_DOWNLOAD_PROGRESS field */ + /** + * the column name for the ADDON_DOWNLOAD_PROGRESS field + */ const ADDON_DOWNLOAD_PROGRESS = 'ADDONS_MANAGER.ADDON_DOWNLOAD_PROGRESS'; - /** the column name for the ADDON_DOWNLOAD_MD5 field */ + /** + * the column name for the ADDON_DOWNLOAD_MD5 field + */ const ADDON_DOWNLOAD_MD5 = 'ADDONS_MANAGER.ADDON_DOWNLOAD_MD5'; - /** The PHP to DB Name Mapping */ + /** + * The PHP to DB Name Mapping + */ private static $phpNameMap = null; - /** * holds an array of fieldnames * @@ -96,10 +142,10 @@ abstract class BaseAddonsManagerPeer * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('AddonId', 'StoreId', 'AddonName', 'AddonNick', 'AddonDownloadFilename', 'AddonDescription', 'AddonState', 'AddonStateChanged', 'AddonStatus', 'AddonVersion', 'AddonType', 'AddonPublisher', 'AddonReleaseDate', 'AddonReleaseType', 'AddonReleaseNotes', 'AddonDownloadUrl', 'AddonDownloadProgress', 'AddonDownloadMd5', ), - BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID, AddonsManagerPeer::STORE_ID, AddonsManagerPeer::ADDON_NAME, AddonsManagerPeer::ADDON_NICK, AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, AddonsManagerPeer::ADDON_DESCRIPTION, AddonsManagerPeer::ADDON_STATE, AddonsManagerPeer::ADDON_STATE_CHANGED, AddonsManagerPeer::ADDON_STATUS, AddonsManagerPeer::ADDON_VERSION, AddonsManagerPeer::ADDON_TYPE, AddonsManagerPeer::ADDON_PUBLISHER, AddonsManagerPeer::ADDON_RELEASE_DATE, AddonsManagerPeer::ADDON_RELEASE_TYPE, AddonsManagerPeer::ADDON_RELEASE_NOTES, AddonsManagerPeer::ADDON_DOWNLOAD_URL, AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, AddonsManagerPeer::ADDON_DOWNLOAD_MD5, ), - BasePeer::TYPE_FIELDNAME => array ('ADDON_ID', 'STORE_ID', 'ADDON_NAME', 'ADDON_NICK', 'ADDON_DOWNLOAD_FILENAME', 'ADDON_DESCRIPTION', 'ADDON_STATE', 'ADDON_STATE_CHANGED', 'ADDON_STATUS', 'ADDON_VERSION', 'ADDON_TYPE', 'ADDON_PUBLISHER', 'ADDON_RELEASE_DATE', 'ADDON_RELEASE_TYPE', 'ADDON_RELEASE_NOTES', 'ADDON_DOWNLOAD_URL', 'ADDON_DOWNLOAD_PROGRESS', 'ADDON_DOWNLOAD_MD5', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ) + BasePeer::TYPE_PHPNAME => array ('AddonId','StoreId','AddonName','AddonNick','AddonDownloadFilename','AddonDescription','AddonState','AddonStateChanged','AddonStatus','AddonVersion','AddonType','AddonPublisher','AddonReleaseDate','AddonReleaseType','AddonReleaseNotes','AddonDownloadUrl','AddonDownloadProgress','AddonDownloadMd5'), + BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID,AddonsManagerPeer::STORE_ID,AddonsManagerPeer::ADDON_NAME,AddonsManagerPeer::ADDON_NICK,AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME,AddonsManagerPeer::ADDON_DESCRIPTION,AddonsManagerPeer::ADDON_STATE,AddonsManagerPeer::ADDON_STATE_CHANGED,AddonsManagerPeer::ADDON_STATUS,AddonsManagerPeer::ADDON_VERSION,AddonsManagerPeer::ADDON_TYPE,AddonsManagerPeer::ADDON_PUBLISHER,AddonsManagerPeer::ADDON_RELEASE_DATE,AddonsManagerPeer::ADDON_RELEASE_TYPE,AddonsManagerPeer::ADDON_RELEASE_NOTES,AddonsManagerPeer::ADDON_DOWNLOAD_URL,AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS,AddonsManagerPeer::ADDON_DOWNLOAD_MD5), + BasePeer::TYPE_FIELDNAME => array ('ADDON_ID','STORE_ID','ADDON_NAME','ADDON_NICK','ADDON_DOWNLOAD_FILENAME','ADDON_DESCRIPTION','ADDON_STATE','ADDON_STATE_CHANGED','ADDON_STATUS','ADDON_VERSION','ADDON_TYPE','ADDON_PUBLISHER','ADDON_RELEASE_DATE','ADDON_RELEASE_TYPE','ADDON_RELEASE_NOTES','ADDON_DOWNLOAD_URL','ADDON_DOWNLOAD_PROGRESS','ADDON_DOWNLOAD_MD5'), + BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17) ); /** @@ -109,36 +155,38 @@ abstract class BaseAddonsManagerPeer * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('AddonId' => 0, 'StoreId' => 1, 'AddonName' => 2, 'AddonNick' => 3, 'AddonDownloadFilename' => 4, 'AddonDescription' => 5, 'AddonState' => 6, 'AddonStateChanged' => 7, 'AddonStatus' => 8, 'AddonVersion' => 9, 'AddonType' => 10, 'AddonPublisher' => 11, 'AddonReleaseDate' => 12, 'AddonReleaseType' => 13, 'AddonReleaseNotes' => 14, 'AddonDownloadUrl' => 15, 'AddonDownloadProgress' => 16, 'AddonDownloadMd5' => 17, ), - BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID => 0, AddonsManagerPeer::STORE_ID => 1, AddonsManagerPeer::ADDON_NAME => 2, AddonsManagerPeer::ADDON_NICK => 3, AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME => 4, AddonsManagerPeer::ADDON_DESCRIPTION => 5, AddonsManagerPeer::ADDON_STATE => 6, AddonsManagerPeer::ADDON_STATE_CHANGED => 7, AddonsManagerPeer::ADDON_STATUS => 8, AddonsManagerPeer::ADDON_VERSION => 9, AddonsManagerPeer::ADDON_TYPE => 10, AddonsManagerPeer::ADDON_PUBLISHER => 11, AddonsManagerPeer::ADDON_RELEASE_DATE => 12, AddonsManagerPeer::ADDON_RELEASE_TYPE => 13, AddonsManagerPeer::ADDON_RELEASE_NOTES => 14, AddonsManagerPeer::ADDON_DOWNLOAD_URL => 15, AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS => 16, AddonsManagerPeer::ADDON_DOWNLOAD_MD5 => 17, ), - BasePeer::TYPE_FIELDNAME => array ('ADDON_ID' => 0, 'STORE_ID' => 1, 'ADDON_NAME' => 2, 'ADDON_NICK' => 3, 'ADDON_DOWNLOAD_FILENAME' => 4, 'ADDON_DESCRIPTION' => 5, 'ADDON_STATE' => 6, 'ADDON_STATE_CHANGED' => 7, 'ADDON_STATUS' => 8, 'ADDON_VERSION' => 9, 'ADDON_TYPE' => 10, 'ADDON_PUBLISHER' => 11, 'ADDON_RELEASE_DATE' => 12, 'ADDON_RELEASE_TYPE' => 13, 'ADDON_RELEASE_NOTES' => 14, 'ADDON_DOWNLOAD_URL' => 15, 'ADDON_DOWNLOAD_PROGRESS' => 16, 'ADDON_DOWNLOAD_MD5' => 17, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ) + BasePeer::TYPE_PHPNAME => array ('AddonId' => 0,'StoreId' => 1,'AddonName' => 2,'AddonNick' => 3,'AddonDownloadFilename' => 4,'AddonDescription' => 5,'AddonState' => 6,'AddonStateChanged' => 7,'AddonStatus' => 8,'AddonVersion' => 9,'AddonType' => 10,'AddonPublisher' => 11,'AddonReleaseDate' => 12,'AddonReleaseType' => 13,'AddonReleaseNotes' => 14,'AddonDownloadUrl' => 15,'AddonDownloadProgress' => 16,'AddonDownloadMd5' => 17), + BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID => 0,AddonsManagerPeer::STORE_ID => 1,AddonsManagerPeer::ADDON_NAME => 2,AddonsManagerPeer::ADDON_NICK => 3,AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME => 4,AddonsManagerPeer::ADDON_DESCRIPTION => 5,AddonsManagerPeer::ADDON_STATE => 6,AddonsManagerPeer::ADDON_STATE_CHANGED => 7,AddonsManagerPeer::ADDON_STATUS => 8,AddonsManagerPeer::ADDON_VERSION => 9,AddonsManagerPeer::ADDON_TYPE => 10,AddonsManagerPeer::ADDON_PUBLISHER => 11,AddonsManagerPeer::ADDON_RELEASE_DATE => 12,AddonsManagerPeer::ADDON_RELEASE_TYPE => 13,AddonsManagerPeer::ADDON_RELEASE_NOTES => 14,AddonsManagerPeer::ADDON_DOWNLOAD_URL => 15,AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS => 16,AddonsManagerPeer::ADDON_DOWNLOAD_MD5 => 17), + BasePeer::TYPE_FIELDNAME => array ('ADDON_ID' => 0,'STORE_ID' => 1,'ADDON_NAME' => 2,'ADDON_NICK' => 3,'ADDON_DOWNLOAD_FILENAME' => 4,'ADDON_DESCRIPTION' => 5,'ADDON_STATE' => 6,'ADDON_STATE_CHANGED' => 7,'ADDON_STATUS' => 8,'ADDON_VERSION' => 9,'ADDON_TYPE' => 10,'ADDON_PUBLISHER' => 11,'ADDON_RELEASE_DATE' => 12,'ADDON_RELEASE_TYPE' => 13,'ADDON_RELEASE_NOTES' => 14,'ADDON_DOWNLOAD_URL' => 15,'ADDON_DOWNLOAD_PROGRESS' => 16,'ADDON_DOWNLOAD_MD5' => 17), + BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17) ); /** - * @return MapBuilder the map builder for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * + * @return MapBuilder the map builder for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function getMapBuilder() + public static function getMapBuilder () { include_once 'classes/model/map/AddonsManagerMapBuilder.php'; - return BasePeer::getMapBuilder('classes.model.map.AddonsManagerMapBuilder'); + return BasePeer::getMapBuilder( 'classes.model.map.AddonsManagerMapBuilder' ); } + /** * Gets a map (hash) of PHP names to DB column names. * - * @return array The PHP to DB name map for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @return array The PHP to DB name map for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. */ - public static function getPhpNameMap() + public static function getPhpNameMap () { if (self::$phpNameMap === null) { $map = AddonsManagerPeer::getTableMap(); $columns = $map->getColumns(); - $nameMap = array(); + $nameMap = array (); foreach ($columns as $column) { $nameMap[$column->getPhpName()] = $column->getColumnName(); } @@ -146,21 +194,22 @@ abstract class BaseAddonsManagerPeer } return self::$phpNameMap; } + /** * Translates a fieldname to another type * - * @param string $name field name - * @param string $fromType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. + * @param string $name field name + * @param string $fromType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. */ - static public function translateFieldName($name, $fromType, $toType) + static public function translateFieldName ($name, $fromType, $toType) { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + $toNames = self::getFieldNames( $toType ); + $key = isset( self::$fieldKeys[$fromType][$name] ) ? self::$fieldKeys[$fromType][$name] : null; if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + throw new PropelException( "'$name' could not be found in the field names of type '$fromType'. These are: " . print_r( self::$fieldKeys[$fromType], true ) ); } return $toNames[$key]; } @@ -168,16 +217,16 @@ abstract class BaseAddonsManagerPeer /** * Returns an array of of field names. * - * @param string $type The type of fieldnames to return: - * One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return array A list of field names + * @param string $type The type of fieldnames to return: + * One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return array A list of field names */ - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + static public function getFieldNames ($type = BasePeer::TYPE_PHPNAME) { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); + if (! array_key_exists( $type, self::$fieldNames )) { + throw new PropelException( 'Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.' ); } return self::$fieldNames[$type]; } @@ -187,16 +236,17 @@ abstract class BaseAddonsManagerPeer * * Using this method you can maintain SQL abstraction while using column aliases. * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $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. AddonsManagerPeer::COLUMN_NAME). - * @return string + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. AddonsManagerPeer::COLUMN_NAME). + * @return string */ - public static function alias($alias, $column) + public static function alias ($alias, $column) { - return str_replace(AddonsManagerPeer::TABLE_NAME.'.', $alias.'.', $column); + return str_replace( AddonsManagerPeer::TABLE_NAME . '.', $alias . '.', $column ); } /** @@ -206,48 +256,48 @@ abstract class BaseAddonsManagerPeer * XML schema will not be added to the select list and only loaded * on demand. * - * @param criteria object containing the columns to add. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param criteria object containing the columns to add. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function addSelectColumns(Criteria $criteria) + public static function addSelectColumns (Criteria $criteria) { - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_ID); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_ID ); - $criteria->addSelectColumn(AddonsManagerPeer::STORE_ID); + $criteria->addSelectColumn( AddonsManagerPeer::STORE_ID ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_NAME); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_NAME ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_NICK); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_NICK ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DESCRIPTION); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_DESCRIPTION ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATE); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_STATE ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATE_CHANGED); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_STATE_CHANGED ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATUS); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_STATUS ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_VERSION); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_VERSION ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_TYPE); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_TYPE ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_PUBLISHER); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_PUBLISHER ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_DATE); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_RELEASE_DATE ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_TYPE); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_RELEASE_TYPE ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_NOTES); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_RELEASE_NOTES ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_URL); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_URL ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS ); - $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_MD5); + $criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_MD5 ); } @@ -257,69 +307,72 @@ abstract class BaseAddonsManagerPeer /** * Returns the number of rows matching criteria. * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). - * @param Connection $con - * @return int Number of matching rows. + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). + * @param Connection $con + * @return int Number of matching rows. */ - public static function doCount(Criteria $criteria, $distinct = false, $con = null) + public static function doCount (Criteria $criteria, $distinct = false, $con = null) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; // clear out anything that might confuse the ORDER BY clause $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(AddonsManagerPeer::COUNT_DISTINCT); + if ($distinct || in_array( Criteria::DISTINCT, $criteria->getSelectModifiers() )) { + $criteria->addSelectColumn( AddonsManagerPeer::COUNT_DISTINCT ); } else { - $criteria->addSelectColumn(AddonsManagerPeer::COUNT); + $criteria->addSelectColumn( AddonsManagerPeer::COUNT ); } // just in case we're grouping: add those columns to the select statement foreach ($criteria->getGroupByColumns() as $column) { - $criteria->addSelectColumn($column); + $criteria->addSelectColumn( $column ); } - $rs = AddonsManagerPeer::doSelectRS($criteria, $con); + $rs = AddonsManagerPeer::doSelectRS( $criteria, $con ); if ($rs->next()) { - return $rs->getInt(1); + return $rs->getInt( 1 ); } else { // no rows returned; we infer that means 0 matches. return 0; } } + /** * Method to select one object from the DB. * - * @param Criteria $criteria object used to create the SELECT statement. - * @param Connection $con - * @return AddonsManager - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param Criteria $criteria object used to create the SELECT statement. + * @param Connection $con + * @return AddonsManager + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doSelectOne(Criteria $criteria, $con = null) + public static function doSelectOne (Criteria $criteria, $con = null) { $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = AddonsManagerPeer::doSelect($critcopy, $con); + $critcopy->setLimit( 1 ); + $objects = AddonsManagerPeer::doSelect( $critcopy, $con ); if ($objects) { return $objects[0]; } return null; } + /** * Method to do selects. * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doSelect(Criteria $criteria, $con = null) + public static function doSelect (Criteria $criteria, $con = null) { - return AddonsManagerPeer::populateObjects(AddonsManagerPeer::doSelectRS($criteria, $con)); + return AddonsManagerPeer::populateObjects( AddonsManagerPeer::doSelectRS( $criteria, $con ) ); } + /** * Prepares the Criteria object and uses the parent doSelect() * method to get a ResultSet. @@ -327,65 +380,68 @@ abstract class BaseAddonsManagerPeer * Use this method directly if you want to just get the resultset * (instead of an array of objects). * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return ResultSet The resultset object with numerically-indexed fields. - * @see BasePeer::doSelect() + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return ResultSet The resultset object with numerically-indexed fields. + * @see BasePeer::doSelect() */ - public static function doSelectRS(Criteria $criteria, $con = null) + public static function doSelectRS (Criteria $criteria, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - if (!$criteria->getSelectColumns()) { + if (! $criteria->getSelectColumns()) { $criteria = clone $criteria; - AddonsManagerPeer::addSelectColumns($criteria); + AddonsManagerPeer::addSelectColumns( $criteria ); } // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); // BasePeer returns a Creole ResultSet, set to return // rows indexed numerically. - return BasePeer::doSelect($criteria, $con); + return BasePeer::doSelect( $criteria, $con ); } + /** * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function populateObjects(ResultSet $rs) + public static function populateObjects (ResultSet $rs) { - $results = array(); + $results = array (); // set the class once to avoid overhead in the loop $cls = AddonsManagerPeer::getOMClass(); - $cls = Propel::import($cls); + $cls = Propel::import( $cls ); // populate the object(s) while ($rs->next()) { $obj = new $cls(); - $obj->hydrate($rs); + $obj->hydrate( $rs ); $results[] = $obj; } return $results; } + /** * Returns the TableMap related to this peer. * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function getTableMap() + public static function getTableMap () { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + return Propel::getDatabaseMap( self::DATABASE_NAME )->getTable( self::TABLE_NAME ); } /** @@ -395,9 +451,9 @@ abstract class BaseAddonsManagerPeer * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @return string path.to.ClassName + * @return string path.to.ClassName */ - public static function getOMClass() + public static function getOMClass () { return AddonsManagerPeer::CLASS_DEFAULT; } @@ -405,16 +461,16 @@ abstract class BaseAddonsManagerPeer /** * Method perform an INSERT on the database, given a AddonsManager or Criteria object. * - * @param mixed $values Criteria or AddonsManager object containing data that is used to create the INSERT statement. - * @param Connection $con the connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AddonsManager object containing data that is used to create the INSERT statement. + * @param Connection $con the connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doInsert($values, $con = null) + public static function doInsert ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } if ($values instanceof Criteria) { @@ -423,15 +479,14 @@ abstract class BaseAddonsManagerPeer $criteria = $values->buildCriteria(); // build Criteria from AddonsManager object } - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); try { // use transaction because $criteria could contain info // for more than one table (I guess, conceivably) $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); + $pk = BasePeer::doInsert( $criteria, $con ); $con->commit(); } catch (PropelException $e) { $con->rollback(); @@ -444,56 +499,57 @@ abstract class BaseAddonsManagerPeer /** * Method perform an UPDATE on the database, given a AddonsManager or Criteria object. * - * @param mixed $values Criteria or AddonsManager object containing data create the UPDATE statement. - * @param Connection $con The connection to use (specify Connection 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 - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AddonsManager object containing data that is used to create the UPDATE statement. + * @param Connection $con The connection to use (specify 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 + * rethrown wrapped into a PropelException. */ - public static function doUpdate($values, $con = null) + public static function doUpdate ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - $selectCriteria = new Criteria(self::DATABASE_NAME); + $selectCriteria = new Criteria( self::DATABASE_NAME ); if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity - $comparison = $criteria->getComparison(AddonsManagerPeer::ADDON_ID); - $selectCriteria->add(AddonsManagerPeer::ADDON_ID, $criteria->remove(AddonsManagerPeer::ADDON_ID), $comparison); + $comparison = $criteria->getComparison( AddonsManagerPeer::ADDON_ID ); + $selectCriteria->add( AddonsManagerPeer::ADDON_ID, $criteria->remove( AddonsManagerPeer::ADDON_ID ), $comparison ); - $comparison = $criteria->getComparison(AddonsManagerPeer::STORE_ID); - $selectCriteria->add(AddonsManagerPeer::STORE_ID, $criteria->remove(AddonsManagerPeer::STORE_ID), $comparison); + $comparison = $criteria->getComparison( AddonsManagerPeer::STORE_ID ); + $selectCriteria->add( AddonsManagerPeer::STORE_ID, $criteria->remove( AddonsManagerPeer::STORE_ID ), $comparison ); } else { + // $values is AddonsManager object $criteria = $values->buildCriteria(); // gets full criteria $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) } // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); - return BasePeer::doUpdate($selectCriteria, $criteria, $con); + return BasePeer::doUpdate( $selectCriteria, $criteria, $con ); } /** * Method to DELETE all rows from the ADDONS_MANAGER table. * - * @return int The number of affected rows (if supported by underlying database driver). + * @return int The number of affected rows (if supported by underlying database driver). */ - public static function doDeleteAll($con = null) + public static function doDeleteAll ($con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } $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->begin(); - $affectedRows += BasePeer::doDeleteAll(AddonsManagerPeer::TABLE_NAME, $con); + $affectedRows += BasePeer::doDeleteAll( AddonsManagerPeer::TABLE_NAME, $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -505,49 +561,47 @@ abstract class BaseAddonsManagerPeer /** * Method perform a DELETE on the database, given a AddonsManager or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AddonsManager object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param Connection $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). - * This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, $con = null) + * @param mixed $values Criteria or AddonsManager object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param Connection $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME); + $con = Propel::getConnection( AddonsManagerPeer::DATABASE_NAME ); } if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity } elseif ($values instanceof AddonsManager) { - $criteria = $values->buildPkeyCriteria(); } else { // it must be the primary key - $criteria = new Criteria(self::DATABASE_NAME); + $criteria = new Criteria( self::DATABASE_NAME ); // primary key is composite; we therefore, expect // the primary key passed to be an array of pkey // values - if (count($values) == count($values, COUNT_RECURSIVE)) { + if (count( $values ) == count( $values, COUNT_RECURSIVE )) { // array is not multi-dimensional - $values = array($values); + $values = array ( + $values + ); } - $vals = array(); + $vals = array (); foreach ($values as $value) { - $vals[0][] = $value[0]; $vals[1][] = $value[1]; } - - $criteria->add(AddonsManagerPeer::ADDON_ID, $vals[0], Criteria::IN); - $criteria->add(AddonsManagerPeer::STORE_ID, $vals[1], Criteria::IN); + $criteria->add( AddonsManagerPeer::ADDON_ID, $vals[0], Criteria::IN ); + $criteria->add( AddonsManagerPeer::STORE_ID, $vals[1], Criteria::IN ); } // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); $affectedRows = 0; // initialize var to track total num of affected rows @@ -556,7 +610,7 @@ abstract class BaseAddonsManagerPeer // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->begin(); - $affectedRows += BasePeer::doDelete($criteria, $con); + $affectedRows += BasePeer::doDelete( $criteria, $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -572,26 +626,28 @@ abstract class BaseAddonsManagerPeer * * NOTICE: This does not apply to primary or foreign keys for now. * - * @param AddonsManager $obj The object to validate. - * @param mixed $cols Column name or array of column names. + * @param AddonsManager $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. + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. */ - public static function doValidate(AddonsManager $obj, $cols = null) + public static function doValidate (AddonsManager $obj, $cols = null) { - $columns = array(); + $columns = array (); if ($cols) { - $dbMap = Propel::getDatabaseMap(AddonsManagerPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(AddonsManagerPeer::TABLE_NAME); + $dbMap = Propel::getDatabaseMap( AddonsManagerPeer::DATABASE_NAME ); + $tableMap = $dbMap->getTable( AddonsManagerPeer::TABLE_NAME ); - if (! is_array($cols)) { - $cols = array($cols); + if (! is_array( $cols )) { + $cols = array ( + $cols + ); } foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + if ($tableMap->containsColumn( $colName )) { + $get = 'get' . $tableMap->getColumn( $colName )->getPhpName(); $columns[$colName] = $obj->$get(); } } @@ -599,31 +655,32 @@ abstract class BaseAddonsManagerPeer } - return BasePeer::doValidate(AddonsManagerPeer::DATABASE_NAME, AddonsManagerPeer::TABLE_NAME, $columns); + return BasePeer::doValidate( AddonsManagerPeer::DATABASE_NAME, AddonsManagerPeer::TABLE_NAME, $columns ); } /** * Retrieve object using using composite pkey values. + * * @param string $addon_id - * @param string $store_id - * @param Connection $con - * @return AddonsManager + * @param string $store_id + * + * @param Connection $con + * @return AddonsManager */ - public static function retrieveByPK($addon_id, $store_id, $con = null) + public static function retrieveByPK ($addon_id, $store_id, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } $criteria = new Criteria(); - $criteria->add(AddonsManagerPeer::ADDON_ID, $addon_id); - $criteria->add(AddonsManagerPeer::STORE_ID, $store_id); - $v = AddonsManagerPeer::doSelect($criteria, $con); + $criteria->add( AddonsManagerPeer::ADDON_ID, $addon_id ); + $criteria->add( AddonsManagerPeer::STORE_ID, $store_id ); + $v = AddonsManagerPeer::doSelect( $criteria, $con ); - return !empty($v) ? $v[0] : null; + return ! empty( $v ) ? $v[0] : null; } } - // static code to register the map builder for this Peer with the main Propel class if (Propel::isInit()) { // the MapBuilder classes register themselves with Propel during initialization @@ -631,12 +688,12 @@ if (Propel::isInit()) { try { BaseAddonsManagerPeer::getMapBuilder(); } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); + Propel::log( 'Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR ); } } else { // even if Propel is not yet initialized, the map builder class can be registered // now and then it will be loaded when Propel initializes. require_once 'classes/model/map/AddonsManagerMapBuilder.php'; - Propel::registerMapBuilder('classes.model.map.AddonsManagerMapBuilder'); + Propel::registerMapBuilder( 'classes.model.map.AddonsManagerMapBuilder' ); } diff --git a/workflow/engine/classes/model/om/BaseAddonsStore.php b/workflow/engine/classes/model/om/BaseAddonsStore.php index c4db74be5..ed59c666b 100644 --- a/workflow/engine/classes/model/om/BaseAddonsStore.php +++ b/workflow/engine/classes/model/om/BaseAddonsStore.php @@ -4,7 +4,6 @@ require_once 'propel/om/BaseObject.php'; require_once 'propel/om/Persistent.php'; - include_once 'propel/util/Criteria.php'; include_once 'classes/model/AddonsStorePeer.php'; @@ -12,9 +11,9 @@ include_once 'classes/model/AddonsStorePeer.php'; /** * Base class that represents a row from the 'ADDONS_STORE' table. * - * * - * @package workflow.classes.model.om + * + * @package workflow.classes.model.om */ abstract class BaseAddonsStore extends BaseObject implements Persistent { @@ -23,142 +22,144 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * The Peer class. * Instance provides a convenient way of calling static methods on a class * that calling code may not be able to identify. - * @var AddonsStorePeer - */ + * + * @var AddonsStorePeer + */ protected static $peer; /** * The value for the store_id field. - * @var string + * + * @var string */ protected $store_id; /** * The value for the store_version field. - * @var int + * + * @var int */ protected $store_version; /** * The value for the store_location field. - * @var string + * + * @var string */ protected $store_location; /** * The value for the store_type field. - * @var string + * + * @var string */ protected $store_type; /** * The value for the store_last_updated field. - * @var int + * + * @var int */ protected $store_last_updated; /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. - * @var boolean + * + * @var boolean */ protected $alreadyInSave = false; /** * Flag to prevent endless validation loop, if this object is referenced * by another object which falls in this transaction. - * @var boolean + * + * @var boolean */ protected $alreadyInValidation = false; /** * Get the [store_id] column value. - * - * @return string + * + * @return string */ - public function getStoreId() + public function getStoreId () { - return $this->store_id; } /** * Get the [store_version] column value. - * - * @return int + * + * @return int */ - public function getStoreVersion() + public function getStoreVersion () { - return $this->store_version; } /** * Get the [store_location] column value. - * - * @return string + * + * @return string */ - public function getStoreLocation() + public function getStoreLocation () { - return $this->store_location; } /** * Get the [store_type] column value. - * - * @return string + * + * @return string */ - public function getStoreType() + public function getStoreType () { - return $this->store_type; } /** * Get the [optionally formatted] [store_last_updated] column value. - * - * @param string $format The date/time format string (either date()-style or strftime()-style). - * If format is NULL, then the integer unix timestamp will be returned. - * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). - * @throws PropelException - if unable to convert the date/time to timestamp. + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the integer unix timestamp will be returned. + * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). + * @throws PropelException - if unable to convert the date/time to timestamp. */ - public function getStoreLastUpdated($format = 'Y-m-d H:i:s') + public function getStoreLastUpdated ($format = 'Y-m-d H:i:s') { - if ($this->store_last_updated === null || $this->store_last_updated === '') { return null; - } elseif (!is_int($this->store_last_updated)) { + } elseif (! is_int( $this->store_last_updated )) { // a non-timestamp value was set externally, so we convert it - $ts = strtotime($this->store_last_updated); - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse value of [store_last_updated] as date/time value: " . - var_export($this->store_last_updated, true)); + $ts = strtotime( $this->store_last_updated ); + if ($ts === - 1 || $ts === false) { + // in PHP 5.1 return value changes to FALSE + throw new PropelException( "Unable to parse value of [store_last_updated] as date/time value: " . var_export( $this->store_last_updated, true ) ); } } else { $ts = $this->store_last_updated; } if ($format === null) { return $ts; - } elseif (strpos($format, '%') !== false) { - return strftime($format, $ts); + } elseif (strpos( $format, '%' ) !== false) { + return strftime( $format, $ts ); } else { - return date($format, $ts); + return date( $format, $ts ); } } /** * Set the value of [store_id] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setStoreId($v) + public function setStoreId ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -166,93 +167,78 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent $this->store_id = $v; $this->modifiedColumns[] = AddonsStorePeer::STORE_ID; } - } // setStoreId() /** * Set the value of [store_version] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setStoreVersion($v) + public function setStoreVersion ($v) { - // Since the native PHP type for this column is integer, // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { + if ($v !== null && ! is_int( $v ) && is_numeric( $v )) { $v = (int) $v; } - if ($this->store_version !== $v) { $this->store_version = $v; $this->modifiedColumns[] = AddonsStorePeer::STORE_VERSION; } - } // setStoreVersion() /** * Set the value of [store_location] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setStoreLocation($v) + public function setStoreLocation ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->store_location !== $v) { $this->store_location = $v; $this->modifiedColumns[] = AddonsStorePeer::STORE_LOCATION; } - } // setStoreLocation() /** * Set the value of [store_type] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setStoreType($v) + public function setStoreType ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->store_type !== $v) { $this->store_type = $v; $this->modifiedColumns[] = AddonsStorePeer::STORE_TYPE; } - } // setStoreType() /** * Set the value of [store_last_updated] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setStoreLastUpdated($v) + public function setStoreLastUpdated ($v) { - - if ($v !== null && !is_int($v)) { - $ts = strtotime($v); - //Date/time accepts null values - if ($v == '') { - $ts = null; - } - if ($ts === -1 || $ts === false) { - throw new PropelException("Unable to parse date/time value for [store_last_updated] from input: " . - var_export($v, true)); + if ($v !== null && ! is_int( $v )) { + $ts = strtotime( $v ); + if ($ts === - 1 || $ts === false) { + // in PHP 5.1 return value changes to FALSE + throw new PropelException( "Unable to parse date/time value for [store_last_updated] from input: " . var_export( $v, true ) ); } } else { $ts = $v; @@ -261,71 +247,68 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent $this->store_last_updated = $ts; $this->modifiedColumns[] = AddonsStorePeer::STORE_LAST_UPDATED; } - } // setStoreLastUpdated() /** * Hydrates (populates) the object variables with values from the database resultset. * * An offset (1-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, + * with a subset of the columns in the resultset rows. This is needed, for example, * for results of JOIN queries where the resultset row includes columns from two or * more tables. * - * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. - * @param int $startcol 1-based offset column which indicates which restultset column to start with. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. + * @param int $startcol 1-based offset column which indicates which restultset column to start with. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. */ - public function hydrate(ResultSet $rs, $startcol = 1) + public function hydrate (ResultSet $rs, $startcol = 1) { try { - $this->store_id = $rs->getString($startcol + 0); + $this->store_id = $rs->getString( $startcol + 0 ); - $this->store_version = $rs->getInt($startcol + 1); + $this->store_version = $rs->getInt( $startcol + 1 ); - $this->store_location = $rs->getString($startcol + 2); + $this->store_location = $rs->getString( $startcol + 2 ); - $this->store_type = $rs->getString($startcol + 3); + $this->store_type = $rs->getString( $startcol + 3 ); - $this->store_last_updated = $rs->getTimestamp($startcol + 4, null); + $this->store_last_updated = $rs->getTimestamp( $startcol + 4, null ); $this->resetModified(); - $this->setNew(false); + $this->setNew( false ); // FIXME - using NUM_COLUMNS may be clearer. return $startcol + 5; // 5 = AddonsStorePeer::NUM_COLUMNS - AddonsStorePeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { - throw new PropelException("Error populating AddonsStore object", $e); + throw new PropelException( "Error populating AddonsStore object", $e ); } } /** * Removes this object from datastore and sets delete attribute. * - * @param Connection $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() + * @param Connection $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() */ - public function delete($con = null) + public function delete ($con = null) { if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); + throw new PropelException( "This object has already been deleted." ); } - if ($con === null) { - $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME); + $con = Propel::getConnection( AddonsStorePeer::DATABASE_NAME ); } - try { $con->begin(); - AddonsStorePeer::doDelete($this, $con); - $this->setDeleted(true); + AddonsStorePeer::doDelete( $this, $con ); + $this->setDeleted( true ); $con->commit(); } catch (PropelException $e) { $con->rollback(); @@ -334,28 +317,27 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent } /** - * Stores the object in the database. If the object is new, - * it inserts it; otherwise an update is performed. This method + * Stores the object in the database. + * If the object is new, + * it inserts it; otherwise an update is performed. This method * wraps the doSave() worker method in a transaction. * - * @param Connection $con - * @return int The number of rows affected by this insert/update - * @throws PropelException - * @see doSave() + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() */ - public function save($con = null) + public function save ($con = null) { if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); + throw new PropelException( "You cannot save an object that has been deleted." ); } - if ($con === null) { - $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME); + $con = Propel::getConnection( AddonsStorePeer::DATABASE_NAME ); } - try { $con->begin(); - $affectedRows = $this->doSave($con); + $affectedRows = $this->doSave( $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -370,33 +352,29 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param Connection $con - * @return int The number of rows affected by this insert/update and any referring - * @throws PropelException - * @see save() + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() */ - protected function doSave($con) + protected function doSave ($con) { $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { + if (! $this->alreadyInSave) { $this->alreadyInSave = true; - - // If this object has been modified, then save it to the database. if ($this->isModified()) { if ($this->isNew()) { - $pk = AddonsStorePeer::doInsert($this, $con); + $pk = AddonsStorePeer::doInsert( $this, $con ); $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which - // should always be true here (even though technically - // BasePeer::doInsert() can insert multiple rows). - - $this->setNew(false); + // should always be true here (even though technically + // BasePeer::doInsert() can insert multiple rows). + $this->setNew( false ); } else { - $affectedRows += AddonsStorePeer::doUpdate($this, $con); + $affectedRows += AddonsStorePeer::doUpdate( $this, $con ); } $this->resetModified(); // [HL] After being saved an object is no longer 'modified' } - $this->alreadyInSave = false; } return $affectedRows; @@ -404,18 +382,19 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent /** * Array of ValidationFailed objects. - * @var array ValidationFailed[] + * + * @var array ValidationFailed[] */ - protected $validationFailures = array(); + protected $validationFailures = array (); /** * Gets any ValidationFailed objects that resulted from last call to validate(). * * - * @return array ValidationFailed[] - * @see validate() + * @return array ValidationFailed[] + * @see validate() */ - public function getValidationFailures() + public function getValidationFailures () { return $this->validationFailures; } @@ -426,16 +405,16 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * If $columns is either a column name or an array of column names * only those columns are validated. * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() */ - public function validate($columns = null) + public function validate ($columns = null) { - $res = $this->doValidate($columns); + $res = $this->doValidate( $columns ); if ($res === true) { - $this->validationFailures = array(); + $this->validationFailures = array (); return true; } else { $this->validationFailures = $res; @@ -447,59 +426,51 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * This function performs the validation work for complex object models. * * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise + * also be validated. If all pass then true is returned; otherwise * an aggreagated array of ValidationFailed objects will be returned. * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; - array of ValidationFailed objects otherwise. + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. */ - protected function doValidate($columns = null) + protected function doValidate ($columns = null) { - if (!$this->alreadyInValidation) { + if (! $this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; - - $failureMap = array(); - - - if (($retval = AddonsStorePeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); + $failureMap = array (); + if (($retval = AddonsStorePeer::doValidate( $this, $columns )) !== true) { + $failureMap = array_merge( $failureMap, $retval ); } - - - $this->alreadyInValidation = false; } - - return (!empty($failureMap) ? $failureMap : true); + return (! empty( $failureMap ) ? $failureMap : true); } /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return mixed Value of field. */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + public function getByName ($name, $type = BasePeer::TYPE_PHPNAME) { - $pos = AddonsStorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); + $pos = AddonsStorePeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); + return $this->getByPosition( $pos ); } /** * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos + * @param int $pos position in xml schema + * @return mixed Value of field at $pos */ - public function getByPosition($pos) + public function getByPosition ($pos) { - switch($pos) { + switch ($pos) { case 0: return $this->getStoreId(); break; @@ -527,19 +498,19 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return an associative array containing the field names (as keys) and field values + * @param string $keyType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return an associative array containing the field names (as keys) and field values */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME) + public function toArray ($keyType = BasePeer::TYPE_PHPNAME) { - $keys = AddonsStorePeer::getFieldNames($keyType); - $result = array( + $keys = AddonsStorePeer::getFieldNames( $keyType ); + $result = array ( $keys[0] => $this->getStoreId(), $keys[1] => $this->getStoreVersion(), $keys[2] => $this->getStoreLocation(), $keys[3] => $this->getStoreType(), - $keys[4] => $this->getStoreLastUpdated(), + $keys[4] => $this->getStoreLastUpdated() ); return $result; } @@ -547,44 +518,44 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent /** * Sets a field from the object by name passed in as a string. * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return void + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return void */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + public function setByName ($name, $value, $type = BasePeer::TYPE_PHPNAME) { - $pos = AddonsStorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); + $pos = AddonsStorePeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); + return $this->setByPosition( $pos, $value ); } /** * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void */ - public function setByPosition($pos, $value) + public function setByPosition ($pos, $value) { - switch($pos) { + switch ($pos) { case 0: - $this->setStoreId($value); + $this->setStoreId( $value ); break; case 1: - $this->setStoreVersion($value); + $this->setStoreVersion( $value ); break; case 2: - $this->setStoreLocation($value); + $this->setStoreLocation( $value ); break; case 3: - $this->setStoreType($value); + $this->setStoreType( $value ); break; case 4: - $this->setStoreLastUpdated($value); + $this->setStoreLastUpdated( $value ); break; } // switch() } @@ -593,7 +564,7 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * Populates the object using an array. * * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column + * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * @@ -601,66 +572,55 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + public function fromArray ($arr, $keyType = BasePeer::TYPE_PHPNAME) { - $keys = AddonsStorePeer::getFieldNames($keyType); + $keys = AddonsStorePeer::getFieldNames( $keyType ); - if (array_key_exists($keys[0], $arr)) { - $this->setStoreId($arr[$keys[0]]); + if (array_key_exists( $keys[0], $arr )) { + $this->setStoreId( $arr[$keys[0]] ); } - - if (array_key_exists($keys[1], $arr)) { - $this->setStoreVersion($arr[$keys[1]]); + if (array_key_exists( $keys[1], $arr )) { + $this->setStoreVersion( $arr[$keys[1]] ); } - - if (array_key_exists($keys[2], $arr)) { - $this->setStoreLocation($arr[$keys[2]]); + if (array_key_exists( $keys[2], $arr )) { + $this->setStoreLocation( $arr[$keys[2]] ); } - - if (array_key_exists($keys[3], $arr)) { - $this->setStoreType($arr[$keys[3]]); + if (array_key_exists( $keys[3], $arr )) { + $this->setStoreType( $arr[$keys[3]] ); } - - if (array_key_exists($keys[4], $arr)) { - $this->setStoreLastUpdated($arr[$keys[4]]); + if (array_key_exists( $keys[4], $arr )) { + $this->setStoreLastUpdated( $arr[$keys[4]] ); } - } /** * Build a Criteria object containing the values of all modified columns in this object. * - * @return Criteria The Criteria object containing all modified values. + * @return Criteria The Criteria object containing all modified values. */ - public function buildCriteria() + public function buildCriteria () { - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); + $criteria = new Criteria( AddonsStorePeer::DATABASE_NAME ); - if ($this->isColumnModified(AddonsStorePeer::STORE_ID)) { - $criteria->add(AddonsStorePeer::STORE_ID, $this->store_id); + if ($this->isColumnModified( AddonsStorePeer::STORE_ID )) { + $criteria->add( AddonsStorePeer::STORE_ID, $this->store_id ); } - - if ($this->isColumnModified(AddonsStorePeer::STORE_VERSION)) { - $criteria->add(AddonsStorePeer::STORE_VERSION, $this->store_version); + if ($this->isColumnModified( AddonsStorePeer::STORE_VERSION )) { + $criteria->add( AddonsStorePeer::STORE_VERSION, $this->store_version ); } - - if ($this->isColumnModified(AddonsStorePeer::STORE_LOCATION)) { - $criteria->add(AddonsStorePeer::STORE_LOCATION, $this->store_location); + if ($this->isColumnModified( AddonsStorePeer::STORE_LOCATION )) { + $criteria->add( AddonsStorePeer::STORE_LOCATION, $this->store_location ); } - - if ($this->isColumnModified(AddonsStorePeer::STORE_TYPE)) { - $criteria->add(AddonsStorePeer::STORE_TYPE, $this->store_type); + if ($this->isColumnModified( AddonsStorePeer::STORE_TYPE )) { + $criteria->add( AddonsStorePeer::STORE_TYPE, $this->store_type ); } - - if ($this->isColumnModified(AddonsStorePeer::STORE_LAST_UPDATED)) { - $criteria->add(AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated); + if ($this->isColumnModified( AddonsStorePeer::STORE_LAST_UPDATED )) { + $criteria->add( AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated ); } - - return $criteria; } @@ -670,22 +630,23 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * Unlike buildCriteria() this method includes the primary key values regardless * of whether or not they have been modified. * - * @return Criteria The Criteria object containing value(s) for primary key(s). + * @return Criteria The Criteria object containing value(s) for primary key(s). */ - public function buildPkeyCriteria() + public function buildPkeyCriteria () { - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); + $criteria = new Criteria( AddonsStorePeer::DATABASE_NAME ); - $criteria->add(AddonsStorePeer::STORE_ID, $this->store_id); + $criteria->add( AddonsStorePeer::STORE_ID, $this->store_id ); return $criteria; } /** * Returns the primary key for this object (row). - * @return string + * + * @return string */ - public function getPrimaryKey() + public function getPrimaryKey () { return $this->getStoreId(); } @@ -693,12 +654,12 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent /** * Generic method to set the primary key (store_id column). * - * @param string $key Primary key. - * @return void + * @param string $key Primary key. + * @return void */ - public function setPrimaryKey($key) + public function setPrimaryKey ($key) { - $this->setStoreId($key); + $this->setStoreId( $key ); } /** @@ -707,26 +668,23 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of AddonsStore (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException + * @param object $copyObj An object of AddonsStore (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException */ - public function copyInto($copyObj, $deepCopy = false) + public function copyInto ($copyObj, $deepCopy = false) { + $copyObj->setStoreVersion( $this->store_version ); - $copyObj->setStoreVersion($this->store_version); + $copyObj->setStoreLocation( $this->store_location ); - $copyObj->setStoreLocation($this->store_location); + $copyObj->setStoreType( $this->store_type ); - $copyObj->setStoreType($this->store_type); + $copyObj->setStoreLastUpdated( $this->store_last_updated ); - $copyObj->setStoreLastUpdated($this->store_last_updated); - - - $copyObj->setNew(true); - - $copyObj->setStoreId(NULL); // this is a pkey column, so set to default value + $copyObj->setNew( true ); + $copyObj->setStoreId( null ); // this is a pkey column, so set to default value } /** @@ -737,16 +695,16 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return AddonsStore Clone of current object. - * @throws PropelException + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return AddonsStore Clone of current object. + * @throws PropelException */ - public function copy($deepCopy = false) + public function copy ($deepCopy = false) { // we use get_class(), because this might be a subclass - $clazz = get_class($this); + $clazz = get_class( $this ); $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); + $this->copyInto( $copyObj, $deepCopy ); return $copyObj; } @@ -757,9 +715,9 @@ abstract class BaseAddonsStore 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 AddonsStorePeer + * @return AddonsStorePeer */ - public function getPeer() + public function getPeer () { if (self::$peer === null) { self::$peer = new AddonsStorePeer(); diff --git a/workflow/engine/classes/model/om/BaseAddonsStorePeer.php b/workflow/engine/classes/model/om/BaseAddonsStorePeer.php index 3e8962d13..c1bb8f9cd 100644 --- a/workflow/engine/classes/model/om/BaseAddonsStorePeer.php +++ b/workflow/engine/classes/model/om/BaseAddonsStorePeer.php @@ -8,48 +8,68 @@ include_once 'classes/model/AddonsStore.php'; /** * Base static class for performing query and update operations on the 'ADDONS_STORE' table. * - * * - * @package workflow.classes.model.om + * + * @package workflow.classes.model.om */ abstract class BaseAddonsStorePeer { - /** the default database name for this class */ + /** + * the default database name for this class + */ const DATABASE_NAME = 'workflow'; - /** the table name for this class */ + /** + * the table name for this class + */ const TABLE_NAME = 'ADDONS_STORE'; - /** A class that can be returned by this peer. */ + /** + * A class that can be returned by this peer. + */ const CLASS_DEFAULT = 'classes.model.AddonsStore'; - /** The total number of columns. */ + /** + * The total number of columns. + */ const NUM_COLUMNS = 5; - /** The number of lazy-loaded columns. */ + /** + * The number of lazy-loaded columns. + */ const NUM_LAZY_LOAD_COLUMNS = 0; - - /** the column name for the STORE_ID field */ + /** + * the column name for the STORE_ID field + */ const STORE_ID = 'ADDONS_STORE.STORE_ID'; - /** the column name for the STORE_VERSION field */ + /** + * the column name for the STORE_VERSION field + */ const STORE_VERSION = 'ADDONS_STORE.STORE_VERSION'; - /** the column name for the STORE_LOCATION field */ + /** + * the column name for the STORE_LOCATION field + */ const STORE_LOCATION = 'ADDONS_STORE.STORE_LOCATION'; - /** the column name for the STORE_TYPE field */ + /** + * the column name for the STORE_TYPE field + */ const STORE_TYPE = 'ADDONS_STORE.STORE_TYPE'; - /** the column name for the STORE_LAST_UPDATED field */ + /** + * the column name for the STORE_LAST_UPDATED field + */ const STORE_LAST_UPDATED = 'ADDONS_STORE.STORE_LAST_UPDATED'; - /** The PHP to DB Name Mapping */ + /** + * The PHP to DB Name Mapping + */ private static $phpNameMap = null; - /** * holds an array of fieldnames * @@ -57,10 +77,10 @@ abstract class BaseAddonsStorePeer * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('StoreId', 'StoreVersion', 'StoreLocation', 'StoreType', 'StoreLastUpdated', ), - BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID, AddonsStorePeer::STORE_VERSION, AddonsStorePeer::STORE_LOCATION, AddonsStorePeer::STORE_TYPE, AddonsStorePeer::STORE_LAST_UPDATED, ), - BasePeer::TYPE_FIELDNAME => array ('STORE_ID', 'STORE_VERSION', 'STORE_LOCATION', 'STORE_TYPE', 'STORE_LAST_UPDATED', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) + BasePeer::TYPE_PHPNAME => array ('StoreId','StoreVersion','StoreLocation','StoreType','StoreLastUpdated'), + BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID,AddonsStorePeer::STORE_VERSION,AddonsStorePeer::STORE_LOCATION,AddonsStorePeer::STORE_TYPE,AddonsStorePeer::STORE_LAST_UPDATED), + BasePeer::TYPE_FIELDNAME => array ('STORE_ID','STORE_VERSION','STORE_LOCATION','STORE_TYPE','STORE_LAST_UPDATED'), + BasePeer::TYPE_NUM => array (0,1,2,3,4) ); /** @@ -70,36 +90,38 @@ abstract class BaseAddonsStorePeer * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('StoreId' => 0, 'StoreVersion' => 1, 'StoreLocation' => 2, 'StoreType' => 3, 'StoreLastUpdated' => 4, ), - BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID => 0, AddonsStorePeer::STORE_VERSION => 1, AddonsStorePeer::STORE_LOCATION => 2, AddonsStorePeer::STORE_TYPE => 3, AddonsStorePeer::STORE_LAST_UPDATED => 4, ), - BasePeer::TYPE_FIELDNAME => array ('STORE_ID' => 0, 'STORE_VERSION' => 1, 'STORE_LOCATION' => 2, 'STORE_TYPE' => 3, 'STORE_LAST_UPDATED' => 4, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) + BasePeer::TYPE_PHPNAME => array ('StoreId' => 0,'StoreVersion' => 1,'StoreLocation' => 2,'StoreType' => 3,'StoreLastUpdated' => 4), + BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID => 0,AddonsStorePeer::STORE_VERSION => 1,AddonsStorePeer::STORE_LOCATION => 2,AddonsStorePeer::STORE_TYPE => 3,AddonsStorePeer::STORE_LAST_UPDATED => 4), + BasePeer::TYPE_FIELDNAME => array ('STORE_ID' => 0,'STORE_VERSION' => 1,'STORE_LOCATION' => 2,'STORE_TYPE' => 3,'STORE_LAST_UPDATED' => 4), + BasePeer::TYPE_NUM => array (0,1,2,3,4) ); /** - * @return MapBuilder the map builder for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * + * @return MapBuilder the map builder for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function getMapBuilder() + public static function getMapBuilder () { include_once 'classes/model/map/AddonsStoreMapBuilder.php'; - return BasePeer::getMapBuilder('classes.model.map.AddonsStoreMapBuilder'); + return BasePeer::getMapBuilder( 'classes.model.map.AddonsStoreMapBuilder' ); } + /** * Gets a map (hash) of PHP names to DB column names. * - * @return array The PHP to DB name map for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @return array The PHP to DB name map for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. */ - public static function getPhpNameMap() + public static function getPhpNameMap () { if (self::$phpNameMap === null) { $map = AddonsStorePeer::getTableMap(); $columns = $map->getColumns(); - $nameMap = array(); + $nameMap = array (); foreach ($columns as $column) { $nameMap[$column->getPhpName()] = $column->getColumnName(); } @@ -107,21 +129,22 @@ abstract class BaseAddonsStorePeer } return self::$phpNameMap; } + /** * Translates a fieldname to another type * - * @param string $name field name - * @param string $fromType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. + * @param string $name field name + * @param string $fromType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. */ - static public function translateFieldName($name, $fromType, $toType) + static public function translateFieldName ($name, $fromType, $toType) { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + $toNames = self::getFieldNames( $toType ); + $key = isset( self::$fieldKeys[$fromType][$name] ) ? self::$fieldKeys[$fromType][$name] : null; if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + throw new PropelException( "'$name' could not be found in the field names of type '$fromType'. These are: " . print_r( self::$fieldKeys[$fromType], true ) ); } return $toNames[$key]; } @@ -129,16 +152,16 @@ abstract class BaseAddonsStorePeer /** * Returns an array of of field names. * - * @param string $type The type of fieldnames to return: - * One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return array A list of field names + * @param string $type The type of fieldnames to return: + * One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return array A list of field names */ - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + static public function getFieldNames ($type = BasePeer::TYPE_PHPNAME) { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); + if (! array_key_exists( $type, self::$fieldNames )) { + throw new PropelException( 'Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.' ); } return self::$fieldNames[$type]; } @@ -148,16 +171,17 @@ abstract class BaseAddonsStorePeer * * Using this method you can maintain SQL abstraction while using column aliases. * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $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. AddonsStorePeer::COLUMN_NAME). - * @return string + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. AddonsStorePeer::COLUMN_NAME). + * @return string */ - public static function alias($alias, $column) + public static function alias ($alias, $column) { - return str_replace(AddonsStorePeer::TABLE_NAME.'.', $alias.'.', $column); + return str_replace( AddonsStorePeer::TABLE_NAME . '.', $alias . '.', $column ); } /** @@ -167,22 +191,22 @@ abstract class BaseAddonsStorePeer * XML schema will not be added to the select list and only loaded * on demand. * - * @param criteria object containing the columns to add. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param criteria object containing the columns to add. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function addSelectColumns(Criteria $criteria) + public static function addSelectColumns (Criteria $criteria) { - $criteria->addSelectColumn(AddonsStorePeer::STORE_ID); + $criteria->addSelectColumn( AddonsStorePeer::STORE_ID ); - $criteria->addSelectColumn(AddonsStorePeer::STORE_VERSION); + $criteria->addSelectColumn( AddonsStorePeer::STORE_VERSION ); - $criteria->addSelectColumn(AddonsStorePeer::STORE_LOCATION); + $criteria->addSelectColumn( AddonsStorePeer::STORE_LOCATION ); - $criteria->addSelectColumn(AddonsStorePeer::STORE_TYPE); + $criteria->addSelectColumn( AddonsStorePeer::STORE_TYPE ); - $criteria->addSelectColumn(AddonsStorePeer::STORE_LAST_UPDATED); + $criteria->addSelectColumn( AddonsStorePeer::STORE_LAST_UPDATED ); } @@ -192,69 +216,72 @@ abstract class BaseAddonsStorePeer /** * Returns the number of rows matching criteria. * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). - * @param Connection $con - * @return int Number of matching rows. + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). + * @param Connection $con + * @return int Number of matching rows. */ - public static function doCount(Criteria $criteria, $distinct = false, $con = null) + public static function doCount (Criteria $criteria, $distinct = false, $con = null) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; // clear out anything that might confuse the ORDER BY clause $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(AddonsStorePeer::COUNT_DISTINCT); + if ($distinct || in_array( Criteria::DISTINCT, $criteria->getSelectModifiers() )) { + $criteria->addSelectColumn( AddonsStorePeer::COUNT_DISTINCT ); } else { - $criteria->addSelectColumn(AddonsStorePeer::COUNT); + $criteria->addSelectColumn( AddonsStorePeer::COUNT ); } // just in case we're grouping: add those columns to the select statement foreach ($criteria->getGroupByColumns() as $column) { - $criteria->addSelectColumn($column); + $criteria->addSelectColumn( $column ); } - $rs = AddonsStorePeer::doSelectRS($criteria, $con); + $rs = AddonsStorePeer::doSelectRS( $criteria, $con ); if ($rs->next()) { - return $rs->getInt(1); + return $rs->getInt( 1 ); } else { // no rows returned; we infer that means 0 matches. return 0; } } + /** * Method to select one object from the DB. * - * @param Criteria $criteria object used to create the SELECT statement. - * @param Connection $con - * @return AddonsStore - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param Criteria $criteria object used to create the SELECT statement. + * @param Connection $con + * @return AddonsStore + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doSelectOne(Criteria $criteria, $con = null) + public static function doSelectOne (Criteria $criteria, $con = null) { $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = AddonsStorePeer::doSelect($critcopy, $con); + $critcopy->setLimit( 1 ); + $objects = AddonsStorePeer::doSelect( $critcopy, $con ); if ($objects) { return $objects[0]; } return null; } + /** * Method to do selects. * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doSelect(Criteria $criteria, $con = null) + public static function doSelect (Criteria $criteria, $con = null) { - return AddonsStorePeer::populateObjects(AddonsStorePeer::doSelectRS($criteria, $con)); + return AddonsStorePeer::populateObjects( AddonsStorePeer::doSelectRS( $criteria, $con ) ); } + /** * Prepares the Criteria object and uses the parent doSelect() * method to get a ResultSet. @@ -262,65 +289,68 @@ abstract class BaseAddonsStorePeer * Use this method directly if you want to just get the resultset * (instead of an array of objects). * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return ResultSet The resultset object with numerically-indexed fields. - * @see BasePeer::doSelect() + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return ResultSet The resultset object with numerically-indexed fields. + * @see BasePeer::doSelect() */ - public static function doSelectRS(Criteria $criteria, $con = null) + public static function doSelectRS (Criteria $criteria, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - if (!$criteria->getSelectColumns()) { + if (! $criteria->getSelectColumns()) { $criteria = clone $criteria; - AddonsStorePeer::addSelectColumns($criteria); + AddonsStorePeer::addSelectColumns( $criteria ); } // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); // BasePeer returns a Creole ResultSet, set to return // rows indexed numerically. - return BasePeer::doSelect($criteria, $con); + return BasePeer::doSelect( $criteria, $con ); } + /** * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function populateObjects(ResultSet $rs) + public static function populateObjects (ResultSet $rs) { - $results = array(); + $results = array (); // set the class once to avoid overhead in the loop $cls = AddonsStorePeer::getOMClass(); - $cls = Propel::import($cls); + $cls = Propel::import( $cls ); // populate the object(s) while ($rs->next()) { $obj = new $cls(); - $obj->hydrate($rs); + $obj->hydrate( $rs ); $results[] = $obj; } return $results; } + /** * Returns the TableMap related to this peer. * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function getTableMap() + public static function getTableMap () { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + return Propel::getDatabaseMap( self::DATABASE_NAME )->getTable( self::TABLE_NAME ); } /** @@ -330,9 +360,9 @@ abstract class BaseAddonsStorePeer * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @return string path.to.ClassName + * @return string path.to.ClassName */ - public static function getOMClass() + public static function getOMClass () { return AddonsStorePeer::CLASS_DEFAULT; } @@ -340,16 +370,16 @@ abstract class BaseAddonsStorePeer /** * Method perform an INSERT on the database, given a AddonsStore or Criteria object. * - * @param mixed $values Criteria or AddonsStore object containing data that is used to create the INSERT statement. - * @param Connection $con the connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AddonsStore object containing data that is used to create the INSERT statement. + * @param Connection $con the connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doInsert($values, $con = null) + public static function doInsert ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } if ($values instanceof Criteria) { @@ -358,15 +388,14 @@ abstract class BaseAddonsStorePeer $criteria = $values->buildCriteria(); // build Criteria from AddonsStore object } - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); try { // use transaction because $criteria could contain info // for more than one table (I guess, conceivably) $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); + $pk = BasePeer::doInsert( $criteria, $con ); $con->commit(); } catch (PropelException $e) { $con->rollback(); @@ -379,53 +408,51 @@ abstract class BaseAddonsStorePeer /** * Method perform an UPDATE on the database, given a AddonsStore or Criteria object. * - * @param mixed $values Criteria or AddonsStore object containing data create the UPDATE statement. - * @param Connection $con The connection to use (specify Connection 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 - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or AddonsStore object containing data that is used to create the UPDATE statement. + * @param Connection $con The connection to use (specify 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 + * rethrown wrapped into a PropelException. */ - public static function doUpdate($values, $con = null) + public static function doUpdate ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - $selectCriteria = new Criteria(self::DATABASE_NAME); + $selectCriteria = new Criteria( self::DATABASE_NAME ); if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(AddonsStorePeer::STORE_ID); - $selectCriteria->add(AddonsStorePeer::STORE_ID, $criteria->remove(AddonsStorePeer::STORE_ID), $comparison); - + $comparison = $criteria->getComparison( AddonsStorePeer::STORE_ID ); + $selectCriteria->add( AddonsStorePeer::STORE_ID, $criteria->remove( AddonsStorePeer::STORE_ID ), $comparison ); } else { + // $values is AddonsStore object $criteria = $values->buildCriteria(); // gets full criteria $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) } // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); - - return BasePeer::doUpdate($selectCriteria, $criteria, $con); + $criteria->setDbName( self::DATABASE_NAME ); + return BasePeer::doUpdate( $selectCriteria, $criteria, $con ); } /** * Method to DELETE all rows from the ADDONS_STORE table. * - * @return int The number of affected rows (if supported by underlying database driver). + * @return int The number of affected rows (if supported by underlying database driver). */ - public static function doDeleteAll($con = null) + public static function doDeleteAll ($con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } $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->begin(); - $affectedRows += BasePeer::doDeleteAll(AddonsStorePeer::TABLE_NAME, $con); + $affectedRows += BasePeer::doDeleteAll( AddonsStorePeer::TABLE_NAME, $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -437,34 +464,31 @@ abstract class BaseAddonsStorePeer /** * Method perform a DELETE on the database, given a AddonsStore or Criteria object OR a primary key value. * - * @param mixed $values Criteria or AddonsStore object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param Connection $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). - * This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, $con = null) + * @param mixed $values Criteria or AddonsStore object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param Connection $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME); + $con = Propel::getConnection( AddonsStorePeer::DATABASE_NAME ); } if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity } elseif ($values instanceof AddonsStore) { - $criteria = $values->buildPkeyCriteria(); } else { // it must be the primary key - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(AddonsStorePeer::STORE_ID, (array) $values, Criteria::IN); + $criteria = new Criteria( self::DATABASE_NAME ); + $criteria->add( AddonsStorePeer::STORE_ID, (array) $values, Criteria::IN ); } - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); $affectedRows = 0; // initialize var to track total num of affected rows @@ -472,8 +496,7 @@ abstract class BaseAddonsStorePeer // use transaction because $criteria could contain info // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->begin(); - - $affectedRows += BasePeer::doDelete($criteria, $con); + $affectedRows += BasePeer::doDelete( $criteria, $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -489,86 +512,81 @@ abstract class BaseAddonsStorePeer * * NOTICE: This does not apply to primary or foreign keys for now. * - * @param AddonsStore $obj The object to validate. - * @param mixed $cols Column name or array of column names. + * @param AddonsStore $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. + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. */ - public static function doValidate(AddonsStore $obj, $cols = null) + public static function doValidate (AddonsStore $obj, $cols = null) { - $columns = array(); - + $columns = array (); if ($cols) { - $dbMap = Propel::getDatabaseMap(AddonsStorePeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(AddonsStorePeer::TABLE_NAME); - - if (! is_array($cols)) { - $cols = array($cols); + $dbMap = Propel::getDatabaseMap( AddonsStorePeer::DATABASE_NAME ); + $tableMap = $dbMap->getTable( AddonsStorePeer::TABLE_NAME ); + if (! is_array( $cols )) { + $cols = array ( + $cols); } - foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + if ($tableMap->containsColumn( $colName )) { + $get = 'get' . $tableMap->getColumn( $colName )->getPhpName(); $columns[$colName] = $obj->$get(); } } } else { } - - return BasePeer::doValidate(AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns); + return BasePeer::doValidate( AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns ); } /** * Retrieve a single object by pkey. * - * @param mixed $pk the primary key. - * @param Connection $con the connection to use - * @return AddonsStore + * @param mixed $pk the primary key. + * @param Connection $con the connection to use + * @return AddonsStore */ - public static function retrieveByPK($pk, $con = null) + public static function retrieveByPK ($pk, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME); + $criteria = new Criteria( AddonsStorePeer::DATABASE_NAME ); - $criteria->add(AddonsStorePeer::STORE_ID, $pk); + $criteria->add( AddonsStorePeer::STORE_ID, $pk ); + $v = AddonsStorePeer::doSelect( $criteria, $con ); - $v = AddonsStorePeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; + return ! empty( $v ) > 0 ? $v[0] : null; } /** * Retrieve multiple objects by pkey. * - * @param array $pks List of primary keys - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param array $pks List of primary keys + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function retrieveByPKs($pks, $con = null) + public static function retrieveByPKs ($pks, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } $objs = null; - if (empty($pks)) { - $objs = array(); + if (empty( $pks )) { + $objs = array (); } else { $criteria = new Criteria(); - $criteria->add(AddonsStorePeer::STORE_ID, $pks, Criteria::IN); - $objs = AddonsStorePeer::doSelect($criteria, $con); + $criteria->add( AddonsStorePeer::STORE_ID, $pks, Criteria::IN ); + $objs = AddonsStorePeer::doSelect( $criteria, $con ); } return $objs; } } - // static code to register the map builder for this Peer with the main Propel class if (Propel::isInit()) { // the MapBuilder classes register themselves with Propel during initialization @@ -576,12 +594,12 @@ if (Propel::isInit()) { try { BaseAddonsStorePeer::getMapBuilder(); } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); + Propel::log( 'Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR ); } } else { // even if Propel is not yet initialized, the map builder class can be registered // now and then it will be loaded when Propel initializes. require_once 'classes/model/map/AddonsStoreMapBuilder.php'; - Propel::registerMapBuilder('classes.model.map.AddonsStoreMapBuilder'); + Propel::registerMapBuilder( 'classes.model.map.AddonsStoreMapBuilder' ); } diff --git a/workflow/engine/classes/model/om/BaseLicenseManager.php b/workflow/engine/classes/model/om/BaseLicenseManager.php index 8a00d54e5..b351a4432 100644 --- a/workflow/engine/classes/model/om/BaseLicenseManager.php +++ b/workflow/engine/classes/model/om/BaseLicenseManager.php @@ -4,7 +4,6 @@ require_once 'propel/om/BaseObject.php'; require_once 'propel/om/Persistent.php'; - include_once 'propel/util/Criteria.php'; include_once 'classes/model/LicenseManagerPeer.php'; @@ -12,9 +11,8 @@ include_once 'classes/model/LicenseManagerPeer.php'; /** * Base class that represents a row from the 'LICENSE_MANAGER' table. * - * * - * @package workflow.classes.model.om + * @package classes.model.om */ abstract class BaseLicenseManager extends BaseObject implements Persistent { @@ -23,228 +21,228 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * The Peer class. * Instance provides a convenient way of calling static methods on a class * that calling code may not be able to identify. - * @var LicenseManagerPeer - */ + * + * @var LicenseManagerPeer + */ protected static $peer; /** * The value for the license_uid field. - * @var string + * + * @var string */ - protected $license_uid; + protected $license_uid = ''; /** * The value for the license_user field. - * @var string + * + * @var string */ protected $license_user = '0'; /** * The value for the license_start field. - * @var int + * + * @var int */ protected $license_start = 0; /** * The value for the license_end field. - * @var int + * + * @var int */ protected $license_end = 0; /** * The value for the license_span field. - * @var int + * + * @var int */ protected $license_span = 0; /** * The value for the license_status field. - * @var string + * + * @var string */ protected $license_status = ''; /** * The value for the license_data field. - * @var string + * + * @var string */ protected $license_data; /** * The value for the license_path field. - * @var string + * + * @var string */ protected $license_path = '0'; /** * The value for the license_workspace field. - * @var string + * + * @var string */ protected $license_workspace = '0'; /** * The value for the license_type field. - * @var string + * + * @var string */ protected $license_type = '0'; /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. - * @var boolean + * + * @var boolean */ protected $alreadyInSave = false; /** * Flag to prevent endless validation loop, if this object is referenced * by another object which falls in this transaction. - * @var boolean + * + * @var boolean */ protected $alreadyInValidation = false; /** * Get the [license_uid] column value. - * - * @return string + * + * @return string */ - public function getLicenseUid() + public function getLicenseUid () { - return $this->license_uid; } /** * Get the [license_user] column value. - * - * @return string + * + * @return string */ - public function getLicenseUser() + public function getLicenseUser () { - return $this->license_user; } /** * Get the [license_start] column value. - * - * @return int + * + * @return int */ - public function getLicenseStart() + public function getLicenseStart () { - return $this->license_start; } /** * Get the [license_end] column value. - * - * @return int + * + * @return int */ - public function getLicenseEnd() + public function getLicenseEnd () { - return $this->license_end; } /** * Get the [license_span] column value. - * - * @return int + * + * @return int */ - public function getLicenseSpan() + public function getLicenseSpan () { - return $this->license_span; } /** * Get the [license_status] column value. - * - * @return string + * + * @return string */ - public function getLicenseStatus() + public function getLicenseStatus () { - return $this->license_status; } /** * Get the [license_data] column value. - * - * @return string + * + * @return string */ - public function getLicenseData() + public function getLicenseData () { - return $this->license_data; } /** * Get the [license_path] column value. - * - * @return string + * + * @return string */ - public function getLicensePath() + public function getLicensePath () { - return $this->license_path; } /** * Get the [license_workspace] column value. - * - * @return string + * + * @return string */ - public function getLicenseWorkspace() + public function getLicenseWorkspace () { - return $this->license_workspace; } /** * Get the [license_type] column value. - * - * @return string + * + * @return string */ - public function getLicenseType() + public function getLicenseType () { - return $this->license_type; } /** * Set the value of [license_uid] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicenseUid($v) + public function setLicenseUid ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->license_uid !== $v) { + if ($this->license_uid !== $v || $v === '') { $this->license_uid = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_UID; } - } // setLicenseUid() /** * Set the value of [license_user] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicenseUser($v) + public function setLicenseUser ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -252,43 +250,38 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent $this->license_user = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_USER; } - } // setLicenseUser() /** * Set the value of [license_start] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setLicenseStart($v) + public function setLicenseStart ($v) { - // Since the native PHP type for this column is integer, // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { + if ($v !== null && ! is_int( $v ) && is_numeric( $v )) { $v = (int) $v; } - if ($this->license_start !== $v || $v === 0) { $this->license_start = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_START; } - } // setLicenseStart() /** * Set the value of [license_end] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setLicenseEnd($v) + public function setLicenseEnd ($v) { - // Since the native PHP type for this column is integer, // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { + if ($v !== null && ! is_int( $v ) && is_numeric( $v )) { $v = (int) $v; } @@ -301,16 +294,15 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent /** * Set the value of [license_span] column. - * - * @param int $v new value - * @return void + * + * @param int $v new value + * @return void */ - public function setLicenseSpan($v) + public function setLicenseSpan ($v) { - // Since the native PHP type for this column is integer, // we will cast the input value to an int (if it is not). - if ($v !== null && !is_int($v) && is_numeric($v)) { + if ($v !== null && ! is_int( $v ) && is_numeric( $v )) { $v = (int) $v; } @@ -318,21 +310,19 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent $this->license_span = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_SPAN; } - } // setLicenseSpan() /** * Set the value of [license_status] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicenseStatus($v) + public function setLicenseStatus ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -340,21 +330,19 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent $this->license_status = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_STATUS; } - } // setLicenseStatus() /** * Set the value of [license_data] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicenseData($v) + public function setLicenseData ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -367,38 +355,34 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent /** * Set the value of [license_path] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicensePath($v) + public function setLicensePath ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } - if ($this->license_path !== $v || $v === '0') { $this->license_path = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_PATH; } - } // setLicensePath() /** * Set the value of [license_workspace] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicenseWorkspace($v) + public function setLicenseWorkspace ($v) { - // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -406,21 +390,20 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent $this->license_workspace = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_WORKSPACE; } - } // setLicenseWorkspace() /** * Set the value of [license_type] column. - * - * @param string $v new value - * @return void + * + * @param string $v new value + * @return void */ - public function setLicenseType($v) + public function setLicenseType ($v) { // Since the native PHP type for this column is string, // we will cast the input to a string (if it is not). - if ($v !== null && !is_string($v)) { + if ($v !== null && ! is_string( $v )) { $v = (string) $v; } @@ -428,81 +411,80 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent $this->license_type = $v; $this->modifiedColumns[] = LicenseManagerPeer::LICENSE_TYPE; } - } // setLicenseType() /** * Hydrates (populates) the object variables with values from the database resultset. * * An offset (1-based "start column") is specified so that objects can be hydrated - * with a subset of the columns in the resultset rows. This is needed, for example, + * with a subset of the columns in the resultset rows. This is needed, for example, * for results of JOIN queries where the resultset row includes columns from two or * more tables. * - * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. - * @param int $startcol 1-based offset column which indicates which restultset column to start with. - * @return int next starting column - * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. + * @param int $startcol 1-based offset column which indicates which restultset column to start with. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. */ - public function hydrate(ResultSet $rs, $startcol = 1) + public function hydrate (ResultSet $rs, $startcol = 1) { try { - $this->license_uid = $rs->getString($startcol + 0); + $this->license_uid = $rs->getString( $startcol + 0 ); - $this->license_user = $rs->getString($startcol + 1); + $this->license_user = $rs->getString( $startcol + 1 ); - $this->license_start = $rs->getInt($startcol + 2); + $this->license_start = $rs->getInt( $startcol + 2 ); - $this->license_end = $rs->getInt($startcol + 3); + $this->license_end = $rs->getInt( $startcol + 3 ); - $this->license_span = $rs->getInt($startcol + 4); + $this->license_span = $rs->getInt( $startcol + 4 ); - $this->license_status = $rs->getString($startcol + 5); + $this->license_status = $rs->getString( $startcol + 5 ); - $this->license_data = $rs->getString($startcol + 6); + $this->license_data = $rs->getString( $startcol + 6 ); - $this->license_path = $rs->getString($startcol + 7); + $this->license_path = $rs->getString( $startcol + 7 ); - $this->license_workspace = $rs->getString($startcol + 8); + $this->license_workspace = $rs->getString( $startcol + 8 ); - $this->license_type = $rs->getString($startcol + 9); + $this->license_type = $rs->getString( $startcol + 9 ); $this->resetModified(); - $this->setNew(false); + $this->setNew( false ); // FIXME - using NUM_COLUMNS may be clearer. return $startcol + 10; // 10 = LicenseManagerPeer::NUM_COLUMNS - LicenseManagerPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { - throw new PropelException("Error populating LicenseManager object", $e); + throw new PropelException( "Error populating LicenseManager object", $e ); } } /** * Removes this object from datastore and sets delete attribute. * - * @param Connection $con - * @return void - * @throws PropelException - * @see BaseObject::setDeleted() - * @see BaseObject::isDeleted() + * @param Connection $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() */ - public function delete($con = null) + public function delete ($con = null) { if ($this->isDeleted()) { - throw new PropelException("This object has already been deleted."); + throw new PropelException( "This object has already been deleted." ); } if ($con === null) { - $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME); + $con = Propel::getConnection( LicenseManagerPeer::DATABASE_NAME ); } try { $con->begin(); - LicenseManagerPeer::doDelete($this, $con); - $this->setDeleted(true); + LicenseManagerPeer::doDelete( $this, $con ); + $this->setDeleted( true ); $con->commit(); } catch (PropelException $e) { $con->rollback(); @@ -511,28 +493,29 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent } /** - * Stores the object in the database. If the object is new, - * it inserts it; otherwise an update is performed. This method + * Stores the object in the database. + * If the object is new, + * it inserts it; otherwise an update is performed. This method * wraps the doSave() worker method in a transaction. * - * @param Connection $con - * @return int The number of rows affected by this insert/update - * @throws PropelException - * @see doSave() + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() */ - public function save($con = null) + public function save ($con = null) { if ($this->isDeleted()) { - throw new PropelException("You cannot save an object that has been deleted."); + throw new PropelException( "You cannot save an object that has been deleted." ); } if ($con === null) { - $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME); + $con = Propel::getConnection( LicenseManagerPeer::DATABASE_NAME ); } try { $con->begin(); - $affectedRows = $this->doSave($con); + $affectedRows = $this->doSave( $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -547,33 +530,30 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * If the object is new, it inserts it; otherwise an update is performed. * All related objects are also updated in this method. * - * @param Connection $con - * @return int The number of rows affected by this insert/update and any referring - * @throws PropelException - * @see save() + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() */ - protected function doSave($con) + protected function doSave ($con) { $affectedRows = 0; // initialize var to track total num of affected rows - if (!$this->alreadyInSave) { + if (! $this->alreadyInSave) { $this->alreadyInSave = true; - // If this object has been modified, then save it to the database. if ($this->isModified()) { if ($this->isNew()) { - $pk = LicenseManagerPeer::doInsert($this, $con); + $pk = LicenseManagerPeer::doInsert( $this, $con ); $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which - // should always be true here (even though technically - // BasePeer::doInsert() can insert multiple rows). - - $this->setNew(false); + // should always be true here (even though technically + // BasePeer::doInsert() can insert multiple rows). + $this->setNew( false ); } else { - $affectedRows += LicenseManagerPeer::doUpdate($this, $con); + $affectedRows += LicenseManagerPeer::doUpdate( $this, $con ); } $this->resetModified(); // [HL] After being saved an object is no longer 'modified' } - $this->alreadyInSave = false; } return $affectedRows; @@ -581,18 +561,19 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent /** * Array of ValidationFailed objects. - * @var array ValidationFailed[] + * + * @var array ValidationFailed[] */ - protected $validationFailures = array(); + protected $validationFailures = array (); /** * Gets any ValidationFailed objects that resulted from last call to validate(). * * - * @return array ValidationFailed[] - * @see validate() + * @return array ValidationFailed[] + * @see validate() */ - public function getValidationFailures() + public function getValidationFailures () { return $this->validationFailures; } @@ -603,16 +584,16 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * If $columns is either a column name or an array of column names * only those columns are validated. * - * @param mixed $columns Column name or an array of column names. - * @return boolean Whether all columns pass validation. - * @see doValidate() - * @see getValidationFailures() + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() */ - public function validate($columns = null) + public function validate ($columns = null) { - $res = $this->doValidate($columns); + $res = $this->doValidate( $columns ); if ($res === true) { - $this->validationFailures = array(); + $this->validationFailures = array (); return true; } else { $this->validationFailures = $res; @@ -624,59 +605,55 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * This function performs the validation work for complex object models. * * In addition to checking the current object, all related objects will - * also be validated. If all pass then true is returned; otherwise + * also be validated. If all pass then true is returned; otherwise * an aggreagated array of ValidationFailed objects will be returned. * - * @param array $columns Array of column names to validate. - * @return mixed true if all validations pass; - array of ValidationFailed objects otherwise. + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. */ - protected function doValidate($columns = null) + protected function doValidate ($columns = null) { - if (!$this->alreadyInValidation) { + if (! $this->alreadyInValidation) { $this->alreadyInValidation = true; $retval = null; - $failureMap = array(); + $failureMap = array (); - - if (($retval = LicenseManagerPeer::doValidate($this, $columns)) !== true) { - $failureMap = array_merge($failureMap, $retval); + if (($retval = LicenseManagerPeer::doValidate( $this, $columns )) !== true) { + $failureMap = array_merge( $failureMap, $retval ); } - - $this->alreadyInValidation = false; } - return (!empty($failureMap) ? $failureMap : true); + return (! empty( $failureMap ) ? $failureMap : true); } /** * Retrieves a field from the object by name passed in as a string. * - * @param string $name name - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return mixed Value of field. + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return mixed Value of field. */ - public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + public function getByName ($name, $type = BasePeer::TYPE_PHPNAME) { - $pos = LicenseManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->getByPosition($pos); + $pos = LicenseManagerPeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); + return $this->getByPosition( $pos ); } /** * Retrieves a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @return mixed Value of field at $pos + * @param int $pos position in xml schema + * @return mixed Value of field at $pos */ - public function getByPosition($pos) + public function getByPosition ($pos) { - switch($pos) { + switch ($pos) { case 0: return $this->getLicenseUid(); break; @@ -710,7 +687,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent default: return null; break; - } // switch() + } } /** @@ -719,14 +696,14 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * You can specify the key type of the array by passing one of the class * type constants. * - * @param string $keyType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return an associative array containing the field names (as keys) and field values + * @param string $keyType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return an associative array containing the field names (as keys) and field values */ - public function toArray($keyType = BasePeer::TYPE_PHPNAME) + public function toArray ($keyType = BasePeer::TYPE_PHPNAME) { - $keys = LicenseManagerPeer::getFieldNames($keyType); - $result = array( + $keys = LicenseManagerPeer::getFieldNames( $keyType ); + $result = array ( $keys[0] => $this->getLicenseUid(), $keys[1] => $this->getLicenseUser(), $keys[2] => $this->getLicenseStart(), @@ -736,7 +713,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent $keys[6] => $this->getLicenseData(), $keys[7] => $this->getLicensePath(), $keys[8] => $this->getLicenseWorkspace(), - $keys[9] => $this->getLicenseType(), + $keys[9] => $this->getLicenseType() ); return $result; } @@ -744,59 +721,59 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent /** * Sets a field from the object by name passed in as a string. * - * @param string $name peer name - * @param mixed $value field value - * @param string $type The type of fieldname the $name is of: - * one of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return void + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return void */ - public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + public function setByName ($name, $value, $type = BasePeer::TYPE_PHPNAME) { - $pos = LicenseManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); - return $this->setByPosition($pos, $value); + $pos = LicenseManagerPeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); + return $this->setByPosition( $pos, $value ); } /** * Sets a field from the object by Position as specified in the xml schema. * Zero-based. * - * @param int $pos position in xml schema - * @param mixed $value field value - * @return void + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void */ - public function setByPosition($pos, $value) + public function setByPosition ($pos, $value) { - switch($pos) { + switch ($pos) { case 0: - $this->setLicenseUid($value); + $this->setLicenseUid( $value ); break; case 1: - $this->setLicenseUser($value); + $this->setLicenseUser( $value ); break; case 2: - $this->setLicenseStart($value); + $this->setLicenseStart( $value ); break; case 3: - $this->setLicenseEnd($value); + $this->setLicenseEnd( $value ); break; case 4: - $this->setLicenseSpan($value); + $this->setLicenseSpan( $value ); break; case 5: - $this->setLicenseStatus($value); + $this->setLicenseStatus( $value ); break; case 6: - $this->setLicenseData($value); + $this->setLicenseData( $value ); break; case 7: - $this->setLicensePath($value); + $this->setLicensePath( $value ); break; case 8: - $this->setLicenseWorkspace($value); + $this->setLicenseWorkspace( $value ); break; case 9: - $this->setLicenseType($value); + $this->setLicenseType( $value ); break; } // switch() } @@ -805,7 +782,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * Populates the object using an array. * * This is particularly useful when populating an object from one of the - * request arrays (e.g. $_POST). This method goes through the column + * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * @@ -813,106 +790,86 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') * - * @param array $arr An array to populate the object from. - * @param string $keyType The type of keys the array uses. - * @return void + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void */ - public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + public function fromArray ($arr, $keyType = BasePeer::TYPE_PHPNAME) { - $keys = LicenseManagerPeer::getFieldNames($keyType); + $keys = LicenseManagerPeer::getFieldNames( $keyType ); - if (array_key_exists($keys[0], $arr)) { - $this->setLicenseUid($arr[$keys[0]]); + if (array_key_exists( $keys[0], $arr )) { + $this->setLicenseUid( $arr[$keys[0]] ); } - - if (array_key_exists($keys[1], $arr)) { - $this->setLicenseUser($arr[$keys[1]]); + if (array_key_exists( $keys[1], $arr )) { + $this->setLicenseUser( $arr[$keys[1]] ); } - - if (array_key_exists($keys[2], $arr)) { - $this->setLicenseStart($arr[$keys[2]]); + if (array_key_exists( $keys[2], $arr )) { + $this->setLicenseStart( $arr[$keys[2]] ); } - - if (array_key_exists($keys[3], $arr)) { - $this->setLicenseEnd($arr[$keys[3]]); + if (array_key_exists( $keys[3], $arr )) { + $this->setLicenseEnd( $arr[$keys[3]] ); } - - if (array_key_exists($keys[4], $arr)) { - $this->setLicenseSpan($arr[$keys[4]]); + if (array_key_exists( $keys[4], $arr )) { + $this->setLicenseSpan( $arr[$keys[4]] ); } - - if (array_key_exists($keys[5], $arr)) { - $this->setLicenseStatus($arr[$keys[5]]); + if (array_key_exists( $keys[5], $arr )) { + $this->setLicenseStatus( $arr[$keys[5]] ); } - - if (array_key_exists($keys[6], $arr)) { - $this->setLicenseData($arr[$keys[6]]); + if (array_key_exists( $keys[6], $arr )) { + $this->setLicenseData( $arr[$keys[6]] ); } - - if (array_key_exists($keys[7], $arr)) { - $this->setLicensePath($arr[$keys[7]]); + if (array_key_exists( $keys[7], $arr )) { + $this->setLicensePath( $arr[$keys[7]] ); } - - if (array_key_exists($keys[8], $arr)) { - $this->setLicenseWorkspace($arr[$keys[8]]); + if (array_key_exists( $keys[8], $arr )) { + $this->setLicenseWorkspace( $arr[$keys[8]] ); } - - if (array_key_exists($keys[9], $arr)) { - $this->setLicenseType($arr[$keys[9]]); + if (array_key_exists( $keys[9], $arr )) { + $this->setLicenseType( $arr[$keys[9]] ); } - } /** * Build a Criteria object containing the values of all modified columns in this object. * - * @return Criteria The Criteria object containing all modified values. + * @return Criteria The Criteria object containing all modified values. */ - public function buildCriteria() + public function buildCriteria () { - $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME); + $criteria = new Criteria( LicenseManagerPeer::DATABASE_NAME ); - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_UID)) { - $criteria->add(LicenseManagerPeer::LICENSE_UID, $this->license_uid); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_UID )) { + $criteria->add( LicenseManagerPeer::LICENSE_UID, $this->license_uid ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_USER)) { - $criteria->add(LicenseManagerPeer::LICENSE_USER, $this->license_user); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_USER )) { + $criteria->add( LicenseManagerPeer::LICENSE_USER, $this->license_user ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_START)) { - $criteria->add(LicenseManagerPeer::LICENSE_START, $this->license_start); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_START )) { + $criteria->add( LicenseManagerPeer::LICENSE_START, $this->license_start ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_END)) { - $criteria->add(LicenseManagerPeer::LICENSE_END, $this->license_end); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_END )) { + $criteria->add( LicenseManagerPeer::LICENSE_END, $this->license_end ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_SPAN)) { - $criteria->add(LicenseManagerPeer::LICENSE_SPAN, $this->license_span); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_SPAN )) { + $criteria->add( LicenseManagerPeer::LICENSE_SPAN, $this->license_span ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_STATUS)) { - $criteria->add(LicenseManagerPeer::LICENSE_STATUS, $this->license_status); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_STATUS )) { + $criteria->add( LicenseManagerPeer::LICENSE_STATUS, $this->license_status ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_DATA)) { - $criteria->add(LicenseManagerPeer::LICENSE_DATA, $this->license_data); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_DATA )) { + $criteria->add( LicenseManagerPeer::LICENSE_DATA, $this->license_data ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_PATH)) { - $criteria->add(LicenseManagerPeer::LICENSE_PATH, $this->license_path); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_PATH )) { + $criteria->add( LicenseManagerPeer::LICENSE_PATH, $this->license_path ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_WORKSPACE)) { - $criteria->add(LicenseManagerPeer::LICENSE_WORKSPACE, $this->license_workspace); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_WORKSPACE )) { + $criteria->add( LicenseManagerPeer::LICENSE_WORKSPACE, $this->license_workspace ); } - - if ($this->isColumnModified(LicenseManagerPeer::LICENSE_TYPE)) { - $criteria->add(LicenseManagerPeer::LICENSE_TYPE, $this->license_type); + if ($this->isColumnModified( LicenseManagerPeer::LICENSE_TYPE )) { + $criteria->add( LicenseManagerPeer::LICENSE_TYPE, $this->license_type ); } - return $criteria; } @@ -922,22 +879,23 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * Unlike buildCriteria() this method includes the primary key values regardless * of whether or not they have been modified. * - * @return Criteria The Criteria object containing value(s) for primary key(s). + * @return Criteria The Criteria object containing value(s) for primary key(s). */ - public function buildPkeyCriteria() + public function buildPkeyCriteria () { - $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME); + $criteria = new Criteria( LicenseManagerPeer::DATABASE_NAME ); - $criteria->add(LicenseManagerPeer::LICENSE_UID, $this->license_uid); + $criteria->add( LicenseManagerPeer::LICENSE_UID, $this->license_uid ); return $criteria; } /** * Returns the primary key for this object (row). - * @return string + * + * @return string */ - public function getPrimaryKey() + public function getPrimaryKey () { return $this->getLicenseUid(); } @@ -945,12 +903,12 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent /** * Generic method to set the primary key (license_uid column). * - * @param string $key Primary key. - * @return void + * @param string $key Primary key. + * @return void */ - public function setPrimaryKey($key) + public function setPrimaryKey ($key) { - $this->setLicenseUid($key); + $this->setLicenseUid( $key ); } /** @@ -959,35 +917,34 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of LicenseManager (or compatible) type. - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @throws PropelException + * @param object $copyObj An object of LicenseManager (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException */ - public function copyInto($copyObj, $deepCopy = false) + public function copyInto ($copyObj, $deepCopy = false) { - $copyObj->setLicenseUser($this->license_user); + $copyObj->setLicenseUser( $this->license_user ); - $copyObj->setLicenseStart($this->license_start); + $copyObj->setLicenseStart( $this->license_start ); - $copyObj->setLicenseEnd($this->license_end); + $copyObj->setLicenseEnd( $this->license_end ); - $copyObj->setLicenseSpan($this->license_span); + $copyObj->setLicenseSpan( $this->license_span ); - $copyObj->setLicenseStatus($this->license_status); + $copyObj->setLicenseStatus( $this->license_status ); - $copyObj->setLicenseData($this->license_data); + $copyObj->setLicenseData( $this->license_data ); - $copyObj->setLicensePath($this->license_path); + $copyObj->setLicensePath( $this->license_path ); - $copyObj->setLicenseWorkspace($this->license_workspace); + $copyObj->setLicenseWorkspace( $this->license_workspace ); - $copyObj->setLicenseType($this->license_type); + $copyObj->setLicenseType( $this->license_type ); + $copyObj->setNew( true ); - $copyObj->setNew(true); - - $copyObj->setLicenseUid(NULL); // this is a pkey column, so set to default value + $copyObj->setLicenseUid( '' ); // this is a pkey column, so set to default value } @@ -999,16 +956,16 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return LicenseManager Clone of current object. - * @throws PropelException + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return LicenseManager Clone of current object. + * @throws PropelException */ - public function copy($deepCopy = false) + public function copy ($deepCopy = false) { // we use get_class(), because this might be a subclass - $clazz = get_class($this); + $clazz = get_class( $this ); $copyObj = new $clazz(); - $this->copyInto($copyObj, $deepCopy); + $this->copyInto( $copyObj, $deepCopy ); return $copyObj; } @@ -1019,9 +976,9 @@ abstract class BaseLicenseManager 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 LicenseManagerPeer + * @return LicenseManagerPeer */ - public function getPeer() + public function getPeer () { if (self::$peer === null) { self::$peer = new LicenseManagerPeer(); diff --git a/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php b/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php index 6af8fe358..c80984c72 100644 --- a/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php +++ b/workflow/engine/classes/model/om/BaseLicenseManagerPeer.php @@ -8,63 +8,93 @@ include_once 'classes/model/LicenseManager.php'; /** * Base static class for performing query and update operations on the 'LICENSE_MANAGER' table. * - * * - * @package workflow.classes.model.om + * + * @package classes.model.om */ abstract class BaseLicenseManagerPeer { - /** the default database name for this class */ + /** + * the default database name for this class + */ const DATABASE_NAME = 'workflow'; - /** the table name for this class */ + /** + * the table name for this class + */ const TABLE_NAME = 'LICENSE_MANAGER'; - /** A class that can be returned by this peer. */ + /** + * A class that can be returned by this peer. + */ const CLASS_DEFAULT = 'classes.model.LicenseManager'; - /** The total number of columns. */ + /** + * The total number of columns. + */ const NUM_COLUMNS = 10; - /** The number of lazy-loaded columns. */ + /** + * The number of lazy-loaded columns. + */ const NUM_LAZY_LOAD_COLUMNS = 0; - - /** the column name for the LICENSE_UID field */ + /** + * the column name for the LICENSE_UID field + */ const LICENSE_UID = 'LICENSE_MANAGER.LICENSE_UID'; - /** the column name for the LICENSE_USER field */ + /** + * the column name for the LICENSE_USER field + */ const LICENSE_USER = 'LICENSE_MANAGER.LICENSE_USER'; - /** the column name for the LICENSE_START field */ + /** + * the column name for the LICENSE_START field + */ const LICENSE_START = 'LICENSE_MANAGER.LICENSE_START'; - /** the column name for the LICENSE_END field */ + /** + * the column name for the LICENSE_END field + */ const LICENSE_END = 'LICENSE_MANAGER.LICENSE_END'; - /** the column name for the LICENSE_SPAN field */ + /** + * the column name for the LICENSE_SPAN field + */ const LICENSE_SPAN = 'LICENSE_MANAGER.LICENSE_SPAN'; - /** the column name for the LICENSE_STATUS field */ + /** + * the column name for the LICENSE_STATUS field + */ const LICENSE_STATUS = 'LICENSE_MANAGER.LICENSE_STATUS'; - /** the column name for the LICENSE_DATA field */ + /** + * the column name for the LICENSE_DATA field + */ const LICENSE_DATA = 'LICENSE_MANAGER.LICENSE_DATA'; - /** the column name for the LICENSE_PATH field */ + /** + * the column name for the LICENSE_PATH field + */ const LICENSE_PATH = 'LICENSE_MANAGER.LICENSE_PATH'; - /** the column name for the LICENSE_WORKSPACE field */ + /** + * the column name for the LICENSE_WORKSPACE field + */ const LICENSE_WORKSPACE = 'LICENSE_MANAGER.LICENSE_WORKSPACE'; - /** the column name for the LICENSE_TYPE field */ + /** + * the column name for the LICENSE_TYPE field + */ const LICENSE_TYPE = 'LICENSE_MANAGER.LICENSE_TYPE'; - /** The PHP to DB Name Mapping */ + /** + * The PHP to DB Name Mapping + */ private static $phpNameMap = null; - /** * holds an array of fieldnames * @@ -72,10 +102,10 @@ abstract class BaseLicenseManagerPeer * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('LicenseUid', 'LicenseUser', 'LicenseStart', 'LicenseEnd', 'LicenseSpan', 'LicenseStatus', 'LicenseData', 'LicensePath', 'LicenseWorkspace', 'LicenseType', ), - BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID, LicenseManagerPeer::LICENSE_USER, LicenseManagerPeer::LICENSE_START, LicenseManagerPeer::LICENSE_END, LicenseManagerPeer::LICENSE_SPAN, LicenseManagerPeer::LICENSE_STATUS, LicenseManagerPeer::LICENSE_DATA, LicenseManagerPeer::LICENSE_PATH, LicenseManagerPeer::LICENSE_WORKSPACE, LicenseManagerPeer::LICENSE_TYPE, ), - BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID', 'LICENSE_USER', 'LICENSE_START', 'LICENSE_END', 'LICENSE_SPAN', 'LICENSE_STATUS', 'LICENSE_DATA', 'LICENSE_PATH', 'LICENSE_WORKSPACE', 'LICENSE_TYPE', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) + BasePeer::TYPE_PHPNAME => array ('LicenseUid','LicenseUser','LicenseStart','LicenseEnd','LicenseSpan','LicenseStatus','LicenseData','LicensePath','LicenseWorkspace','LicenseType'), + BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID,LicenseManagerPeer::LICENSE_USER,LicenseManagerPeer::LICENSE_START,LicenseManagerPeer::LICENSE_END,LicenseManagerPeer::LICENSE_SPAN,LicenseManagerPeer::LICENSE_STATUS,LicenseManagerPeer::LICENSE_DATA,LicenseManagerPeer::LICENSE_PATH,LicenseManagerPeer::LICENSE_WORKSPACE,LicenseManagerPeer::LICENSE_TYPE), + BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID','LICENSE_USER','LICENSE_START','LICENSE_END','LICENSE_SPAN','LICENSE_STATUS','LICENSE_DATA','LICENSE_PATH','LICENSE_WORKSPACE','LICENSE_TYPE'), + BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9) ); /** @@ -85,36 +115,38 @@ abstract class BaseLicenseManagerPeer * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('LicenseUid' => 0, 'LicenseUser' => 1, 'LicenseStart' => 2, 'LicenseEnd' => 3, 'LicenseSpan' => 4, 'LicenseStatus' => 5, 'LicenseData' => 6, 'LicensePath' => 7, 'LicenseWorkspace' => 8, 'LicenseType' => 9, ), - BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID => 0, LicenseManagerPeer::LICENSE_USER => 1, LicenseManagerPeer::LICENSE_START => 2, LicenseManagerPeer::LICENSE_END => 3, LicenseManagerPeer::LICENSE_SPAN => 4, LicenseManagerPeer::LICENSE_STATUS => 5, LicenseManagerPeer::LICENSE_DATA => 6, LicenseManagerPeer::LICENSE_PATH => 7, LicenseManagerPeer::LICENSE_WORKSPACE => 8, LicenseManagerPeer::LICENSE_TYPE => 9, ), - BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID' => 0, 'LICENSE_USER' => 1, 'LICENSE_START' => 2, 'LICENSE_END' => 3, 'LICENSE_SPAN' => 4, 'LICENSE_STATUS' => 5, 'LICENSE_DATA' => 6, 'LICENSE_PATH' => 7, 'LICENSE_WORKSPACE' => 8, 'LICENSE_TYPE' => 9, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) + BasePeer::TYPE_PHPNAME => array ('LicenseUid' => 0,'LicenseUser' => 1,'LicenseStart' => 2,'LicenseEnd' => 3,'LicenseSpan' => 4,'LicenseStatus' => 5,'LicenseData' => 6,'LicensePath' => 7,'LicenseWorkspace' => 8,'LicenseType' => 9), + BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID => 0,LicenseManagerPeer::LICENSE_USER => 1,LicenseManagerPeer::LICENSE_START => 2,LicenseManagerPeer::LICENSE_END => 3,LicenseManagerPeer::LICENSE_SPAN => 4,LicenseManagerPeer::LICENSE_STATUS => 5,LicenseManagerPeer::LICENSE_DATA => 6,LicenseManagerPeer::LICENSE_PATH => 7,LicenseManagerPeer::LICENSE_WORKSPACE => 8,LicenseManagerPeer::LICENSE_TYPE => 9), + BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID' => 0,'LICENSE_USER' => 1,'LICENSE_START' => 2,'LICENSE_END' => 3,'LICENSE_SPAN' => 4,'LICENSE_STATUS' => 5,'LICENSE_DATA' => 6,'LICENSE_PATH' => 7,'LICENSE_WORKSPACE' => 8,'LICENSE_TYPE' => 9), + BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9) ); /** - * @return MapBuilder the map builder for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * + * @return MapBuilder the map builder for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function getMapBuilder() + public static function getMapBuilder () { include_once 'classes/model/map/LicenseManagerMapBuilder.php'; - return BasePeer::getMapBuilder('classes.model.map.LicenseManagerMapBuilder'); + return BasePeer::getMapBuilder( 'classes.model.map.LicenseManagerMapBuilder' ); } + /** * Gets a map (hash) of PHP names to DB column names. * - * @return array The PHP to DB name map for this peer - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @return array The PHP to DB name map for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. */ - public static function getPhpNameMap() + public static function getPhpNameMap () { if (self::$phpNameMap === null) { $map = LicenseManagerPeer::getTableMap(); $columns = $map->getColumns(); - $nameMap = array(); + $nameMap = array (); foreach ($columns as $column) { $nameMap[$column->getPhpName()] = $column->getColumnName(); } @@ -122,21 +154,22 @@ abstract class BaseLicenseManagerPeer } return self::$phpNameMap; } + /** * Translates a fieldname to another type * - * @param string $name field name - * @param string $fromType One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @param string $toType One of the class type constants - * @return string translated name of the field. + * @param string $name field name + * @param string $fromType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. */ - static public function translateFieldName($name, $fromType, $toType) + static public function translateFieldName ($name, $fromType, $toType) { - $toNames = self::getFieldNames($toType); - $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + $toNames = self::getFieldNames( $toType ); + $key = isset( self::$fieldKeys[$fromType][$name] ) ? self::$fieldKeys[$fromType][$name] : null; if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + throw new PropelException( "'$name' could not be found in the field names of type '$fromType'. These are: " . print_r( self::$fieldKeys[$fromType], true ) ); } return $toNames[$key]; } @@ -144,16 +177,16 @@ abstract class BaseLicenseManagerPeer /** * Returns an array of of field names. * - * @param string $type The type of fieldnames to return: - * One of the class type constants TYPE_PHPNAME, - * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM - * @return array A list of field names + * @param string $type The type of fieldnames to return: + * One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return array A list of field names */ - static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + static public function getFieldNames ($type = BasePeer::TYPE_PHPNAME) { - if (!array_key_exists($type, self::$fieldNames)) { - throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); + if (! array_key_exists( $type, self::$fieldNames )) { + throw new PropelException( 'Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.' ); } return self::$fieldNames[$type]; } @@ -163,16 +196,17 @@ abstract class BaseLicenseManagerPeer * * Using this method you can maintain SQL abstraction while using column aliases. * - * $c->addAlias("alias1", TablePeer::TABLE_NAME); - * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $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. LicenseManagerPeer::COLUMN_NAME). - * @return string + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. LicenseManagerPeer::COLUMN_NAME). + * @return string */ - public static function alias($alias, $column) + public static function alias ($alias, $column) { - return str_replace(LicenseManagerPeer::TABLE_NAME.'.', $alias.'.', $column); + return str_replace( LicenseManagerPeer::TABLE_NAME . '.', $alias . '.', $column ); } /** @@ -182,32 +216,32 @@ abstract class BaseLicenseManagerPeer * XML schema will not be added to the select list and only loaded * on demand. * - * @param criteria object containing the columns to add. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param criteria object containing the columns to add. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function addSelectColumns(Criteria $criteria) + public static function addSelectColumns (Criteria $criteria) { - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_UID); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_UID ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_USER ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_START); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_START ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_END); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_END ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_SPAN); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_SPAN ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_STATUS); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_STATUS ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_DATA); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_DATA ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_PATH); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_PATH ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_WORKSPACE); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_WORKSPACE ); - $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_TYPE); + $criteria->addSelectColumn( LicenseManagerPeer::LICENSE_TYPE ); } @@ -217,69 +251,72 @@ abstract class BaseLicenseManagerPeer /** * Returns the number of rows matching criteria. * - * @param Criteria $criteria - * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). - * @param Connection $con - * @return int Number of matching rows. + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). + * @param Connection $con + * @return int Number of matching rows. */ - public static function doCount(Criteria $criteria, $distinct = false, $con = null) + public static function doCount (Criteria $criteria, $distinct = false, $con = null) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; // clear out anything that might confuse the ORDER BY clause $criteria->clearSelectColumns()->clearOrderByColumns(); - if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { - $criteria->addSelectColumn(LicenseManagerPeer::COUNT_DISTINCT); + if ($distinct || in_array( Criteria::DISTINCT, $criteria->getSelectModifiers() )) { + $criteria->addSelectColumn( LicenseManagerPeer::COUNT_DISTINCT ); } else { - $criteria->addSelectColumn(LicenseManagerPeer::COUNT); + $criteria->addSelectColumn( LicenseManagerPeer::COUNT ); } // just in case we're grouping: add those columns to the select statement foreach ($criteria->getGroupByColumns() as $column) { - $criteria->addSelectColumn($column); + $criteria->addSelectColumn( $column ); } - $rs = LicenseManagerPeer::doSelectRS($criteria, $con); + $rs = LicenseManagerPeer::doSelectRS( $criteria, $con ); if ($rs->next()) { - return $rs->getInt(1); + return $rs->getInt( 1 ); } else { // no rows returned; we infer that means 0 matches. return 0; } } + /** * Method to select one object from the DB. * - * @param Criteria $criteria object used to create the SELECT statement. - * @param Connection $con - * @return LicenseManager - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param Criteria $criteria object used to create the SELECT statement. + * @param Connection $con + * @return LicenseManager + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doSelectOne(Criteria $criteria, $con = null) + public static function doSelectOne (Criteria $criteria, $con = null) { $critcopy = clone $criteria; - $critcopy->setLimit(1); - $objects = LicenseManagerPeer::doSelect($critcopy, $con); + $critcopy->setLimit( 1 ); + $objects = LicenseManagerPeer::doSelect( $critcopy, $con ); if ($objects) { return $objects[0]; } return null; } + /** * Method to do selects. * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con - * @return array Array of selected Objects - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doSelect(Criteria $criteria, $con = null) + public static function doSelect (Criteria $criteria, $con = null) { - return LicenseManagerPeer::populateObjects(LicenseManagerPeer::doSelectRS($criteria, $con)); + return LicenseManagerPeer::populateObjects( LicenseManagerPeer::doSelectRS( $criteria, $con ) ); } + /** * Prepares the Criteria object and uses the parent doSelect() * method to get a ResultSet. @@ -287,65 +324,66 @@ abstract class BaseLicenseManagerPeer * Use this method directly if you want to just get the resultset * (instead of an array of objects). * - * @param Criteria $criteria The Criteria object used to build the SELECT statement. - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - * @return ResultSet The resultset object with numerically-indexed fields. - * @see BasePeer::doSelect() + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return ResultSet The resultset object with numerically-indexed fields. + * @see BasePeer::doSelect() */ - public static function doSelectRS(Criteria $criteria, $con = null) + public static function doSelectRS (Criteria $criteria, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - if (!$criteria->getSelectColumns()) { + if (! $criteria->getSelectColumns()) { $criteria = clone $criteria; - LicenseManagerPeer::addSelectColumns($criteria); + LicenseManagerPeer::addSelectColumns( $criteria ); } // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); // BasePeer returns a Creole ResultSet, set to return // rows indexed numerically. - return BasePeer::doSelect($criteria, $con); + return BasePeer::doSelect( $criteria, $con ); } + /** * The returned array will contain objects of the default type or * objects that inherit from the default. * - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function populateObjects(ResultSet $rs) + public static function populateObjects (ResultSet $rs) { - $results = array(); + $results = array (); // set the class once to avoid overhead in the loop $cls = LicenseManagerPeer::getOMClass(); - $cls = Propel::import($cls); + $cls = Propel::import( $cls ); // populate the object(s) while ($rs->next()) { - $obj = new $cls(); - $obj->hydrate($rs); + $obj->hydrate( $rs ); $results[] = $obj; - } return $results; } + /** * Returns the TableMap related to this peer. * This method is not needed for general use but a specific application could have a need. - * @return TableMap - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function getTableMap() + public static function getTableMap () { - return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + return Propel::getDatabaseMap( self::DATABASE_NAME )->getTable( self::TABLE_NAME ); } /** @@ -355,9 +393,9 @@ abstract class BaseLicenseManagerPeer * relative to a location on the PHP include_path. * (e.g. path.to.MyClass -> 'path/to/MyClass.php') * - * @return string path.to.ClassName + * @return string path.to.ClassName */ - public static function getOMClass() + public static function getOMClass () { return LicenseManagerPeer::CLASS_DEFAULT; } @@ -365,16 +403,16 @@ abstract class BaseLicenseManagerPeer /** * Method perform an INSERT on the database, given a LicenseManager or Criteria object. * - * @param mixed $values Criteria or LicenseManager object containing data that is used to create the INSERT statement. - * @param Connection $con the connection to use - * @return mixed The new primary key. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or LicenseManager object containing data that is used to create the INSERT statement. + * @param Connection $con the connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function doInsert($values, $con = null) + public static function doInsert ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } if ($values instanceof Criteria) { @@ -383,15 +421,14 @@ abstract class BaseLicenseManagerPeer $criteria = $values->buildCriteria(); // build Criteria from LicenseManager object } - // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); try { // use transaction because $criteria could contain info // for more than one table (I guess, conceivably) $con->begin(); - $pk = BasePeer::doInsert($criteria, $con); + $pk = BasePeer::doInsert( $criteria, $con ); $con->commit(); } catch (PropelException $e) { $con->rollback(); @@ -404,53 +441,53 @@ abstract class BaseLicenseManagerPeer /** * Method perform an UPDATE on the database, given a LicenseManager or Criteria object. * - * @param mixed $values Criteria or LicenseManager object containing data create the UPDATE statement. - * @param Connection $con The connection to use (specify Connection 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 - * rethrown wrapped into a PropelException. + * @param mixed $values Criteria or LicenseManager object containing data that is used to create the UPDATE statement. + * @param Connection $con The connection to use (specify 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 + * rethrown wrapped into a PropelException. */ - public static function doUpdate($values, $con = null) + public static function doUpdate ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - $selectCriteria = new Criteria(self::DATABASE_NAME); + $selectCriteria = new Criteria( self::DATABASE_NAME ); if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity - - $comparison = $criteria->getComparison(LicenseManagerPeer::LICENSE_UID); - $selectCriteria->add(LicenseManagerPeer::LICENSE_UID, $criteria->remove(LicenseManagerPeer::LICENSE_UID), $comparison); + $comparison = $criteria->getComparison( LicenseManagerPeer::LICENSE_UID ); + $selectCriteria->add( LicenseManagerPeer::LICENSE_UID, $criteria->remove( LicenseManagerPeer::LICENSE_UID ), $comparison ); } else { + // $values is LicenseManager object $criteria = $values->buildCriteria(); // gets full criteria $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) } // set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); - return BasePeer::doUpdate($selectCriteria, $criteria, $con); + return BasePeer::doUpdate( $selectCriteria, $criteria, $con ); } /** * Method to DELETE all rows from the LICENSE_MANAGER table. * - * @return int The number of affected rows (if supported by underlying database driver). + * @return int The number of affected rows (if supported by underlying database driver). */ - public static function doDeleteAll($con = null) + public static function doDeleteAll ($con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } $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->begin(); - $affectedRows += BasePeer::doDeleteAll(LicenseManagerPeer::TABLE_NAME, $con); + $affectedRows += BasePeer::doDeleteAll( LicenseManagerPeer::TABLE_NAME, $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -462,34 +499,32 @@ abstract class BaseLicenseManagerPeer /** * Method perform a DELETE on the database, given a LicenseManager or Criteria object OR a primary key value. * - * @param mixed $values Criteria or LicenseManager object or primary key or array of primary keys - * which is used to create the DELETE statement - * @param Connection $con the connection to use - * @return int The number of affected rows (if supported by underlying database driver). - * This includes CASCADE-related rows - * if supported by native driver or if emulated using Propel. - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. - */ - public static function doDelete($values, $con = null) + * @param mixed $values Criteria or LicenseManager object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param Connection $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete ($values, $con = null) { if ($con === null) { - $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME); + $con = Propel::getConnection( LicenseManagerPeer::DATABASE_NAME ); } if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity } elseif ($values instanceof LicenseManager) { - $criteria = $values->buildPkeyCriteria(); } else { // it must be the primary key - $criteria = new Criteria(self::DATABASE_NAME); - $criteria->add(LicenseManagerPeer::LICENSE_UID, (array) $values, Criteria::IN); + $criteria = new Criteria( self::DATABASE_NAME ); + $criteria->add( LicenseManagerPeer::LICENSE_UID, (array) $values, Criteria::IN ); } // Set the correct dbName - $criteria->setDbName(self::DATABASE_NAME); + $criteria->setDbName( self::DATABASE_NAME ); $affectedRows = 0; // initialize var to track total num of affected rows @@ -498,7 +533,7 @@ abstract class BaseLicenseManagerPeer // for more than one table or we could emulating ON DELETE CASCADE, etc. $con->begin(); - $affectedRows += BasePeer::doDelete($criteria, $con); + $affectedRows += BasePeer::doDelete( $criteria, $con ); $con->commit(); return $affectedRows; } catch (PropelException $e) { @@ -514,26 +549,28 @@ abstract class BaseLicenseManagerPeer * * NOTICE: This does not apply to primary or foreign keys for now. * - * @param LicenseManager $obj The object to validate. - * @param mixed $cols Column name or array of column names. + * @param LicenseManager $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. + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. */ - public static function doValidate(LicenseManager $obj, $cols = null) + public static function doValidate (LicenseManager $obj, $cols = null) { - $columns = array(); + $columns = array (); if ($cols) { - $dbMap = Propel::getDatabaseMap(LicenseManagerPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(LicenseManagerPeer::TABLE_NAME); + $dbMap = Propel::getDatabaseMap( LicenseManagerPeer::DATABASE_NAME ); + $tableMap = $dbMap->getTable( LicenseManagerPeer::TABLE_NAME ); - if (! is_array($cols)) { - $cols = array($cols); + if (! is_array( $cols )) { + $cols = array ( + $cols + ); } foreach ($cols as $colName) { - if ($tableMap->containsColumn($colName)) { - $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + if ($tableMap->containsColumn( $colName )) { + $get = 'get' . $tableMap->getColumn( $colName )->getPhpName(); $columns[$colName] = $obj->$get(); } } @@ -541,59 +578,57 @@ abstract class BaseLicenseManagerPeer } - return BasePeer::doValidate(LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns); + return BasePeer::doValidate( LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns ); } /** * Retrieve a single object by pkey. * - * @param mixed $pk the primary key. - * @param Connection $con the connection to use - * @return LicenseManager + * @param mixed $pk the primary key. + * @param Connection $con the connection to use + * @return LicenseManager */ - public static function retrieveByPK($pk, $con = null) + public static function retrieveByPK ($pk, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } - $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME); + $criteria = new Criteria( LicenseManagerPeer::DATABASE_NAME ); - $criteria->add(LicenseManagerPeer::LICENSE_UID, $pk); + $criteria->add( LicenseManagerPeer::LICENSE_UID, $pk ); + $v = LicenseManagerPeer::doSelect( $criteria, $con ); - $v = LicenseManagerPeer::doSelect($criteria, $con); - - return !empty($v) > 0 ? $v[0] : null; + return ! empty( $v ) > 0 ? $v[0] : null; } /** * Retrieve multiple objects by pkey. * - * @param array $pks List of primary keys - * @param Connection $con the connection to use - * @throws PropelException Any exceptions caught during processing will be - * rethrown wrapped into a PropelException. + * @param array $pks List of primary keys + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. */ - public static function retrieveByPKs($pks, $con = null) + public static function retrieveByPKs ($pks, $con = null) { if ($con === null) { - $con = Propel::getConnection(self::DATABASE_NAME); + $con = Propel::getConnection( self::DATABASE_NAME ); } $objs = null; - if (empty($pks)) { - $objs = array(); + if (empty( $pks )) { + $objs = array (); } else { $criteria = new Criteria(); - $criteria->add(LicenseManagerPeer::LICENSE_UID, $pks, Criteria::IN); - $objs = LicenseManagerPeer::doSelect($criteria, $con); + $criteria->add( LicenseManagerPeer::LICENSE_UID, $pks, Criteria::IN ); + $objs = LicenseManagerPeer::doSelect( $criteria, $con ); } return $objs; } } - // static code to register the map builder for this Peer with the main Propel class if (Propel::isInit()) { // the MapBuilder classes register themselves with Propel during initialization @@ -601,12 +636,12 @@ if (Propel::isInit()) { try { BaseLicenseManagerPeer::getMapBuilder(); } catch (Exception $e) { - Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); + Propel::log( 'Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR ); } } else { // even if Propel is not yet initialized, the map builder class can be registered // now and then it will be loaded when Propel initializes. require_once 'classes/model/map/LicenseManagerMapBuilder.php'; - Propel::registerMapBuilder('classes.model.map.LicenseManagerMapBuilder'); + Propel::registerMapBuilder( 'classes.model.map.LicenseManagerMapBuilder' ); } diff --git a/workflow/engine/classes/model/om/BaseListParticipatedLast.php b/workflow/engine/classes/model/om/BaseListParticipatedLast.php index 4d7e2e499..c06821fa7 100644 --- a/workflow/engine/classes/model/om/BaseListParticipatedLast.php +++ b/workflow/engine/classes/model/om/BaseListParticipatedLast.php @@ -1784,7 +1784,7 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent $copyObj->setUsrUid(''); // this is a pkey column, so set to default value - $copyObj->setDelIndex(''); // this is a pkey column, so set to default value + $copyObj->setDelIndex('0'); // this is a pkey column, so set to default value }