Exemplo n.º 1
0
 public static function make_api()
 {
     $api = new Api('Cohen', 'hello_world', 'A demo function.');
     $api->add_property('user_name', 'Your Name');
     $api->set_path('cohen.php');
     $apis = array();
     $apis[] = $api;
     $results = array('classname' => 'Cohen', 'apis' => $apis);
     return $results;
 }
Exemplo n.º 2
0
<?php

/**
 * This is a demo class for 
 * @Author:    Jingrong Tian (work_id_tjr@163.com)
 * @DateTime:  2015-09-25 22:14:28
 * @Description: Description
 */
/**
 * Lode models.
 */
require_once '../model/api.php';
$test_api = new Api('Cohen', 'hello_world', 'A demo function');
$test_api->add_property('user_name', 'Your Name');
$test_api->set_path('../cohen.php');
?>
<div class="tab-pane" id="tab2">
  <div class="page-header">
    <h1>API</h1>
  </div>
  <h2><?php 
echo $test_api->get_class_name() . '::' . $test_api->get_function_name();
?>
 <small><?php 
echo $test_api->get_description();
?>
</small></h2>
  <section>
    <form action="./controller/index.php" method="post" id="api-form-<?php 
echo $test_api->get_class_name() . '-' . $test_api->get_function_name();
?>