BaseCcLoginAttempts.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. <?php
  2. /**
  3. * Base class that represents a row from the 'cc_login_attempts' table.
  4. *
  5. *
  6. *
  7. * @package propel.generator.airtime.om
  8. */
  9. abstract class BaseCcLoginAttempts extends BaseObject implements Persistent
  10. {
  11. /**
  12. * Peer class name
  13. */
  14. const PEER = 'CcLoginAttemptsPeer';
  15. /**
  16. * The Peer class.
  17. * Instance provides a convenient way of calling static methods on a class
  18. * that calling code may not be able to identify.
  19. * @var CcLoginAttemptsPeer
  20. */
  21. protected static $peer;
  22. /**
  23. * The value for the ip field.
  24. * @var string
  25. */
  26. protected $ip;
  27. /**
  28. * The value for the attempts field.
  29. * Note: this column has a database default value of: 0
  30. * @var int
  31. */
  32. protected $attempts;
  33. /**
  34. * Flag to prevent endless save loop, if this object is referenced
  35. * by another object which falls in this transaction.
  36. * @var boolean
  37. */
  38. protected $alreadyInSave = false;
  39. /**
  40. * Flag to prevent endless validation loop, if this object is referenced
  41. * by another object which falls in this transaction.
  42. * @var boolean
  43. */
  44. protected $alreadyInValidation = false;
  45. /**
  46. * Applies default values to this object.
  47. * This method should be called from the object's constructor (or
  48. * equivalent initialization method).
  49. * @see __construct()
  50. */
  51. public function applyDefaultValues()
  52. {
  53. $this->attempts = 0;
  54. }
  55. /**
  56. * Initializes internal state of BaseCcLoginAttempts object.
  57. * @see applyDefaults()
  58. */
  59. public function __construct()
  60. {
  61. parent::__construct();
  62. $this->applyDefaultValues();
  63. }
  64. /**
  65. * Get the [ip] column value.
  66. *
  67. * @return string
  68. */
  69. public function getDbIP()
  70. {
  71. return $this->ip;
  72. }
  73. /**
  74. * Get the [attempts] column value.
  75. *
  76. * @return int
  77. */
  78. public function getDbAttempts()
  79. {
  80. return $this->attempts;
  81. }
  82. /**
  83. * Set the value of [ip] column.
  84. *
  85. * @param string $v new value
  86. * @return CcLoginAttempts The current object (for fluent API support)
  87. */
  88. public function setDbIP($v)
  89. {
  90. if ($v !== null) {
  91. $v = (string) $v;
  92. }
  93. if ($this->ip !== $v) {
  94. $this->ip = $v;
  95. $this->modifiedColumns[] = CcLoginAttemptsPeer::IP;
  96. }
  97. return $this;
  98. } // setDbIP()
  99. /**
  100. * Set the value of [attempts] column.
  101. *
  102. * @param int $v new value
  103. * @return CcLoginAttempts The current object (for fluent API support)
  104. */
  105. public function setDbAttempts($v)
  106. {
  107. if ($v !== null) {
  108. $v = (int) $v;
  109. }
  110. if ($this->attempts !== $v || $this->isNew()) {
  111. $this->attempts = $v;
  112. $this->modifiedColumns[] = CcLoginAttemptsPeer::ATTEMPTS;
  113. }
  114. return $this;
  115. } // setDbAttempts()
  116. /**
  117. * Indicates whether the columns in this object are only set to default values.
  118. *
  119. * This method can be used in conjunction with isModified() to indicate whether an object is both
  120. * modified _and_ has some values set which are non-default.
  121. *
  122. * @return boolean Whether the columns in this object are only been set with default values.
  123. */
  124. public function hasOnlyDefaultValues()
  125. {
  126. if ($this->attempts !== 0) {
  127. return false;
  128. }
  129. // otherwise, everything was equal, so return TRUE
  130. return true;
  131. } // hasOnlyDefaultValues()
  132. /**
  133. * Hydrates (populates) the object variables with values from the database resultset.
  134. *
  135. * An offset (0-based "start column") is specified so that objects can be hydrated
  136. * with a subset of the columns in the resultset rows. This is needed, for example,
  137. * for results of JOIN queries where the resultset row includes columns from two or
  138. * more tables.
  139. *
  140. * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
  141. * @param int $startcol 0-based offset column which indicates which restultset column to start with.
  142. * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
  143. * @return int next starting column
  144. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
  145. */
  146. public function hydrate($row, $startcol = 0, $rehydrate = false)
  147. {
  148. try {
  149. $this->ip = ($row[$startcol + 0] !== null) ? (string) $row[$startcol + 0] : null;
  150. $this->attempts = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
  151. $this->resetModified();
  152. $this->setNew(false);
  153. if ($rehydrate) {
  154. $this->ensureConsistency();
  155. }
  156. return $startcol + 2; // 2 = CcLoginAttemptsPeer::NUM_COLUMNS - CcLoginAttemptsPeer::NUM_LAZY_LOAD_COLUMNS).
  157. } catch (Exception $e) {
  158. throw new PropelException("Error populating CcLoginAttempts object", $e);
  159. }
  160. }
  161. /**
  162. * Checks and repairs the internal consistency of the object.
  163. *
  164. * This method is executed after an already-instantiated object is re-hydrated
  165. * from the database. It exists to check any foreign keys to make sure that
  166. * the objects related to the current object are correct based on foreign key.
  167. *
  168. * You can override this method in the stub class, but you should always invoke
  169. * the base method from the overridden method (i.e. parent::ensureConsistency()),
  170. * in case your model changes.
  171. *
  172. * @throws PropelException
  173. */
  174. public function ensureConsistency()
  175. {
  176. } // ensureConsistency
  177. /**
  178. * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  179. *
  180. * This will only work if the object has been saved and has a valid primary key set.
  181. *
  182. * @param boolean $deep (optional) Whether to also de-associated any related objects.
  183. * @param PropelPDO $con (optional) The PropelPDO connection to use.
  184. * @return void
  185. * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  186. */
  187. public function reload($deep = false, PropelPDO $con = null)
  188. {
  189. if ($this->isDeleted()) {
  190. throw new PropelException("Cannot reload a deleted object.");
  191. }
  192. if ($this->isNew()) {
  193. throw new PropelException("Cannot reload an unsaved object.");
  194. }
  195. if ($con === null) {
  196. $con = Propel::getConnection(CcLoginAttemptsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  197. }
  198. // We don't need to alter the object instance pool; we're just modifying this instance
  199. // already in the pool.
  200. $stmt = CcLoginAttemptsPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
  201. $row = $stmt->fetch(PDO::FETCH_NUM);
  202. $stmt->closeCursor();
  203. if (!$row) {
  204. throw new PropelException('Cannot find matching row in the database to reload object values.');
  205. }
  206. $this->hydrate($row, 0, true); // rehydrate
  207. if ($deep) { // also de-associate any related objects?
  208. } // if (deep)
  209. }
  210. /**
  211. * Removes this object from datastore and sets delete attribute.
  212. *
  213. * @param PropelPDO $con
  214. * @return void
  215. * @throws PropelException
  216. * @see BaseObject::setDeleted()
  217. * @see BaseObject::isDeleted()
  218. */
  219. public function delete(PropelPDO $con = null)
  220. {
  221. if ($this->isDeleted()) {
  222. throw new PropelException("This object has already been deleted.");
  223. }
  224. if ($con === null) {
  225. $con = Propel::getConnection(CcLoginAttemptsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  226. }
  227. $con->beginTransaction();
  228. try {
  229. $ret = $this->preDelete($con);
  230. if ($ret) {
  231. CcLoginAttemptsQuery::create()
  232. ->filterByPrimaryKey($this->getPrimaryKey())
  233. ->delete($con);
  234. $this->postDelete($con);
  235. $con->commit();
  236. $this->setDeleted(true);
  237. } else {
  238. $con->commit();
  239. }
  240. } catch (PropelException $e) {
  241. $con->rollBack();
  242. throw $e;
  243. }
  244. }
  245. /**
  246. * Persists this object to the database.
  247. *
  248. * If the object is new, it inserts it; otherwise an update is performed.
  249. * All modified related objects will also be persisted in the doSave()
  250. * method. This method wraps all precipitate database operations in a
  251. * single transaction.
  252. *
  253. * @param PropelPDO $con
  254. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  255. * @throws PropelException
  256. * @see doSave()
  257. */
  258. public function save(PropelPDO $con = null)
  259. {
  260. if ($this->isDeleted()) {
  261. throw new PropelException("You cannot save an object that has been deleted.");
  262. }
  263. if ($con === null) {
  264. $con = Propel::getConnection(CcLoginAttemptsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  265. }
  266. $con->beginTransaction();
  267. $isInsert = $this->isNew();
  268. try {
  269. $ret = $this->preSave($con);
  270. if ($isInsert) {
  271. $ret = $ret && $this->preInsert($con);
  272. } else {
  273. $ret = $ret && $this->preUpdate($con);
  274. }
  275. if ($ret) {
  276. $affectedRows = $this->doSave($con);
  277. if ($isInsert) {
  278. $this->postInsert($con);
  279. } else {
  280. $this->postUpdate($con);
  281. }
  282. $this->postSave($con);
  283. CcLoginAttemptsPeer::addInstanceToPool($this);
  284. } else {
  285. $affectedRows = 0;
  286. }
  287. $con->commit();
  288. return $affectedRows;
  289. } catch (PropelException $e) {
  290. $con->rollBack();
  291. throw $e;
  292. }
  293. }
  294. /**
  295. * Performs the work of inserting or updating the row in the database.
  296. *
  297. * If the object is new, it inserts it; otherwise an update is performed.
  298. * All related objects are also updated in this method.
  299. *
  300. * @param PropelPDO $con
  301. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  302. * @throws PropelException
  303. * @see save()
  304. */
  305. protected function doSave(PropelPDO $con)
  306. {
  307. $affectedRows = 0; // initialize var to track total num of affected rows
  308. if (!$this->alreadyInSave) {
  309. $this->alreadyInSave = true;
  310. // If this object has been modified, then save it to the database.
  311. if ($this->isModified()) {
  312. if ($this->isNew()) {
  313. $criteria = $this->buildCriteria();
  314. $pk = BasePeer::doInsert($criteria, $con);
  315. $affectedRows = 1;
  316. $this->setNew(false);
  317. } else {
  318. $affectedRows = CcLoginAttemptsPeer::doUpdate($this, $con);
  319. }
  320. $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
  321. }
  322. $this->alreadyInSave = false;
  323. }
  324. return $affectedRows;
  325. } // doSave()
  326. /**
  327. * Array of ValidationFailed objects.
  328. * @var array ValidationFailed[]
  329. */
  330. protected $validationFailures = array();
  331. /**
  332. * Gets any ValidationFailed objects that resulted from last call to validate().
  333. *
  334. *
  335. * @return array ValidationFailed[]
  336. * @see validate()
  337. */
  338. public function getValidationFailures()
  339. {
  340. return $this->validationFailures;
  341. }
  342. /**
  343. * Validates the objects modified field values and all objects related to this table.
  344. *
  345. * If $columns is either a column name or an array of column names
  346. * only those columns are validated.
  347. *
  348. * @param mixed $columns Column name or an array of column names.
  349. * @return boolean Whether all columns pass validation.
  350. * @see doValidate()
  351. * @see getValidationFailures()
  352. */
  353. public function validate($columns = null)
  354. {
  355. $res = $this->doValidate($columns);
  356. if ($res === true) {
  357. $this->validationFailures = array();
  358. return true;
  359. } else {
  360. $this->validationFailures = $res;
  361. return false;
  362. }
  363. }
  364. /**
  365. * This function performs the validation work for complex object models.
  366. *
  367. * In addition to checking the current object, all related objects will
  368. * also be validated. If all pass then <code>true</code> is returned; otherwise
  369. * an aggreagated array of ValidationFailed objects will be returned.
  370. *
  371. * @param array $columns Array of column names to validate.
  372. * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  373. */
  374. protected function doValidate($columns = null)
  375. {
  376. if (!$this->alreadyInValidation) {
  377. $this->alreadyInValidation = true;
  378. $retval = null;
  379. $failureMap = array();
  380. if (($retval = CcLoginAttemptsPeer::doValidate($this, $columns)) !== true) {
  381. $failureMap = array_merge($failureMap, $retval);
  382. }
  383. $this->alreadyInValidation = false;
  384. }
  385. return (!empty($failureMap) ? $failureMap : true);
  386. }
  387. /**
  388. * Retrieves a field from the object by name passed in as a string.
  389. *
  390. * @param string $name name
  391. * @param string $type The type of fieldname the $name is of:
  392. * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  393. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  394. * @return mixed Value of field.
  395. */
  396. public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
  397. {
  398. $pos = CcLoginAttemptsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  399. $field = $this->getByPosition($pos);
  400. return $field;
  401. }
  402. /**
  403. * Retrieves a field from the object by Position as specified in the xml schema.
  404. * Zero-based.
  405. *
  406. * @param int $pos position in xml schema
  407. * @return mixed Value of field at $pos
  408. */
  409. public function getByPosition($pos)
  410. {
  411. switch($pos) {
  412. case 0:
  413. return $this->getDbIP();
  414. break;
  415. case 1:
  416. return $this->getDbAttempts();
  417. break;
  418. default:
  419. return null;
  420. break;
  421. } // switch()
  422. }
  423. /**
  424. * Exports the object as an array.
  425. *
  426. * You can specify the key type of the array by passing one of the class
  427. * type constants.
  428. *
  429. * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  430. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  431. * Defaults to BasePeer::TYPE_PHPNAME.
  432. * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  433. *
  434. * @return array an associative array containing the field names (as keys) and field values
  435. */
  436. public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
  437. {
  438. $keys = CcLoginAttemptsPeer::getFieldNames($keyType);
  439. $result = array(
  440. $keys[0] => $this->getDbIP(),
  441. $keys[1] => $this->getDbAttempts(),
  442. );
  443. return $result;
  444. }
  445. /**
  446. * Sets a field from the object by name passed in as a string.
  447. *
  448. * @param string $name peer name
  449. * @param mixed $value field value
  450. * @param string $type The type of fieldname the $name is of:
  451. * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  452. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  453. * @return void
  454. */
  455. public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
  456. {
  457. $pos = CcLoginAttemptsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  458. return $this->setByPosition($pos, $value);
  459. }
  460. /**
  461. * Sets a field from the object by Position as specified in the xml schema.
  462. * Zero-based.
  463. *
  464. * @param int $pos position in xml schema
  465. * @param mixed $value field value
  466. * @return void
  467. */
  468. public function setByPosition($pos, $value)
  469. {
  470. switch($pos) {
  471. case 0:
  472. $this->setDbIP($value);
  473. break;
  474. case 1:
  475. $this->setDbAttempts($value);
  476. break;
  477. } // switch()
  478. }
  479. /**
  480. * Populates the object using an array.
  481. *
  482. * This is particularly useful when populating an object from one of the
  483. * request arrays (e.g. $_POST). This method goes through the column
  484. * names, checking to see whether a matching key exists in populated
  485. * array. If so the setByName() method is called for that column.
  486. *
  487. * You can specify the key type of the array by additionally passing one
  488. * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  489. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  490. * The default key type is the column's phpname (e.g. 'AuthorId')
  491. *
  492. * @param array $arr An array to populate the object from.
  493. * @param string $keyType The type of keys the array uses.
  494. * @return void
  495. */
  496. public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
  497. {
  498. $keys = CcLoginAttemptsPeer::getFieldNames($keyType);
  499. if (array_key_exists($keys[0], $arr)) $this->setDbIP($arr[$keys[0]]);
  500. if (array_key_exists($keys[1], $arr)) $this->setDbAttempts($arr[$keys[1]]);
  501. }
  502. /**
  503. * Build a Criteria object containing the values of all modified columns in this object.
  504. *
  505. * @return Criteria The Criteria object containing all modified values.
  506. */
  507. public function buildCriteria()
  508. {
  509. $criteria = new Criteria(CcLoginAttemptsPeer::DATABASE_NAME);
  510. if ($this->isColumnModified(CcLoginAttemptsPeer::IP)) $criteria->add(CcLoginAttemptsPeer::IP, $this->ip);
  511. if ($this->isColumnModified(CcLoginAttemptsPeer::ATTEMPTS)) $criteria->add(CcLoginAttemptsPeer::ATTEMPTS, $this->attempts);
  512. return $criteria;
  513. }
  514. /**
  515. * Builds a Criteria object containing the primary key for this object.
  516. *
  517. * Unlike buildCriteria() this method includes the primary key values regardless
  518. * of whether or not they have been modified.
  519. *
  520. * @return Criteria The Criteria object containing value(s) for primary key(s).
  521. */
  522. public function buildPkeyCriteria()
  523. {
  524. $criteria = new Criteria(CcLoginAttemptsPeer::DATABASE_NAME);
  525. $criteria->add(CcLoginAttemptsPeer::IP, $this->ip);
  526. return $criteria;
  527. }
  528. /**
  529. * Returns the primary key for this object (row).
  530. * @return string
  531. */
  532. public function getPrimaryKey()
  533. {
  534. return $this->getDbIP();
  535. }
  536. /**
  537. * Generic method to set the primary key (ip column).
  538. *
  539. * @param string $key Primary key.
  540. * @return void
  541. */
  542. public function setPrimaryKey($key)
  543. {
  544. $this->setDbIP($key);
  545. }
  546. /**
  547. * Returns true if the primary key for this object is null.
  548. * @return boolean
  549. */
  550. public function isPrimaryKeyNull()
  551. {
  552. return null === $this->getDbIP();
  553. }
  554. /**
  555. * Sets contents of passed object to values from current object.
  556. *
  557. * If desired, this method can also make copies of all associated (fkey referrers)
  558. * objects.
  559. *
  560. * @param object $copyObj An object of CcLoginAttempts (or compatible) type.
  561. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  562. * @throws PropelException
  563. */
  564. public function copyInto($copyObj, $deepCopy = false)
  565. {
  566. $copyObj->setDbIP($this->ip);
  567. $copyObj->setDbAttempts($this->attempts);
  568. $copyObj->setNew(true);
  569. }
  570. /**
  571. * Makes a copy of this object that will be inserted as a new row in table when saved.
  572. * It creates a new object filling in the simple attributes, but skipping any primary
  573. * keys that are defined for the table.
  574. *
  575. * If desired, this method can also make copies of all associated (fkey referrers)
  576. * objects.
  577. *
  578. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  579. * @return CcLoginAttempts Clone of current object.
  580. * @throws PropelException
  581. */
  582. public function copy($deepCopy = false)
  583. {
  584. // we use get_class(), because this might be a subclass
  585. $clazz = get_class($this);
  586. $copyObj = new $clazz();
  587. $this->copyInto($copyObj, $deepCopy);
  588. return $copyObj;
  589. }
  590. /**
  591. * Returns a peer instance associated with this om.
  592. *
  593. * Since Peer classes are not to have any instance attributes, this method returns the
  594. * same instance for all member of this class. The method could therefore
  595. * be static, but this would prevent one from overriding the behavior.
  596. *
  597. * @return CcLoginAttemptsPeer
  598. */
  599. public function getPeer()
  600. {
  601. if (self::$peer === null) {
  602. self::$peer = new CcLoginAttemptsPeer();
  603. }
  604. return self::$peer;
  605. }
  606. /**
  607. * Clears the current object and sets all attributes to their default values
  608. */
  609. public function clear()
  610. {
  611. $this->ip = null;
  612. $this->attempts = null;
  613. $this->alreadyInSave = false;
  614. $this->alreadyInValidation = false;
  615. $this->clearAllReferences();
  616. $this->applyDefaultValues();
  617. $this->resetModified();
  618. $this->setNew(true);
  619. $this->setDeleted(false);
  620. }
  621. /**
  622. * Resets all collections of referencing foreign keys.
  623. *
  624. * This method is a user-space workaround for PHP's inability to garbage collect objects
  625. * with circular references. This is currently necessary when using Propel in certain
  626. * daemon or large-volumne/high-memory operations.
  627. *
  628. * @param boolean $deep Whether to also clear the references on all associated objects.
  629. */
  630. public function clearAllReferences($deep = false)
  631. {
  632. if ($deep) {
  633. } // if ($deep)
  634. }
  635. /**
  636. * Catches calls to virtual methods
  637. */
  638. public function __call($name, $params)
  639. {
  640. if (preg_match('/get(\w+)/', $name, $matches)) {
  641. $virtualColumn = $matches[1];
  642. if ($this->hasVirtualColumn($virtualColumn)) {
  643. return $this->getVirtualColumn($virtualColumn);
  644. }
  645. // no lcfirst in php<5.3...
  646. $virtualColumn[0] = strtolower($virtualColumn[0]);
  647. if ($this->hasVirtualColumn($virtualColumn)) {
  648. return $this->getVirtualColumn($virtualColumn);
  649. }
  650. }
  651. throw new PropelException('Call to undefined method: ' . $name);
  652. }
  653. } // BaseCcLoginAttempts