text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|>// // ssecli-stream.cc // // Copyright (c) 2026 Yuji Hirose. All rights reserved. // MIT License // // SSE (Server-Sent Events) client example using Streaming API // with automatic reconnection support (similar to JavaScript's EventSource) // #include <httplib.h> #include <chrono> #include <iostrea...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>path = "/event1"; cout << "SSE Client using httplib::sse::SSEClient\n"; cout << "Connecting to: " << host << path << "\n"; cout << "Press Ctrl+C to exit\n\n"; httplib::Client cli(host); httplib::sse::SSEClient sse(cli, path); // Set up signal handler for graceful shutdown g_sse = &sse; ...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>#include <atomic> #include <chrono> #include <condition_variable> #include <httplib.h> #include <iostream> #include <mutex> #include <sstream> #include <thread> using namespace httplib; using namespace std; class EventDispatcher { public: EventDispa<|fim_suffix|>event: " << id << std::endl; std:...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>m ofs(text_file.filename); ofs << text_file.content; } res.set_content("done", "text/plain"); }); svr.listen("localhost", 1234); } <|fim_prefix|>// // upload.cc // // Copyright (c) 2026 Yuji Hiro<|fim_middle|>se. All rights reserved. // MIT License // #include <fstream> #include <h...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>#include <httplib.h> #include <iostream> using namespace httplib; const auto html = R"HTML( <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>WebSocket Demo</title> <style> body { font-family: monospace; margin: 2em; } #log { height: 300px; overflow-y: scroll; border: 1px solid #...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|> fm.write("\nexport module httplib;\n\n") fm.write("export extern \"C++\" {\n") fm.write(f"{' ' * 4}#include \"httplib.h\"\n") fm.write("}\n") print(f"Wrote {cppm_out}") else: print(f"{cppm_out} is up to date") if __name__ == "_...
fim
yhirose/cpp-httplib
python
<|fim_suffix|>ite("#include \"httplib.h\"\n") fc.write("namespace httplib {\n") # Process lines for header and source split for line in lines: is_border_line: bool = BORDER in line if is_border_line: in_implementation: ...
fim
yhirose/cpp-httplib
python
<|fim_suffix|> return # Header: copy transaction id, set QR=1 RA=1 RCODE=3 (NXDOMAIN), # preserve the requester's RD bit, then echo the question section so # glibc's resolver accepts the reply as matching its outstanding query. txid = query[:2] rd_bit = query[2] & 0x01 flags = struct.pack(...
fim
yhirose/cpp-httplib
python
<|fim_suffix|> 1) return 0; FuzzedStream stream{data + 1, size - 1}; FuzzableClient client; // Use the first byte to select method std::string method; switch (data[0] % 6) { case 0: method = "GET"; break; case 1: method = "POST"; break; case 2: method = "PUT"; break; case 3: method = "PATCH"; break;...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>#include <cstdint> #include <cstring> #include <string> #include <httplib.h> extern "C" i<|fim_suffix|> content_types); break; } case 2: { // extract_media_type with params std::map<std::string, std::string> params; httplib::detail::extract_media_type(input, &params); break; } ...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>#include <cstdint> #include <httplib.h> class FuzzedStream : public httplib::Stream { public: FuzzedStream(const uint8_t *data, size_t size) : data_(data), size_(size), read_pos_(0) {} ssize_t read(char *ptr, size_t size) override { if (size + read_pos_ > size_) { size = size_ - read_pos_...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>bytes.size())); LLVMFuzzerTestOneInput(reinterpret_cast<const uint8_t *>(bytes.data()), bytes.size()); std::cout << "Execution successful" << std::endl; } std::cout << "Execution finished" << std::endl; return 0; } <|fim_prefix|>// Copyright 2017 Google Inc. All Ri...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>#include <cstdint> #include <cstring> #include <string> #include <httplib.h> extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (size < 2) return 0; // Use first byte to select which parsing function to exercise uint8_t selector = data[0]; const char *payload = reinter...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>typename T> explicit AssertionResult( const T& success, typename std::enable_if< !std::is_convertible<T, AssertionResult>::value>::type* /*enabler*/ = nullptr) : success_(success) {} #if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920) GTEST_DISABLE_M...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|> char* Desc() { return "isn't equal to"; } static const char* NegatedDesc() { return "is equal to"; } }; template <typename Rhs> class LtMatcher : public ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt> { public: explicit LtMatcher(const Rhs& rhs) : ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt>(rhs) {} ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>ming // endl or other basic IO manipulators to Message will confuse the // compiler. Message& operator<<(BasicNarrowIoManip val) { *ss_ << val; return *this; } // Instead of 1/0, we want to see true/false for bool values. Message& operator<<(bool b) { return *this << (b ? "true" : "fa...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2007, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>ngleFailureChecker gtest_checker( \ &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \ (substr)); \ { \ ::testi...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>me, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_, \ ::testing::internal::GenerateTypeList<Types>::type>:: \ Register(GTEST_STRINGIFY_(Prefix), \ ::testing::internal::CodeLocation(__FILE__, __LINE__), \ ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>nsible for making sure the value // remains alive and unchanged throughout the current test. static void SetParam(const ParamType* parameter) { parameter_ = parameter; } // Static value used for accessing parameter during a test lifetime. static const ParamType* parameter_; // TestClass must b...
fim
yhirose/cpp-httplib
c
<|fim_suffix|> T2, typename T3> AssertionResult AssertPred3Helper(const char* pred_text, const char* e1, const char* e2, const char* e3, Pred pred, const T1& v1, const T2& v2, const T3& v3) { if (pred(v1, v2, v3)) return AssertionSuccess(); return...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>tting MyClassTest in an anonymous namespace will not work. #define FRIEND_TEST(test_case_name, test_name) \ friend class test_case_name##_##test_name##_Test #endif // GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ <|fim_prefix|>// Copyright 2006, Google Inc. // All rights reserved. // // Redistribution and u...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>RE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION...
fim
yhirose/cpp-httplib
c
// Copyright 2015, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>ST_H_ #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ <|fim_prefix|>// Copyright 2015, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Re...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>stInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \ }; \ \ ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name, \ ...
fim
yhirose/cpp-httplib
c
// Copyright 2008 Google Inc. // All Rights Reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions a...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2015, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
c
<|fim_suffix|>// String - an abstract class holding static string utilities. class GTEST_API_ String { public: // Static utility methods // Clones a 0-terminated C string, allocating memory using new. The // caller is responsible for deleting the return value using // delete[]. Returns the cloned string, or...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2008 Google Inc. // All Rights Reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list o...
fim
yhirose/cpp-httplib
c
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>ailure() << message. AssertionResult AssertionFailure(const Message& message) { return AssertionFailure() << message; } } // namespace testing <|fim_prefix|>// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, ...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
cpp
// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
fim
yhirose/cpp-httplib
c
<|fim_prefix|>// Copyright 2007, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list ...
fim
yhirose/cpp-httplib
cpp
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|> (lead != 0xf0 || s[i] >= 0x90) && (lead != 0xf4 || s[i] < 0x90)) { i += 3; // 4-byte character } else { return false; } } return true; } void ConditionalPrintAsText(const char* str, size_t length, ostream* os) { if (!ContainsUnprintableControlCode...
fim
yhirose/cpp-httplib
cpp
// Copyright 2008, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>ring& errors_str = errors.GetString(); if (errors_str != "") { fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), errors_str.c_str()); fflush(stderr); posix::Abort(); } return registered_tests; } } // namespace internal } // namespace testing <|fim_prefix|>/...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>T_OS_ESP8266 extern "C" { #endif void setup() { testing::InitGoogleTest(); } void loop() { RUN_ALL_TESTS(); } #if GTEST_OS_ESP8266 } #endif #else GTEST_API_ int main(int argc, char **argv) { printf("Running main() from %s\n", __FILE__); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>nclude httplib.h in a separate // compilation unit, thus verifying that inline keywords have not been forgotten // when linked together with test.cc. #include <httplib.h> <|fim_prefix|>// The sole purpos<|fim_middle|>e of this file is to i<|endoftext|>
fim
yhirose/cpp-httplib
cpp
// Test if including windows.h conflicts with httplib.h #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <httplib.h> <|endoftext|>
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>#include ".<|fim_suffix|>alhost", 8080); (void)svr; (void)cli; return 0; } <|fim_middle|>./httplib.h" int main() { httplib::Server svr; httplib::Client cli("loc<|endoftext|>
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>ronments EXPECT_LE(p25, 5) << "25th percentile performance is too slow: " << p25 << "ms (Issue #1777). Timings: " << timings_str.str(); } TEST(BenchmarkTest, localhost) { performance_test("localhost"); } TEST(BenchmarkTest, v6) { performance_test("::1"); } <|fim_prefix|>#include <h...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|>th/auth/hello/world/SHA-256", "/digest-auth/auth/hello/world/SHA-512", }; cli.set_digest_auth("hello", "world"); for (auto path : paths) { auto res = cli.Get(path.c_str()); ASSERT_TRUE(res != nullptr); std::string algo(path.substr(path.rfind('/') + 1)); EXPECT_...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>// ThreadPool unit tests // Set a short idle timeout for faster shrink tests #define CPPHTTPLIB_THREAD_POOL_IDLE_TIMEOUT 1 #include <httplib.h> #include <gtest/gtest.h> #include <atomic> #include <chrono> #include <thread> #include <vector> using namespace httplib; TEST(ThreadPoolTest, BasicTaskExecu...
fim
yhirose/cpp-httplib
cpp
<|fim_prefix|>// Standalone test for WebSocket automatic heartbeat. // Compiled with a 1-second ping interval so we can verify heartbeat behavior // without waiting 30 seconds. #define CPPHTTPLIB_WEBSOCKET_PING_INTERVAL_SECOND 1 #define CPPHTTPLIB_WEBSOCKET_READ_TIMEOUT_SECOND 3 #include <httplib.h> #include "gtest/g...
fim
yhirose/cpp-httplib
cpp
<|fim_suffix|> "valid-typeof": "error", "accessor-pairs": "error", complexity: ["warn", 6], eqeqeq: "warn", "guard-for-in": "error", "no-alert": "warn", "no-caller": "error", "no-case-declarations": "error", "no-div-reg...
fim
yiisoft/yii2
javascript
<|fim_suffix|> ); override( \yii\di\Instance::ensure(0), map([ '' => '@', ]) ); override( \Yii::createObject(0), map([ '' => '@', ]) ); } <|fim_prefix|><?php // .phpstorm.meta.php namespace PHPSTORM_META { override( ...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii; use yii\base\InvalidArgumentException; use yii\base\InvalidConfigException; use yii\base\UnknownClassException; use yii\di\Container; use yii\log\Log...
fim
yiisoft/yii2
php
<|fim_suffix|>om> * @since 2.0 * @phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace * * @template TUserIdentity of \yii\web\IdentityInterface * @extends \yii\BaseYii<TUserIdentity> */ class Yii extends \yii\BaseYii { } spl_autoload_register(['Y...
fim
yiisoft/yii2
php
<|fim_suffix|>er.find(attribute.error); updateAriaInvalid($form, attribute, hasError); var $errorElement = data.settings.validationStateOn === 'input' ? $input : $container; if (hasError) { if (attribute.encodeError) { $error.text(messages[attrib...
fim
yiisoft/yii2
javascript
<|fim_suffix|>($) { $.fn.yiiCaptcha = function (method) { if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { ...
fim
yiisoft/yii2
javascript
<|fim_prefix|>/** * Yii GridView widget. * * This is the JavaScript widget used by the yii\grid\GridView widget. * * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */ (...
fim
yiisoft/yii2
javascript
<|fim_suffix|> }; } xhr.done(function (data, textStatus, jqXHR) { // If multiple requests were successfully loaded, perform cleanup only once if (loadedScripts[jqXHR.yiiUrl]['xhrDone'] === true) { return; } ...
fim
yiisoft/yii2
javascript
/** * Yii validation module. * * This JavaScript module provides the validation methods for the built-in validators. * * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 ...
fim
yiisoft/yii2
javascript
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * Action is the base class for all controller action classes. * * Action provides a way to reuse action method co...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * ActionEvent represents the event parameter used for an action event. * * By setting the [[isValid]] property, one may con...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use yii\helpers\StringHelper; /** * ActionFilter is the base class for action filters. * * An action filter will participate i...
fim
yiisoft/yii2
php
<|fim_suffix|> */ public function getTimeZone() { return date_default_timezone_get(); } /** * Sets the time zone used by this application. * This is a simple wrapper of PHP function date_default_timezone_set(). * Refer to the [php manual](https://www.php.net/manual/en/timezones....
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * ArrayAccessTrait provides the implementation for [[\IteratorAggregate]], [[\ArrayAccess]] and [[\Countable]]. * * Note that ArrayAccess...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * Arrayable is the interface that should be implemented by classes who want to support customizable representation of their instances. * ...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; use yii\helpers\ArrayHelper; use yii\web\Link; use yii\web\Linkable; /** * ArrayableTrait provides a common implementation of the [[A...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * BaseObject is the base class that implements the *property* feature. * * A property is defined by a getter method (e.g. `getL...
fim
yiisoft/yii2
php
<|fim_suffix|>yiiframework.com/license/ */ namespace yii\base; /** * Behavior is the base class for all behavior classes. * * A behavior can be used to enhance the functionality of an existing component without modifying its code. * In particular, it can "inject" its own methods and properties into the component...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * BootstrapInterface is the interface that should be implemented by classes who want to participate in the application bootst...
fim
yiisoft/yii2
php
<|fim_suffix|>set' . $name) || $checkVars && property_exists($this, $name)) { return true; } elseif ($checkBehaviors) { $this->ensureBehaviors(); foreach ($this->_behaviors as $behavior) { if ($behavior->canSetProperty($name, $checkVars)) { ...
fim
yiisoft/yii2
php
<|fim_suffix|>ail.com> * @since 2.0.3 */ interface Configurable { } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * Configurable is the interface that should be implemen...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; use yii\di\Instance; use yii\di\NotInstantiableException; /** * Controller is the base class for classes containing con...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license htt<|fim_suffix|>ction addDynamicPlaceholder($name, $statements); } <|fim_middle|>ps://www.yiiframework.com/license/ */ namespace yii\base; /** * DynamicContentAwareInterface is the interfac...
fim
yiisoft/yii2
php
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * DynamicContentAwareTrait implements common methods for classes * which support a [[View]] dynamic content feature. * * @author Sergey ...
fim
yiisoft/yii2
php
<|fim_suffix|> $this->defineAttribute($attribute); } } } /** * {@inheritdoc} */ public function attributes() { return array_keys($this->_attributes); } /** * Sets the labels for all attributes. * @param string[] $labels attribute la...
fim
yiisoft/yii2
php
<|fim_suffix|> E_USER_WARNING => 'PHP User Warning', E_WARNING => 'PHP Warning', self::E_HHVM_FATAL_ERROR => 'HHVM Fatal Error', ] + (PHP_VERSION_ID < 80400 ? [E_STRICT => 'PHP Strict Warning'] : []); return $names[$this->getCode()] ?? 'Error'; } } <|fim_prefix|><?php /...
fim
yiisoft/yii2
php
<|fim_suffix|>->getTraceAsString(); return $message; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; use yii\helpers\VarDumper; use yii\web\HttpExceptio...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use yii\helpers\StringHelper; /** * Event is the base class for all event classes. * * It encapsulates the parameters associat...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * Exception represents a generic exc<|fim_suffix|>g the user-friendly name of this exception */ public function getN...
fim
yiisoft/yii2
php
<|fim_suffix|>ull, $code = 0, $previous = null) { $this->statusCode = $status; if ($previous === null) { parent::__construct((string)$message, $code); } else { parent::__construct((string)$message, $code, $previous); } } } <|fim_prefix|><?php /** * @link...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * InlineAction represents an action that is defined as a controller method. * * The name of the controller method...
fim
yiisoft/yii2
php
<|fim_suffix|>() { return 'Invalid Argument'; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * InvalidArgumentException represents an exception caused b...
fim
yiisoft/yii2
php
<|fim_suffix|>n getName() { return 'Invalid Call'; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * InvalidCallException represents an exception caused ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC<|fim_suffix|>Xue <qiang.xue@gmail.com> * @since 2.0 */ class InvalidConfigException extends Exception { /** * @return string the user-friendly name of this exception */ public function g...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframewor<|fim_suffix|>; /** * InvalidParamException represents an exception caused by invalid parameters passed to a method. * * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 * @deprecated since 2.0.14. Use [[InvalidArgumentException]] instead. */ class Inv...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * InvalidRouteException represents an exception caused by an invalid route. * * @author Qiang Xue <qiang.xue@gmail.com> * ...
fim
yiisoft/yii2
php
<|fim_suffix|>iendly name of this exception */ public function getName() { return 'Invalid Return Value'; } } <|fim_prefix|><?php /** * @link h<|fim_middle|>ttps://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ na...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use ArrayAccess; use ArrayIterator; use ArrayObject; use IteratorAggregate; use ReflectionClass; use Yii; use yii\helpers\Inflecto...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * ModelEvent represents the parameter needed by [[Model]] even<|fim_suffix|>nt { /** * @var bool whether the model i...
fim
yiisoft/yii2
php
<|fim_suffix|> * - `null`: the named sub-module will be removed from this module */ public function setModule($id, $module) { if ($module === null) { unset($this->_modules[$id]); } else { $this->_modules[$id] = $module; if ($module instanceof self) {...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; /** * NotSupportedException represents an exception caused by accessing features that are not supp<|fim_suffix|> getName() { ...
fim
yiisoft/yii2
php
<|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * Request re<|fim_suffix|> === 'cli'; } /** * Sets the value indicating whether the current request i...
fim
yiisoft/yii2
php
<|fim_suffix|>o client. */ public function send() { } /** * Removes all existing output buffers. */ public function clearOutputBuffers() { // the following manual level counting is to deal with zlib.output_compression set to On for ($level = ob_get_level(); $level...
fim
yiisoft/yii2
php
<|fim_suffix|>g [[hashData()]]. * It indicates whether the hash value in the data is in binary format. If false, it means the hash value consists * of lowercase hex digits only. * hex digits will be generated. * @return string|false the real data with the hash stripped off. False if the data is tamp...
fim
yiisoft/yii2
php
<|fim_suffix|>r providing static instances to classes, * which can be used to obtain class meta information that can not be expressed in static methods. * For example: adjustments made by DI or behaviors reveal only at object level, but might be needed * at class (static) level as well. * * To implement the [[inst...
fim
yiisoft/yii2
php
<|fim_suffix|>Object($className); } return self::$_instances[$className]; } } <|fim_prefix|><?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license https://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * StaticInstanceT...
fim
yiisoft/yii2
php