Ejemplo n.º 1
0
 /**
  * Retrieve a single object by pkey.
  *
  * @param      string $pk the primary key.
  * @param      PropelPDO $con the connection to use
  * @return     AppToken
  */
 public static function retrieveByPK($pk, PropelPDO $con = null)
 {
     if (null !== ($obj = AppTokenPeer::getInstanceFromPool((string) $pk))) {
         return $obj;
     }
     $criteria = new Criteria(AppTokenPeer::DATABASE_NAME);
     $criteria->add(AppTokenPeer::ID, $pk);
     $v = AppTokenPeer::doSelect($criteria, $con);
     return !empty($v) > 0 ? $v[0] : null;
 }