/**
  * @param array $config
  */
 public function __construct(array $config = [])
 {
     // Apply some defaults.
     $config += ['description_path' => \realpath(__DIR__ . '/descriptions/user.php'), 'data_type' => 'JSON'];
     // Create the client.
     parent::__construct($config);
 }
Exemplo n.º 2
0
 /**
  * @param array $config
  * @param string $env
  */
 public function __construct(array $config = [], $env = self::ENV_PROD)
 {
     // Apply some defaults.
     $config += ['description_path' => __DIR__ . '/descriptions/feed.php'];
     // Create the client.
     parent::__construct($config, $env);
 }
Exemplo n.º 3
0
 public function delete(PropelPDO $con = null)
 {
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Client");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Client deleted.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_delete"));
     $logEntry->setPropelId($this->getId());
     $logEntry->save();
     parent::delete($con);
 }
Exemplo n.º 4
0
 public function delete($con = null)
 {
     try {
         $con = Propel::getConnection();
         $con->begin();
         //deletes generic document
         $genericDocument = Document::getGenericDocument($this);
         $genericDocument->delete();
         parent::delete();
         $con->commit();
         Document::deleteObjCache($this);
         return true;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemplo n.º 5
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     ClientPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new ClientPeer();
     }
     return self::$peer;
 }
 /**
  * Get User Profile
  *
  * @param $user
  * @return mixed
  */
 protected function userProfile($user)
 {
     return $this->client->userProfile($user);
 }
Exemplo n.º 7
0
 /**
  * @param string Base URL to the Engine Instance. Default is localhost:8000.
  * @param float Timeout of the request in seconds. Use 0 to wait indefinitely
  *              Default is 0.
  * @param float Number of seconds to wait while trying to connect to a server.
  *              Default is 5.
  */
 public function __construct($baseUrl = "http://localhost:8000", $timeout = 0, $connectTimeout = 5)
 {
     parent::__construct($baseUrl, $timeout, $connectTimeout);
 }
Exemplo n.º 8
0
 /**
  * Constructor.
  * Initializes the object with the given configuration `$aConfig`.
  * @param array $aConfig name-value pairs that will be used to initialize the object properties
  */
 public function __construct($aConfig)
 {
     parent::__construct($aConfig);
     $this->protocol = $this->serverPort == self::PROTOCOL_SECURE_PORT ? self::PROTOCOL_SECURE : self::PROTOCOL_UNSECURE;
 }
Exemplo n.º 9
0
 /**
  * @ignore
  */
 function processFile()
 {
     $this->idResolverCache = array();
     $this->summary = array();
     return parent::processFile();
 }
Exemplo n.º 10
0
 public function setPeerId($v)
 {
     return parent::setPeerId(self::safe_set($v));
 }