Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/conduit/protocol/request/ConduitAPIRequest.php b/src/applications/conduit/protocol/request/ConduitAPIRequest.php
index 4a8d3874af..1393f35908 100644
--- a/src/applications/conduit/protocol/request/ConduitAPIRequest.php
+++ b/src/applications/conduit/protocol/request/ConduitAPIRequest.php
@@ -1,61 +1,61 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class ConduitAPIRequest {
protected $params;
private $user;
public function __construct(array $params) {
$this->params = $params;
}
public function getValue($key) {
- return $this->params[$key];
+ return idx($this->params, $key);
}
public function getAllParameters() {
return $this->params;
}
public function setUser($user) {
$this->user = $user;
return $this;
}
/**
* Retrieve the authentic identity of the user making the request. If a
* method requires authentication (the default) the user object will always
* be available. If a method does not require authentication (i.e., overrides
* shouldRequireAuthentication() to return false) the user object will NEVER
* be available.
*
* @return PhabricatorUser Authentic user, available ONLY if the method
* requires authentication.
*/
public function getUser() {
if (!$this->user) {
throw new Exception(
"You can not access the user inside the implementation of a Conduit ".
"method which does not require authentication (as per ".
"shouldRequireAuthentication()).");
}
return $this->user;
}
}
diff --git a/src/applications/conduit/protocol/request/__init__.php b/src/applications/conduit/protocol/request/__init__.php
index 5aa52afcf9..fa0da2a745 100644
--- a/src/applications/conduit/protocol/request/__init__.php
+++ b/src/applications/conduit/protocol/request/__init__.php
@@ -1,10 +1,12 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
+phutil_require_module('phutil', 'utils');
+
phutil_require_source('ConduitAPIRequest.php');

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 30, 11:22 PM (9 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
429960
Default Alt Text
(2 KB)

Event Timeline