• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP set_error_handler函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中set_error_handler函数的典型用法代码示例。如果您正苦于以下问题:PHP set_error_handler函数的具体用法?PHP set_error_handler怎么用?PHP set_error_handler使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了set_error_handler函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: procesar

 function procesar()
 {
     toba::logger_ws()->debug('Servicio Llamado: ' . $this->info['basica']['item']);
     toba::logger_ws()->set_checkpoint();
     set_error_handler('toba_logger_ws::manejador_errores_recuperables', E_ALL);
     $this->validar_componente();
     //-- Pide los datos para construir el componente, WSF no soporta entregar objetos creados
     $clave = array();
     $clave['proyecto'] = $this->info['objetos'][0]['objeto_proyecto'];
     $clave['componente'] = $this->info['objetos'][0]['objeto'];
     list($tipo, $clase, $datos) = toba_constructor::get_runtime_clase_y_datos($clave, $this->info['objetos'][0]['clase'], false);
     agregar_dir_include_path(toba_dir() . '/php/3ros/wsf');
     $opciones_extension = toba_servicio_web::_get_opciones($this->info['basica']['item'], $clase);
     $wsdl = strpos($_SERVER['REQUEST_URI'], "?wsdl") !== false;
     $sufijo = 'op__';
     $metodos = array();
     $reflexion = new ReflectionClass($clase);
     foreach ($reflexion->getMethods() as $metodo) {
         if (strpos($metodo->name, $sufijo) === 0) {
             $servicio = substr($metodo->name, strlen($sufijo));
             $prefijo = $wsdl ? '' : '_';
             $metodos[$servicio] = $prefijo . $metodo->name;
         }
     }
     $opciones = array();
     $opciones['serviceName'] = $this->info['basica']['item'];
     $opciones['classes'][$clase]['operations'] = $metodos;
     $opciones = array_merge($opciones, $opciones_extension);
     $this->log->debug("Opciones del servidor: " . var_export($opciones, true), 'toba');
     $opciones['classes'][$clase]['args'] = array($datos);
     toba::logger_ws()->set_checkpoint();
     $service = new WSService($opciones);
     $service->reply();
     $this->log->debug("Fin de servicio web", 'toba');
 }
开发者ID:emma5021,项目名称:toba,代码行数:35,代码来源:toba_solicitud_servicio_web.php


示例2: prepareEnvironment

 /**
  * @ignore
  * @param array $options
  */
 public function prepareEnvironment($options = array())
 {
     if (empty($options['skipErrorHandler'])) {
         set_error_handler(array('Ip\\Internal\\ErrorHandler', 'ipErrorHandler'));
     }
     if (empty($options['skipError'])) {
         if (ipConfig()->showErrors()) {
             error_reporting(E_ALL | E_STRICT);
             ini_set('display_errors', '1');
         } else {
             ini_set('display_errors', '0');
         }
     }
     if (empty($options['skipSession'])) {
         if (session_id() == '' && !headers_sent()) {
             //if session hasn't been started yet
             session_name(ipConfig()->get('sessionName'));
             if (!ipConfig()->get('disableHttpOnlySetting')) {
                 ini_set('session.cookie_httponly', 1);
             }
             session_start();
         }
     }
     if (empty($options['skipEncoding'])) {
         mb_internal_encoding(ipConfig()->get('charset'));
     }
     if (empty($options['skipTimezone'])) {
         date_default_timezone_set(ipConfig()->get('timezone'));
         //PHP 5 requires timezone to be set.
     }
 }
开发者ID:x33n,项目名称:ImpressPages,代码行数:35,代码来源:Application.php


示例3: assertErrorsAreTriggered

 /**
  * @param int      $expectedType     Expected triggered error type (pass one of PHP's E_* constants)
  * @param string[] $expectedMessages Expected error messages
  * @param callable $testCode         A callable that is expected to trigger the error messages
  */
 public static function assertErrorsAreTriggered($expectedType, $expectedMessages, $testCode)
 {
     if (!is_callable($testCode)) {
         throw new \InvalidArgumentException(sprintf('The code to be tested must be a valid callable ("%s" given).', gettype($testCode)));
     }
     $e = null;
     $triggeredMessages = array();
     try {
         $prevHandler = set_error_handler(function ($type, $message, $file, $line, $context) use($expectedType, &$triggeredMessages, &$prevHandler) {
             if ($expectedType !== $type) {
                 return null !== $prevHandler && call_user_func($prevHandler, $type, $message, $file, $line, $context);
             }
             $triggeredMessages[] = $message;
         });
         call_user_func($testCode);
     } catch (\Exception $e) {
     } catch (\Throwable $e) {
     }
     restore_error_handler();
     if (null !== $e) {
         throw $e;
     }
     \PHPUnit_Framework_Assert::assertCount(count($expectedMessages), $triggeredMessages);
     foreach ($triggeredMessages as $i => $message) {
         \PHPUnit_Framework_Assert::assertContains($expectedMessages[$i], $message);
     }
 }
开发者ID:unexge,项目名称:symfony,代码行数:32,代码来源:ErrorAssert.php


示例4: __construct

 /**
  * Making the class non-abstract with a protected constructor does a better
  * job of preventing instantiation than just marking the class as abstract.
  *
  * @see start()
  */
 public function __construct(array $configs)
 {
     // Quickly initialize some defaults like usePEAR
     // by adding the $premature flag
     $this->_optionsInit(true);
     $this->setOptions($configs);
     if ($this->opt('logPhpErrors')) {
         set_error_handler(array('self', 'phpErrors'), E_ALL);
     }
     // Check the PHP configuration
     if (!defined('SIGHUP')) {
         trigger_error('PHP is compiled without --enable-pcntl directive', E_USER_ERROR);
     }
     // Check for CLI
     if (php_sapi_name() !== 'cli') {
         trigger_error('You can only create daemon from the command line (CLI-mode)', E_USER_ERROR);
     }
     // Check for POSIX
     if (!function_exists('posix_getpid')) {
         trigger_error('PHP is compiled without --enable-posix directive', E_USER_ERROR);
     }
     // Enable Garbage Collector (PHP >= 5.3)
     if (function_exists('gc_enable')) {
         gc_enable();
     }
     // Initialize & check variables
     if (false === $this->_optionsInit(false)) {
         if (is_object($this->_option) && is_array($this->_option->errors)) {
             foreach ($this->_option->errors as $error) {
                 $this->notice($error);
             }
         }
         trigger_error('Crucial options are not set. Review log:', E_USER_ERROR);
     }
 }
开发者ID:uecode,项目名称:daemon,代码行数:41,代码来源:Daemon.php


示例5: setDefaultOptions

 /**
  * {@inheritdoc}
  */
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     set_error_handler(array('Symfony\\Component\\Form\\Test\\DeprecationErrorHandler', 'handleBC'));
     $resolver->setDefaults($this->getDefaultOptions(array()));
     $resolver->addAllowedValues($this->getAllowedOptionValues(array()));
     restore_error_handler();
 }
开发者ID:ronnylt,项目名称:symfony,代码行数:10,代码来源:AbstractType.php


示例6: stringHasController

 function stringHasController(risingsun\ostring $string, controller $controller)
 {
     $pattern = clone $this;
     $previousErrorHandler = set_error_handler(function ($errno, $errstr) use(&$errorMessage) {
         $errorMessage = $errstr;
         return true;
     });
     $match = preg_match($pattern, $string, $matches);
     set_error_handler($previousErrorHandler);
     switch (true) {
         case $match === false:
             throw new \domainException('Pattern \'' . $this . '\' is not a valid PCRE regular expression: ' . $errorMessage);
         case !$match:
             $controller->stringNotMatchPattern($string, $this);
             break;
         default:
             $match = new match($matches[0]);
             if ($pattern->names) {
                 unset($matches[0]);
                 $pattern->matches = array_slice($matches, 0, sizeof(sizeof($pattern->names) <= sizeof($matches) ? $pattern->names : $matches));
                 $pattern->names = array_slice($pattern->names, 0, sizeof($pattern->matches));
             }
             $controller->stringMatchPattern($match, $pattern);
     }
     return $this;
 }
开发者ID:estvoyage,项目名称:risingsun,代码行数:26,代码来源:pcre.php


示例7: start

 /**
  * Starting the error handler
  *
  * @param int $errorLevel
  */
 public static function start($errorLevel = \E_WARNING)
 {
     if (!static::$stack) {
         set_error_handler(array(get_called_class(), 'addError'), $errorLevel);
     }
     static::$stack[] = null;
 }
开发者ID:Flesh192,项目名称:magento,代码行数:12,代码来源:ErrorHandler.php


示例8: run

 /**
 +----------------------------------------------------------
 * 应用程序初始化
 +----------------------------------------------------------
 * @access public
 +----------------------------------------------------------
 * @return void
 +----------------------------------------------------------
 */
 public static function run()
 {
     // 设定错误和异常处理
     set_error_handler(array('App', "appError"));
     set_exception_handler(array('App', "appException"));
     //[RUNTIME]
     // 检查项目是否编译过
     // 在部署模式下会自动在第一次执行的时候编译项目
     if (defined('RUNTIME_MODEL')) {
         // 运行模式无需载入项目编译缓存
     } elseif (is_file(RUNTIME_PATH . '~app.php') && (!is_file(CONFIG_PATH . 'config.php') || filemtime(RUNTIME_PATH . '~app.php') > filemtime(CONFIG_PATH . 'config.php'))) {
         // 直接读取编译后的项目文件
         C(include RUNTIME_PATH . '~app.php');
     } else {
         // 预编译项目
         App::build();
     }
     //[/RUNTIME]
     // 取得模块和操作名称
     define('MODULE_NAME', App::getModule());
     // Module名称
     define('ACTION_NAME', App::getAction());
     // Action操作
     // 记录应用初始化时间
     if (C('SHOW_RUN_TIME')) {
         $GLOBALS['_initTime'] = microtime(TRUE);
     }
     // 执行操作
     R(MODULE_NAME, ACTION_NAME);
     // 保存日志记录
     if (C('LOG_RECORD')) {
         Log::save();
     }
     return;
 }
开发者ID:omusico,项目名称:AndyCMS,代码行数:44,代码来源:App.class.php


示例9: lock

 /**
  * Lock the resource
  *
  * @param  bool        $blocking wait until the lock is released
  * @return bool        Returns true if the lock was acquired, false otherwise
  * @throws IOException If the lock file could not be created or opened
  */
 public function lock($blocking = false)
 {
     if ($this->handle) {
         return true;
     }
     // Silence both userland and native PHP error handlers
     $errorLevel = error_reporting(0);
     set_error_handler('var_dump', 0);
     if (!($this->handle = fopen($this->file, 'r'))) {
         if ($this->handle = fopen($this->file, 'x')) {
             chmod($this->file, 0444);
         } elseif (!($this->handle = fopen($this->file, 'r'))) {
             usleep(100);
             // Give some time for chmod() to complete
             $this->handle = fopen($this->file, 'r');
         }
     }
     restore_error_handler();
     error_reporting($errorLevel);
     if (!$this->handle) {
         $error = error_get_last();
         throw new IOException($error['message'], 0, null, $this->file);
     }
     // On Windows, even if PHP doc says the contrary, LOCK_NB works, see
     // https://bugs.php.net/54129
     if (!flock($this->handle, LOCK_EX | ($blocking ? 0 : LOCK_NB))) {
         fclose($this->handle);
         $this->handle = null;
         return false;
     }
     return true;
 }
开发者ID:neteasy-work,项目名称:hkgbf_crm,代码行数:39,代码来源:LockHandler.php


示例10: __construct

 public function __construct($options)
 {
     // we need at least PHP7
     if (version_compare(PHP_VERSION, '7.0.0') < 0) {
         throw new Exception("Foundation require PHP 7 or newer.");
     }
     // get all errors
     error_reporting(E_ALL);
     set_error_handler([$this, "errorHandler"]);
     // the application root is foundation directory's upper directory
     $this->rootpath = $options["rootpath"] ?? "../";
     $this->setupApplicationRoot();
     // application timezone
     $this->timezone = $options["timezone"] ?? "UTC";
     $this->setupApplicationTimezone();
     // environment
     $this->env = getenv("ENV") ?? "dev";
     // application namespace
     $this->namespace = $options["namespace"] ?? null;
     if (is_null($this->namespace)) {
         throw new Exception("App Namespace not given.");
     }
     // configure
     $this->config = (object) (require $this->rootpath . "/config/" . $this->env . ".php");
     // register autoloader
     $this->registerAutoloader();
 }
开发者ID:hax4,项目名称:foundation,代码行数:27,代码来源:Foundation.php


示例11: main

 public function main()
 {
     $this->_initDb();
     $cli = new \Console_CommandLine_Result();
     $cli->options = $this->params;
     $cli->args = array('files' => $this->args);
     // Check if we can use colors
     if ($cli->options['color'] === 'auto') {
         $cli->options['color'] = DIRECTORY_SEPARATOR != '\\' && function_exists('posix_isatty') && @posix_isatty(STDOUT);
     } else {
         $cli->options['color'] = filter_var($cli->options['color'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
     }
     if (empty($cli->args['files'])) {
         $cli->args['files'] = array(ROOT . DS . 'spec');
     }
     if (!($cli->options['verbose'] || $cli->options['debug'])) {
         set_error_handler(array($this, 'skipWarning'), E_WARNING | E_NOTICE);
     }
     if ($cli->options['dump']) {
         $module = new DrSlump\Spec\Cli\Modules\Dump($cli);
         $module->run();
     } else {
         $module = new DrSlump\Spec\Cli\Modules\Test($cli);
         $module->run();
     }
 }
开发者ID:nojimage,项目名称:Bdd,代码行数:26,代码来源:SpecShell.php


示例12: search_for_pattern

 function search_for_pattern($search, $limit, $offset, $orderby)
 {
     if (!in_array($orderby, array('asc', 'desc'))) {
         $orderby = 'asc';
     }
     $limit = intval($limit);
     $offset = intval($offset);
     if (strlen($search) > 0) {
         if (!ini_get('safe_mode')) {
             set_time_limit(0);
         }
         // First test that the search and replace strings are valid regex
         if ($this->regex) {
             set_error_handler(array(&$this, 'regex_error'));
             $valid = @preg_match($search, '', $matches);
             restore_error_handler();
             if ($valid === false) {
                 return $this->regex_error;
             }
             return $this->find($search, $limit, $offset, $orderby);
         } else {
             return $this->find('@' . preg_quote($search, '@') . '@', $limit, $offset, $orderby);
         }
     }
     return __("No search pattern", 'search-regex');
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:26,代码来源:search.php


示例13: getContentHtml

 public static function getContentHtml($title, $leadOnly)
 {
     $url = 'http://reading-web-research.wmflabs.org/api/slim/';
     if ($leadOnly) {
         $url .= 'lead/';
     }
     $url .= rawurlencode($title);
     set_error_handler(function () {
         throw new Exception('Error at endpoint.');
     }, E_WARNING);
     $resp = file_get_contents($url, false);
     restore_error_handler();
     $json = json_decode($resp);
     $sections = $json->{'sections'};
     if ($leadOnly) {
         $content = $sections[0]->{'content'};
         $continue = Html::element('a', array('id' => 'loot-fold', 'style' => 'clear:both; display: block;', 'href' => '?full=1#continue-from'), 'Continue reading...');
         $content .= $continue;
     } else {
         $content = '';
         foreach ($sections as $key => $section) {
             if ($key > 0) {
                 $content .= '<h2>' . $section->{'title'} . '</h2>';
             }
             $content .= $section->{'content'};
             if ($key === 0) {
                 $content .= '<div id="continue-from"></div>';
             }
         }
     }
     return $content;
 }
开发者ID:jdlrobson,项目名称:LootFrontend,代码行数:32,代码来源:Hooks.php


示例14: onError

 /**
  * Capture all errors and send to provided console
  * 
  * @return mixed Returns a string containing the previously defined error handler (if any)
  */
 public function onError($console, $types = E_ALL)
 {
     $this->errorConsole = $console;
     $this->errorTypes = $types;
     $this->_conditionalErrorConsole = $this->errorConsole->on('Insight: Show all PHP Errors (except:)');
     if ($this->_errorReportingInfo === null) {
         $this->_errorReportingInfo = self::parseErrorReportingBitmask(error_reporting());
         foreach (self::$ERROR_CONSTANTS as $constant => $bit) {
             switch ($constant) {
                 case 'E_ERROR':
                 case 'E_PARSE':
                 case 'E_CORE_ERROR':
                 case 'E_CORE_WARNING':
                 case 'E_COMPILE_ERROR':
                 case 'E_COMPILE_WARNING':
                 case 'E_STRICT':
                 case 'E_ALL':
                     // ignore for now
                     break;
                 default:
                     $this->_conditionalErrorConsole->on($constant);
                     break;
             }
         }
     }
     //NOTE: The following errors will not be caught by this error handler:
     //      E_ERROR, E_PARSE, E_CORE_ERROR,
     //      E_CORE_WARNING, E_COMPILE_ERROR,
     //      E_COMPILE_WARNING, E_STRICT
     return set_error_handler(array($this, '_errorHandler'));
 }
开发者ID:dataReactive,项目名称:firephp,代码行数:36,代码来源:Error.php


示例15: testFormat

    public function testFormat()
    {
        $container = $this->getContainer();
        $extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor');
        set_error_handler(array($this, 'handleDeprecation'));
        $data = $extractor->all();
        restore_error_handler();
        $result = $container->get('nelmio_api_doc.formatter.simple_formatter')->format($data);
        if (class_exists('Dunglas\\ApiBundle\\DunglasApiBundle')) {
            $this->markTestSkipped('There is an issue because of DunglasApiBundle');
            $expected = array('/api/other-resources' => array(0 => array('method' => 'GET', 'uri' => '/api/other-resources.{_format}', 'description' => 'List another resource.', 'requirements' => array('_format' => array('requirement' => 'json|xml|html', 'dataType' => '', 'description' => '')), 'response' => array('' => array('dataType' => 'array of objects (JmsTest)', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', 'actualType' => 'collection', 'readonly' => true, 'required' => true, 'default' => true, 'description' => '', 'children' => array('foo' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'number' => array('dataType' => 'double', 'actualType' => 'float', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'arr' => array('dataType' => 'array', 'actualType' => 'collection', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL, 'children' => array('foo' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => 'baz', 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'baz' => array('dataType' => 'array of integers', 'actualType' => 'collection', 'subType' => 'integer', 'required' => false, 'default' => NULL, 'description' => 'Epic description.

With multiple lines.', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'circular' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'parent' => array('dataType' => 'object (JmsTest)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL, 'children' => array('foo' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'number' => array('dataType' => 'double', 'actualType' => 'float', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'arr' => array('dataType' => 'array', 'actualType' => 'collection', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested_array' => array('dataType' => 'array of objects (JmsNested)', 'actualType' => 'collection', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL))), 'since' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => '0.2', 'untilVersion' => NULL), 'until' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => '0.3'), 'since_and_until' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => '0.4', 'untilVersion' => '0.5'))), 'nested_array' => array('dataType' => 'array of objects (JmsNested)', 'actualType' => 'collection', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL)))), 'resourceDescription' => 'Operations on another resource.', 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default', 'premium')), 1 => array('method' => 'PUT|PATCH', 'uri' => '/api/other-resources/{id}.{_format}', 'description' => 'Update a resource bu ID.', 'requirements' => array('_format' => array('requirement' => 'json|xml|html', 'dataType' => '', 'description' => ''), 'id' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false)), '/api/resources' => array(0 => array('method' => 'GET', 'uri' => '/api/resources.{_format}', 'description' => 'List resources.', 'requirements' => array('_format' => array('requirement' => 'json|xml|html', 'dataType' => '', 'description' => '')), 'response' => array('tests' => array('dataType' => 'array of objects (Test)', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\Test', 'actualType' => 'collection', 'readonly' => true, 'required' => true, 'default' => true, 'description' => '', 'children' => array('a' => array('default' => 'nelmio', 'actualType' => 'string', 'subType' => NULL, 'format' => '{length: min: foo}, {not blank}', 'required' => true, 'dataType' => 'string', 'readonly' => NULL), 'b' => array('default' => NULL, 'actualType' => 'datetime', 'subType' => NULL, 'dataType' => 'DateTime', 'readonly' => NULL, 'required' => NULL)))), 'statusCodes' => array(200 => array(0 => 'Returned on success.'), 404 => array(0 => 'Returned if resource cannot be found.')), 'resourceDescription' => 'Operations on resource.', 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('test', 'premium', 'default')), 1 => array('method' => 'POST', 'uri' => '/api/resources.{_format}', 'description' => 'Create a new resource.', 'parameters' => array('a' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => 'Something that describes A.', 'readonly' => false), 'b' => array('dataType' => 'float', 'actualType' => 'float', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => NULL, 'readonly' => false), 'c' => array('dataType' => 'choice', 'actualType' => 'choice', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => NULL, 'readonly' => false, 'format' => '{"x":"X","y":"Y","z":"Z"}'), 'd' => array('dataType' => 'datetime', 'actualType' => 'datetime', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => NULL, 'readonly' => false), 'e' => array('dataType' => 'date', 'actualType' => 'date', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => NULL, 'readonly' => false), 'g' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => NULL, 'readonly' => false)), 'requirements' => array('_format' => array('requirement' => 'json|xml|html', 'dataType' => '', 'description' => '')), 'response' => array('foo' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => 'baz', 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'baz' => array('dataType' => 'array of integers', 'actualType' => 'collection', 'subType' => 'integer', 'required' => false, 'default' => NULL, 'description' => 'Epic description.

With multiple lines.', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'circular' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL, 'children' => array('foo' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => 'baz', 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'baz' => array('dataType' => 'array of integers', 'actualType' => 'collection', 'subType' => 'integer', 'required' => false, 'default' => NULL, 'description' => 'Epic description.

With multiple lines.', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'circular' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'parent' => array('dataType' => 'object (JmsTest)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL, 'children' => array('foo' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'number' => array('dataType' => 'double', 'actualType' => 'float', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'arr' => array('dataType' => 'array', 'actualType' => 'collection', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested_array' => array('dataType' => 'array of objects (JmsNested)', 'actualType' => 'collection', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL))), 'since' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => '0.2', 'untilVersion' => NULL), 'until' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => '0.3'), 'since_and_until' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => '0.4', 'untilVersion' => '0.5'))), 'parent' => array('dataType' => 'object (JmsTest)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsTest', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL, 'children' => array('foo' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'number' => array('dataType' => 'double', 'actualType' => 'float', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'arr' => array('dataType' => 'array', 'actualType' => 'collection', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested_array' => array('dataType' => 'array of objects (JmsNested)', 'actualType' => 'collection', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL))), 'since' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => '0.2', 'untilVersion' => NULL), 'until' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => '0.3'), 'since_and_until' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => '0.4', 'untilVersion' => '0.5')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default', 'premium')), 2 => array('method' => 'DELETE', 'uri' => '/api/resources/{id}.{_format}', 'description' => 'Delete a resource by ID.', 'requirements' => array('_format' => array('requirement' => 'json|xml|html', 'dataType' => '', 'description' => ''), 'id' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false), 3 => array('method' => 'GET', 'uri' => '/api/resources/{id}.{_format}', 'description' => 'Retrieve a resource by ID.', 'requirements' => array('_format' => array('requirement' => 'json|xml|html', 'dataType' => '', 'description' => ''), 'id' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false)), '/tests' => array(0 => array('method' => 'GET', 'uri' => '/tests.{_format}', 'description' => 'index action', 'filters' => array('a' => array('dataType' => 'integer'), 'b' => array('dataType' => 'string', 'arbitrary' => array(0 => 'arg1', 1 => 'arg2'))), 'requirements' => array('_format' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false), 1 => array('method' => 'GET', 'uri' => '/tests.{_format}', 'description' => 'index action', 'filters' => array('a' => array('dataType' => 'integer'), 'b' => array('dataType' => 'string', 'arbitrary' => array(0 => 'arg1', 1 => 'arg2'))), 'requirements' => array('_format' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false), 2 => array('method' => 'POST', 'uri' => '/tests.{_format}', 'host' => 'api.test.dev', 'description' => 'create test', 'parameters' => array('a' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => 'A nice description', 'readonly' => false), 'b' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => false, 'description' => NULL, 'readonly' => false), 'c' => array('dataType' => 'boolean', 'actualType' => 'boolean', 'subType' => NULL, 'default' => false, 'required' => true, 'description' => NULL, 'readonly' => false), 'd' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => 'DefaultTest', 'required' => true, 'description' => NULL, 'readonly' => false)), 'requirements' => array('_format' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default', 'premium')), 3 => array('method' => 'POST', 'uri' => '/tests.{_format}', 'host' => 'api.test.dev', 'description' => 'create test', 'parameters' => array('a' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => 'A nice description', 'readonly' => false), 'b' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => false, 'description' => NULL, 'readonly' => false), 'c' => array('dataType' => 'boolean', 'actualType' => 'boolean', 'subType' => NULL, 'default' => false, 'required' => true, 'description' => NULL, 'readonly' => false), 'd' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => 'DefaultTest', 'required' => true, 'description' => NULL, 'readonly' => false)), 'requirements' => array('_format' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default', 'premium'))), '/tests2' => array(0 => array('method' => 'POST', 'uri' => '/tests2.{_format}', 'description' => 'post test 2', 'requirements' => array('_format' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default', 'premium'))), 'TestResource' => array(0 => array('method' => 'ANY', 'uri' => '/named-resource', 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default'))), 'others' => array(0 => array('method' => 'POST', 'uri' => '/another-post', 'description' => 'create another test', 'parameters' => array('dependency_type' => array('required' => true, 'readonly' => false, 'description' => '', 'default' => NULL, 'dataType' => 'object (dependency_type)', 'actualType' => 'model', 'subType' => 'dependency_type', 'children' => array('a' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'default' => NULL, 'required' => true, 'description' => 'A nice description', 'readonly' => false)))), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false, 'views' => array('default', 'test')), 1 => array('method' => 'ANY', 'uri' => '/any', 'description' => 'Action without HTTP verb', 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false), 2 => array('method' => 'ANY', 'uri' => '/any/{foo}', 'description' => 'Action without HTTP verb', 'requirements' => array('foo' => array('requirement' => '', 'dataType' => '', 'description' => '')), 'https' => false, 'authentication' => false, 'authenticationRoles' => array(), 'deprecated' => false), 3 => array('method' => 'ANY', 'uri' => '/authenticated', 'https' => false, 'authentication' => true, 'authenticationRoles' => array(0 => 'ROLE_USER', 1 => 'ROLE_FOOBAR'), 'deprecated' => false), 4 => array('method' => 'POST', 'uri' => '/jms-input-test', 'description' => 'Testing JMS', 'parameters' => array('foo' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'number' => array('dataType' => 'double', 'actualType' => 'float', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'arr' => array('dataType' => 'array', 'actualType' => 'collection', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'nested' => array('dataType' => 'object (JmsNested)', 'actualType' => 'model', 'subType' => 'Nelmio\\ApiDocBundle\\Tests\\Fixtures\\Model\\JmsNested', 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL, 'children' => array('foo' => array('dataType' => 'DateTime', 'actualType' => 'datetime', 'subType' => NULL, 'required' => false, 'default' => NULL, 'description' => '', 'readonly' => true, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'bar' => array('dataType' => 'string', 'actualType' => 'string', 'subType' => NULL, 'required' => false, 'default' => 'baz', 'description' => '', 'readonly' => false, 'sinceVersion' => NULL, 'untilVersion' => NULL), 'baz' => array('dataType' => 'array of integers', 'actualType' => 'collection', 'subT 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP set_exception_handler函数代码示例发布时间:2022-05-15
下一篇:
PHP set_error函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap