Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/conduit/FileInfoConduitAPIMethod.php
<?php | <?php | ||||
final class FileInfoConduitAPIMethod extends FileConduitAPIMethod { | final class FileInfoConduitAPIMethod extends FileConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'file.info'; | return 'file.info'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Get information about a file.'; | return 'Get information about a file.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'phid' => 'optional phid', | 'phid' => 'optional phid', | ||||
'id' => 'optional id', | 'id' => 'optional id', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR-NOT-FOUND' => 'No such file exists.', | 'ERR-NOT-FOUND' => 'No such file exists.', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$phid = $request->getValue('phid'); | $phid = $request->getValue('phid'); | ||||
$id = $request->getValue('id'); | $id = $request->getValue('id'); | ||||
Show All 32 Lines |