api() публичный Метод

Gets the API for the class.
public api ( string $class = null, string $type = null, string $name = null ) : array
$class string fully namespaced class in dot notation.
$type string method|property
$name string the name of the method or property.
Результат array
Пример #1
0
 public function testApiProperties()
 {
     $help = new Help(array('request' => $this->request, 'classes' => $this->classes));
     $expected = null;
     $result = $help->api('lithium.tests.mocks.console.command.MockCommandHelp', 'property');
     $this->assertEqual($expected, $result);
     $expected = "\\-\\-long=<string>.*\\-\\-blong.*\\-s";
     $result = $help->response->output;
     $this->assertPattern("/{$expected}/s", $result);
 }
Пример #2
0
 public function testApiPropertyWithName()
 {
     $help = new Help(array('request' => $this->request, 'classes' => $this->classes));
     $expected = null;
     $result = $help->api('lithium.net.Message', 'property');
     $this->assertEqual($expected, $result);
     $expected = "    --host=HOST\n        The hostname for this endpoint.";
     $expected = preg_quote($expected);
     $result = $help->response->output;
     $this->assertPattern("/{$expected}/", $result);
 }
Пример #3
0
 public function testApiPropertyWithName()
 {
     $help = new Help(array('request' => $this->request, 'classes' => $this->classes));
     $expected = null;
     $result = $help->api('lithium.net.http.Request', 'property', 'host');
     $this->assertEqual($expected, $result);
     $expected = "    --host=HOST\n        The Host header value and authority.";
     $expected = preg_quote($expected);
     $result = $help->response->output;
     $this->assertPattern("/{$expected}/", $result);
 }