repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
clue/reactphp-ndjson | https://github.com/clue/reactphp-ndjson/blob/8fc557eaa902e4f1de171b5b4eaa6246fbe4118e/tests/EncoderTest.php | tests/EncoderTest.php | <?php
namespace Clue\Tests\React\NDJson;
use React\Stream\WritableResourceStream;
use Clue\React\NDJson\Encoder;
class EncoderTest extends TestCase
{
private $output;
private $encoder;
/**
* @before
*/
public function setUpEncoder()
{
$stream = fopen('php://temp', 'r+');
... | php | MIT | 8fc557eaa902e4f1de171b5b4eaa6246fbe4118e | 2026-01-05T04:33:43.923890Z | false |
clue/reactphp-ndjson | https://github.com/clue/reactphp-ndjson/blob/8fc557eaa902e4f1de171b5b4eaa6246fbe4118e/examples/91-benchmark-count.php | examples/91-benchmark-count.php | <?php
// simple usage:
// $ php examples/91-benchmark-count.php < examples/users.ndjson
//
// getting reasonable results requires a large data set:
// 1) download a large CSV/TSV dataset, for example:
// @link https://datasets.imdbws.com/
// @link https://github.com/fivethirtyeight/russian-troll-tweets
//
// 2) conver... | php | MIT | 8fc557eaa902e4f1de171b5b4eaa6246fbe4118e | 2026-01-05T04:33:43.923890Z | false |
clue/reactphp-ndjson | https://github.com/clue/reactphp-ndjson/blob/8fc557eaa902e4f1de171b5b4eaa6246fbe4118e/examples/validate.php | examples/validate.php | <?php
// $ php examples/validate.php < examples/users.ndjson
use React\EventLoop\Loop;
require __DIR__ . '/../vendor/autoload.php';
$exit = 0;
$in = new React\Stream\ReadableResourceStream(STDIN);
$out = new React\Stream\WritableResourceStream(STDOUT);
$info = new React\Stream\WritableResourceStream(STDERR);
$ndjs... | php | MIT | 8fc557eaa902e4f1de171b5b4eaa6246fbe4118e | 2026-01-05T04:33:43.923890Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/.php_cs.php | .php_cs.php | <?php
// Directories to not scan
$excludeDirs = [
'vendor/',
];
// Files to not scan
$excludeFiles = [];
// Create a new Symfony Finder instance
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude($excludeDirs)
->ignoreDotFiles(true)->ignoreVCS(true)
->filter(function (\SplFileInfo $fil... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/src/IlluminateTagged.php | src/IlluminateTagged.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/src/TagsServiceProvider.php | src/TagsServiceProvider.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/src/TaggableTrait.php | src/TaggableTrait.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/src/IlluminateTag.php | src/IlluminateTag.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/src/TaggableInterface.php | src/TaggableInterface.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/tests/IlluminateTagTest.php | tests/IlluminateTagTest.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/tests/FunctionalTestCase.php | tests/FunctionalTestCase.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/tests/TaggableTraitTest.php | tests/TaggableTraitTest.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/tests/Stubs/Post2.php | tests/Stubs/Post2.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/tests/Stubs/Post.php | tests/Stubs/Post.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
cartalyst/tags | https://github.com/cartalyst/tags/blob/a0be193318c84dd941a99fe79ef177afc72982aa/resources/migrations/2014_10_29_202547_migration_cartalyst_tags_create_tables.php | resources/migrations/2014_10_29_202547_migration_cartalyst_tags_create_tables.php | <?php
/*
* Part of the Tags package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
*
* @package Tags
* @version 15.0.1
* @author Cartalyst LLC
* @license B... | php | BSD-3-Clause | a0be193318c84dd941a99fe79ef177afc72982aa | 2026-01-05T04:34:11.827779Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Support/Path.php | src/lib/Support/Path.php | <?php namespace Support;
/**
* Class for interacting with and finding out information
* about filesystem paths
*/
class Path
{
/**
* Regex patttern for identifying
* absolute paths
*/
const ABSOLUTE_PATTERN = "/^(?:\/|vfs:|\\\\|\w:\\\\|\w:\/).*$/";
/**
* Function to remove a traili... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Scaffolding/TemplateWriter.php | src/lib/Scaffolding/TemplateWriter.php | <?php namespace Scaffolding;
use Illuminate\Filesystem\Filesystem;
/**
* Class to handle the functions associated with
* writing out a Foreman template file
*/
class TemplateWriter
{
/**
* Default template name
*
* @var string
*/
protected $default_tpl = 'foreman-tpl.json';
/**
... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Construction/Laravel.php | src/lib/Construction/Laravel.php | <?php namespace Construction;
use Console\BuildCommand;
use Symfony\Component\Process\ProcessBuilder;
/**
* Class used for generating a Laravel installation
*/
class Laravel
{
/**
* App directory where Laravel
* should be installed
*
* @var string
*/
protected $appDir;
/**
... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Construction/Composer.php | src/lib/Construction/Composer.php | <?php namespace Construction;
use Illuminate\Filesystem\Filesystem;
use Console\BuildCommand;
use Support\Path;
use Construction\TemplateReader;
/**
* Class for interacting with / adding to the composer.json
* file of a Laravel application. Requirements / actions will
* come from the Foreman template file.
*/
cl... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Construction/TemplateReader.php | src/lib/Construction/TemplateReader.php | <?php namespace Construction;
use Console\BuildCommand;
use Illuminate\Filesystem\Filesystem;
/**
* Class for reading a Foreman template and
* getting certain bits of data from it
*/
class TemplateReader
{
/**
* Constants corresponding to sections of the Foreman
* Template file
*/
const ST... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Construction/Structure.php | src/lib/Construction/Structure.php | <?php namespace Construction;
use Console\BuildCommand;
use Illuminate\Filesystem\Filesystem;
use Support\Path;
/**
* Class for working with filesystem structure
* requirements of the Forman package as defined in
* the Foreman template file.
*/
class Structure
{
/**
* Absolute path to the base applicati... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Console/Command.php | src/lib/Console/Command.php | <?php namespace Console;
/**
* This file was copied from and inspired by a similar
* file in the Laravel / Envoy package which is released
* under the the MIT license.
*
* @see https://github.com/laravel/envoy
*/
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInt... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Console/BuildCommand.php | src/lib/Console/BuildCommand.php | <?php namespace Console;
/**
* This file was copied from and inspired by a similar
* file in the Laravel / Envoy package which is released
* under the the MIT license.
*
* @see https://github.com/laravel/envoy
*/
use Symfony\Component\Process\ProcessBuilder;
use Symfony\Component\Console\Input\InputArgument;
u... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/src/lib/Console/ScaffoldCommand.php | src/lib/Console/ScaffoldCommand.php | <?php namespace Console;
/**
* This file was copied from and inspired by a similar
* file in the Laravel / Envoy package which is released
* under the the MIT license.
*
* @see https://github.com/laravel/envoy
*/
use Symfony\Component\Console\Input\InputArgument;
use Scaffolding\TemplateWriter;
use Illuminate\... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/tests/Support/PathTest.php | tests/Support/PathTest.php | <?php namespace Support;
use Support\Path;
class PathTest extends \PHPUnit_Framework_TestCase
{
public function testRemoveTrailingSlash()
{
$this->assertEquals(
'/path/to/dir',
Path::removeTrailingSlash('/path/to/dir/')
);
$this->assertEquals(
'C:\... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/tests/Scaffolding/TemplateWriterTest.php | tests/Scaffolding/TemplateWriterTest.php | <?php namespace Scaffolding;
use Mockery as m;
use Illuminate\Filesystem\Filesystem as FS;
class TemplateWriterTest extends \PHPUnit_Framework_TestCase
{
public function tearDown()
{
m::close();
}
public function testPathGetter()
{
$path = '/path/to/file';
$tw = new Temp... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/tests/Construction/ComposerTest.php | tests/Construction/ComposerTest.php | <?php namespace Construction;
use Construction\Composer;
use Mockery as m;
class ComposerTest extends \PHPUnit_Framework_TestCase
{
public function tearDown()
{
m::close();
}
public function testReadComposerJson()
{
$appDir = '/path/to/app';
$composerPath = $appDir.DIREC... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/tests/Construction/LaravelTest.php | tests/Construction/LaravelTest.php | <?php namespace Construction;
use Mockery as m;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\ProcessBuilder;
use Construction\Laravel;
class LaravelTest extends \PHPUnit_Framework_TestCase
{
public function tearDown()
{
m::close();
}
public function testInstallLarave... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/tests/Construction/StructureTest.php | tests/Construction/StructureTest.php | <?php namespace Construction;
use Mockery as m;
use Construction\Structure;
use Support\Path;
use org\bovigo\vfs\vfsStream;
class StructureTest extends \PHPUnit_Framework_TestCase
{
/**
* @var vfsStreamDirectory
*/
private $root;
/**
* set up test environmemt
*/
public function... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
Indatus/foreman | https://github.com/Indatus/foreman/blob/09f52bcf03e7a6e8781e9cd3ba261f101d6b7417/tests/Construction/TemplateReaderTest.php | tests/Construction/TemplateReaderTest.php | <?php namespace Construction;
use Mockery as m;
use Construction\TemplateReader;
class TemplateReaderTest extends \PHPUnit_Framework_TestCase
{
public function tearDown()
{
m::close();
}
public function testReadTemplate()
{
$tpl = '/path/to/template.json';
$mFS = m::moc... | php | MIT | 09f52bcf03e7a6e8781e9cd3ba261f101d6b7417 | 2026-01-05T04:34:15.894957Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/footer.php | footer.php | <?php
/**
* Footer
*
* @package YYThemes
*/
if ( !yy_import( 'footer' ) ) {
?>
<div class="yy-footer">
<div class="yy-group">
<div class="container text-center">
<div class="d-flex justify-content-center">
<span>© <?php echo esc_html( gmdate( 'Y' ) ); ?> <a href="<?php echo esc_attr( ho... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/page.php | page.php | <?php
/**
* Page
*
* @package YYThemes
*/
get_header();
if ( !yy_import( 'archive' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<div class="breadcrumb">
<div class="container">
<?php yy_breadcrumb(); ?>
</div>
</div>
</div><!-- yy-group -->
<div clas... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/attachment.php | attachment.php | <?php
/**
* Attachment
*
* @package YYThemes
*/
get_header();
if ( !yy_import( 'archive' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="post-title"><a href="<?php the_permalink(); ?>"
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/archive.php | archive.php | <?php
/**
* Archive
*
* @package YYThemes
*/
get_header();
if ( !yy_import( 'archive' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<div class="breadcrumb">
<div class="container">
<?php yy_breadcrumb(); ?>
</div>
</div>
</div><!-- yy-group -->
<div c... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/comments.php | comments.php | <?php
/**
* Comments
*
* @package YYThemes
*/
// Do not delete these lines.
if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && 'comments.php' === basename( sanitize_text_field( wp_unslash( $_SERVER['SCRIPT_FILENAME'] ) ) ) ) {
esc_html_e( 'Please do not load this page directly. Thanks!', 'onenice' );
exit;
}
if ( p... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/search.php | search.php | <?php
/**
* Search
*
* @package YYThemes
*/
get_header();
if ( !yy_import( 'search' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<div class="breadcrumb">
<div class="container">
<a class="breadcrumb-item" href="<?php echo esc_html( home_url() ); ?>"><?php esc_html_e( 'Home',... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/functions.php | functions.php | <?php
/**
* Functions
*
*/
require __DIR__ . '/vessel/vessel.php';
require __DIR__ . '/ext/ext.php';
/**
* Get option
*
* @param string $name option name.
*/
function yy_get( $name) {
return vessel\get($name);
}
/**
* Get page
*
* @param string $template tempalge name.
*/
function yy_get_page(... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/index.php | index.php | <?php
/**
* Index
*
* @package YYThemes
*/
get_header();
if ( !yy_import( 'index' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<div class="container">
<div class="row">
<div class="col-md-8">
<?php yy_get( 'enable_slides' ) && get_template_part( 'template-parts/ho... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/404.php | 404.php | <?php
/**
* Not found
*
* @package YYThemes
*/
get_header();
if (!yy_import( 'archive' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<style>
.errorDiv{
margin: 0 auto;
text-align: center;
}
.main{
padding-top:60px;
}
</style>
<div id="primary" class="full-page">
<div class="errorDiv">
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/header.php | header.php | <?php
/**
* Header
*
* @package YYThemes
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" c... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/single.php | single.php | <?php
/**
* Single
*
* @package YYThemes
*/
get_header();
if ( !yy_import( 'single' ) ) {?>
<div class="yy-main">
<div class="yy-group">
<div class="breadcrumb">
<div class="container">
<?php yy_breadcrumb(); ?>
</div>
</div>
</div><!-- yy-group -->
<div cla... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/sidebar.php | sidebar.php | <?php
/**
* Sidebar
*
* @package YYThemes
*/
?>
<div class="col-md-4 right">
<ul role="navigation">
<?php
/* Widgetized sidebar, if you have the plugin installed. */
$page_type = 'home';
if ( is_single() ) {
$page_type = 'single';
} elseif ( is_archive() ) {
$page_type = 'archive';
}
if ( ... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/Ajax.php | vessel/Ajax.php | <?php
/**
* @name Xenice Ajax
* @author xenice <xenice@qq.com>
* @version 1.0.0 2019-08-16
* @link http://www.xenice.com/
* @package xenice
*/
namespace vessel;
class Ajax
{
public function action($method)
{
add_action( 'wp_ajax_' . $method, [$this, $method] );
add_... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/Options.php | vessel/Options.php | <?php
/**
* @name xenice options
* @author xenice <xenice@qq.com>
* @version 1.0.0 2019-09-26
* @link http://www.xenice.com/
* @package xenice
*/
namespace vessel;
class Options extends Admin
{
public function __construct($args = [])
{
parent::__construct($args... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/Admin.php | vessel/Admin.php | <?php
/**
* @name Xenice Admin
* @author xenice <xenice@qq.com>
* @version 1.0.0 2020-03-17
* @link https://www.xenice.com/
* @package xenice
*/
namespace vessel;
class Admin
{
//private $show_menu = false;
//private $main_menu = [];
protected $options = [];
protect... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/Config.php | vessel/Config.php | <?php
/**
* @name xenice options
* @author xenice <xenice@qq.com>
* @version 1.0.0 2019-09-26
* @link http://www.xenice.com/
* @package xenice
*/
namespace vessel;
class Config extends Options
{
protected $key = 'yy';
protected $name = ''; // Database option name
protect... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/Elements.php | vessel/Elements.php | <?php
/**
* @name xenice options elements
* @author xenice <xenice@qq.com>
* @version 1.0.0 2019-12-10
* @link http://www.xenice.com/
* @package xenice
*/
namespace vessel;
trait Elements
{
private function none($field)
{
return '';
}
private function label($... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/vessel.php | vessel/vessel.php | <?php
namespace vessel;
define( 'HOME_URL', home_url( '', empty( $_SERVER['HTTPS'] ) ? 'http' : 'https' ) );
define( 'AUTHOR_URI', wp_get_theme()->get('AuthorURI'));
define( 'THEME_URI', wp_get_theme()->get('ThemeURI'));
define( 'THEME_NAME', 'onenice' );
define( 'THEME_TITLE', 'onenice' );
define( 'THEME_DIR', get_t... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/login/Login.php | vessel/login/Login.php | <?php
namespace vessel\login;
class Login {
/**
* Constructor
*/
public function __construct(){
new ajax\LoginAjax;
add_action( 'wp_enqueue_scripts', [$this, 'scripts']);
add_action('wp_head', [$this, 'head'], 20);
add_action('admin_footer', [$this, 'admin_footer']);
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/login/ajax/LoginAjax.php | vessel/login/ajax/LoginAjax.php | <?php
namespace vessel\login\ajax;
use vessel\Ajax;
use vessel\login\includes\ImageCaptcha;
class LoginAjax extends Ajax
{
public function __construct()
{
$this->action('login');
$this->action('register');
$this->action('check');
$this->action('captcha');
$this->action('forgetPassword');
$this->action('... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/login/includes/ImageCaptcha.php | vessel/login/includes/ImageCaptcha.php | <?php
namespace vessel\login\includes;
class ImageCaptcha
{
//验证码的session的下标
public $key = 'xenice_captcha'; //验证码关键字
//验证码中使用的字符,01IO容易混淆,不用
public $codeSet = '3456789ABCDEFGHJKLMNPQRTUVWXY';
public $fontSize = 16; // 验证码字体大小(px)
public $useCurve = true; // 是否画混淆曲线
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/login/templates/modal.php | vessel/login/templates/modal.php | <?php
defined( 'ABSPATH' ) || exit;
?>
<div class='user-login'>
<!-- Login-modal -->
<div class="modal fade" id="login-modal">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-body">
<ul class="nav justify-content-center">
<l... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/login/templates/xenice-login.php | vessel/login/templates/xenice-login.php | <?php
/**
* template name: xenice-login
* description: login page template
*/
if(is_user_logged_in()){
header("Location:".home_url());
exit;
}
$action = $_GET['action']??'login';
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="render... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/ajax/LikeAjax.php | vessel/ajax/LikeAjax.php | <?php
namespace vessel\ajax;
use vessel\Ajax;
class LikeAjax extends Ajax
{
public function __construct()
{
$this->action('like');
}
public function like()
{
$id = esc_sql($_POST['pid']);
if(isset($_COOKIE['xenice_likes_'.$id])){
echo json_encode(['key'=>'liked', 'value'=>esc_html__(... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/widgets/Widgets.php | vessel/widgets/Widgets.php | <?php
namespace vessel\widgets;
class Widgets {
/**
* Constructor
*/
public function __construct() {
add_action(
'widgets_init',
function() {
register_widget( 'vessel\widgets\RecentPostsWidget');
register_widget( 'vessel\widgets\HotPostsWidget');
register_widget( 'vessel\widgets\StickyPos... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/widgets/PostsWidget.php | vessel/widgets/PostsWidget.php | <?php
namespace vessel\widgets;
/**
* Xenice_Widget_Posts
*
* Posts widget basics class.
*/
class PostsWidget extends \WP_Widget {
/**
* Widget title
*
* @var string
*/
public $title = '';
/**
* Constructor
*
* @param string $id widget id.
* @param string $name widget name.
*/
public f... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/widgets/RecentPostsWidget.php | vessel/widgets/RecentPostsWidget.php | <?php
namespace vessel\widgets;
/**
* Xenice_Widget_Recent_Posts
*
* Recent posts widget class.
*/
class RecentPostsWidget extends PostsWidget {
/**
* Query args
*
* @var array
*/
public $query_args = array(
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' =... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/widgets/HotPostsWidget.php | vessel/widgets/HotPostsWidget.php | <?php
namespace vessel\widgets;
/**
* Xenice_Widget_Hot_Posts
*
* Hot posts widget class.
*/
class HotPostsWidget extends PostsWidget {
/**
* Query args
*
* @var array
*/
public $query_args = array(
'meta_key' => 'xenice_views',
'orderby' => 'meta_value_num',
'no_found_rows'... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/vessel/widgets/StickyPostsWidget.php | vessel/widgets/StickyPostsWidget.php | <?php
namespace vessel\widgets;
/**
* Xenice_Widget_Sticky_Posts
*
* Sticky posts widget class.
*/
class StickyPostsWidget extends PostsWidget {
/**
* Query args
*
* @var array
*/
public $query_args = array(
'orderby' => 'modified',
'post__in' => '',
'no_found_rows' =>... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/class-ext-config.php | ext/class-ext-config.php | <?php
class YYThemes_Ext_Config extends vessel\Options
{
protected $key = 'yy_ext';
protected $name = ''; // Database option name
protected $defaults = [];
public function __construct()
{
$tabs = [];
$this->name = 'xenice_' . $this->key;
$this->defaults[] = [
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/class-photoswipe.php | ext/class-photoswipe.php | <?php
class YYThemes_Photoswipe
{
public function __construct(){
add_filter('yythemes_ext_more_fields', [$this, 'fields']);
if(yy_ext_get('enable_photoswipe')){
add_action('wp_enqueue_scripts', [$this, 'load_scripts'], 20);
add_filter('wp_footer', [$this, 'wp_footer... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/class-optimize.php | ext/class-optimize.php | <?php
class YYThemes_Optimize
{
public function __construct()
{
add_filter('yythemes_ext_optimize_fields', [$this, 'fields']);
yy_ext_get('enable_classic_editor') && add_filter('use_block_editor_for_post', '__return_false');
if(yy_ext_get('enable_classic_widget')){
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/class-relative-date.php | ext/class-relative-date.php | <?php
class YYThemes_Relative_Date
{
public function __construct()
{
add_filter('yythemes_ext_more_fields', [$this, 'fields']);
if(yy_ext_get('enable_relative_date')){
add_filter( 'the_date', [$this, 'format_date'], 20, 1);
add_filter( 'get_the_date', [$this, 'format_get... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/ext.php | ext/ext.php | <?php
/**
* Get ext option
*
* @param string $name option name.
*/
function yy_ext_get($name, $key='xenice_yy_ext'){
static $option = [];
if(!$option){
$options = get_option($key)?:[];
foreach($options as $o){
$option = array_merge($option, $o);
}
}
return $optio... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/class-sticky-posts.php | ext/class-sticky-posts.php | <?php
class YYThemes_Sticky_Posts
{
public function __construct(){
add_filter('yythemes_ext_more_fields', [$this, 'fields']);
yy_ext_get('enable_sticky_posts') && add_action('yythemes_before_recent_posts', [$this, 'template']);
}
public function fields($fields)
{
$fields[] ... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/templates/sticky-posts.php | ext/templates/sticky-posts.php | <?php
if(!defined('ABSPATH')) exit;
?>
<style>
.yy-main .hot{
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 15px;
}
.yy-main .hot ul{
padding:0;
margin:0;
width:48%;
}
.yy-main .hot li{
list-style: none;
margin:0;
padding:5px 0;
display... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/ext/templates/photoswipe/template.php | ext/templates/photoswipe/template.php | <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<div class="pswp__bg"></div>
<div class="pswp__scroll-wrap">
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/page-templates/full-width-template.php | page-templates/full-width-template.php | <?php
/**
* Template Name: Full width template
*
*/
get_header();
?>
<div class="yy-main">
<div class="yy-group">
<div class="breadcrumb">
<div class="container">
<?php yy_breadcrumb(); ?>
</div>
</div>
</div><!-- yy-group -->
<div class="yy-group">
<... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/template-parts/related-posts.php | template-parts/related-posts.php | <?php
/**
* Related posts
*
* @package YYThemes
*/
?>
<div class="related">
<h3><?php esc_html_e( 'Related Posts', 'onenice' ); ?></h3>
<ul>
<?php
$r = new WP_Query(
apply_filters(
'yy_related_posts_args',
array(
'tax_query' => array(
array(
'taxonomy' => 'category',
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/template-parts/cards-thumbnail.php | template-parts/cards-thumbnail.php | <?php
/**
* Thumbnail cards
*
* @package YYThemes
*/
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
$thumbnail_url = get_the_post_thumbnail_url();
if ( ! $thumbnail_url) {
if(yy_get('use_post_first_image_as_thumbnail')){
$thumbnail_url = yy_get_post_first_image(get_post());
... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/template-parts/cards-text.php | template-parts/cards-text.php | <?php
/**
* Text cards
*
* @package YYThemes
*/
?>
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<div class="card">
<div class="card-body">
<h4 class="card-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h4>
<?php ... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xenice/onenice | https://github.com/xenice/onenice/blob/7819a978cb58d9e8fe63c166abf92752e9aaa393/template-parts/home-slides.php | template-parts/home-slides.php | <?php
/**
* Home slides
*
* @package YYThemes
*/
?>
<div id="demo" class="carousel slide" data-ride="carousel">
<ul class="carousel-indicators">
<?php
$slides = yy_get( 'slides');
if($slides){
$i = 0;
foreach ($slides as $slide) {
$src = $slide['src']??'';
if ( empty( $src )... | php | MIT | 7819a978cb58d9e8fe63c166abf92752e9aaa393 | 2026-01-05T04:34:13.899282Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Filesystem.php | src/Filesystem.php | <?php
namespace Xiaoler\Blade;
use Exception;
class Filesystem
{
/**
* Determine if a file exists.
*
* @param string $path
* @return bool
*/
public function exists($path)
{
return file_exists($path);
}
/**
* Get the contents of a file.
*
* @param... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Autoloader.php | src/Autoloader.php | <?php
namespace Xiaoler\Blade;
class Autoloader
{
/**
* Registers Xiaoler\Blade\Autoloader as an SPL autoloader and require helpers function.
*/
public static function register()
{
require 'helpers.php';
spl_autoload_register([self::class, 'autoload']);
}
/**
* Han... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/helpers.php | src/helpers.php | <?php
if (!function_exists('e')) {
/**
* Escape HTML entities in a string.
*
* @param string $value
* @return string
*/
function e($value)
{
return htmlentities($value, ENT_QUOTES, 'UTF-8', false);
}
}
if (!function_exists('array_except')) {
/**
* Get all of... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/ViewFinderInterface.php | src/ViewFinderInterface.php | <?php
namespace Xiaoler\Blade;
interface ViewFinderInterface
{
/**
* Hint path delimiter value.
*
* @var string
*/
const HINT_PATH_DELIMITER = '::';
/**
* Get the fully qualified location of the view.
*
* @param string $view
* @return string
*/
public fu... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/FileViewFinder.php | src/FileViewFinder.php | <?php
namespace Xiaoler\Blade;
use InvalidArgumentException;
use Xiaoler\Blade\Filesystem;
class FileViewFinder implements ViewFinderInterface
{
/**
* The filesystem instance.
*
* @var \Xiaoler\Blade\Filesystem
*/
protected $files;
/**
* The array of active view paths.
*
... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Factory.php | src/Factory.php | <?php
namespace Xiaoler\Blade;
use Xiaoler\Blade\Support\Arr;
use Xiaoler\Blade\Support\Str;
use InvalidArgumentException;
use Xiaoler\Blade\Contracts\Arrayable;
use Xiaoler\Blade\Engines\EngineResolver;
class Factory
{
use Concerns\ManagesComponents,
Concerns\ManagesLayouts,
Concerns\ManagesLoop... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/View.php | src/View.php | <?php
namespace Xiaoler\Blade;
use Exception;
use Throwable;
use ArrayAccess;
use BadMethodCallException;
use Xiaoler\Blade\Support\Str;
use Xiaoler\Blade\Contracts\Arrayable;
use Xiaoler\Blade\Contracts\Renderable;
use Xiaoler\Blade\Engines\EngineInterface;
class View implements ArrayAccess
{
/**
* The vie... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/ViewName.php | src/ViewName.php | <?php
namespace Xiaoler\Blade;
class ViewName
{
/**
* Normalize the given event name.
*
* @param string $name
* @return string
*/
public static function normalize($name)
{
$delimiter = ViewFinderInterface::HINT_PATH_DELIMITER;
if (strpos($name, $delimiter) === f... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Engines/PhpEngine.php | src/Engines/PhpEngine.php | <?php
namespace Xiaoler\Blade\Engines;
use Exception;
use Throwable;
use Symfony\Component\Debug\Exception\FatalThrowableError;
class PhpEngine implements EngineInterface
{
/**
* Get the evaluated contents of the view.
*
* @param string $path
* @param array $data
* @return string
... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Engines/CompilerEngine.php | src/Engines/CompilerEngine.php | <?php
namespace Xiaoler\Blade\Engines;
use Exception;
use ErrorException;
use Xiaoler\Blade\Support\Arr;
use Xiaoler\Blade\Compilers\CompilerInterface;
class CompilerEngine extends PhpEngine
{
/**
* The Blade compiler instance.
*
* @var \Xiaoler\Blade\Compilers\CompilerInterface
*/
protec... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Engines/FileEngine.php | src/Engines/FileEngine.php | <?php
namespace Xiaoler\Blade\Engines;
class FileEngine implements EngineInterface
{
/**
* Get the evaluated contents of the view.
*
* @param string $path
* @param array $data
* @return string
*/
public function get($path, array $data = [])
{
return file_get_cont... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Engines/Engine.php | src/Engines/Engine.php | <?php
namespace Xiaoler\Blade\Engines;
abstract class Engine
{
/**
* The view that was last to be rendered.
*
* @var string
*/
protected $lastRendered;
/**
* Get the last view that was rendered.
*
* @return string
*/
public function getLastRendered()
{
... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Engines/EngineInterface.php | src/Engines/EngineInterface.php | <?php
namespace Xiaoler\Blade\Engines;
interface EngineInterface
{
/**
* Get the evaluated contents of the view.
*
* @param string $path
* @param array $data
* @return string
*/
public function get($path, array $data = []);
}
| php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Engines/EngineResolver.php | src/Engines/EngineResolver.php | <?php
namespace Xiaoler\Blade\Engines;
use Closure;
use InvalidArgumentException;
class EngineResolver
{
/**
* The array of engine resolvers.
*
* @var array
*/
protected $resolvers = [];
/**
* The resolved engine instances.
*
* @var array
*/
protected $resolve... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Support/Arr.php | src/Support/Arr.php | <?php
namespace Xiaoler\Blade\Support;
use ArrayAccess;
class Arr
{
/**
* Determine whether the given value is array accessible.
*
* @param mixed $value
* @return bool
*/
public static function accessible($value)
{
return is_array($value) || $value instanceof ArrayAcce... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Support/HtmlString.php | src/Support/HtmlString.php | <?php
namespace Xiaoler\Blade\Support;
class HtmlString
{
/**
* The HTML string.
*
* @var string
*/
protected $html;
/**
* Create a new HTML string instance.
*
* @param string $html
* @return void
*/
public function __construct($html)
{
$this... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Support/Str.php | src/Support/Str.php | <?php
namespace Xiaoler\Blade\Support;
class Str
{
/**
* The cache of snake-cased words.
*
* @var array
*/
protected static $snakeCache = [];
/**
* Determine if a given string contains a given substring.
*
* @param string $haystack
* @param string|array $needle... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Contracts/Renderable.php | src/Contracts/Renderable.php | <?php
namespace Xiaoler\Blade\Contracts;
interface Renderable
{
/**
* Get the evaluated contents of the object.
*
* @return string
*/
public function render();
}
| php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Contracts/Arrayable.php | src/Contracts/Arrayable.php | <?php
namespace Xiaoler\Blade\Contracts;
interface Arrayable
{
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray();
}
| php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Concerns/ManagesLoops.php | src/Concerns/ManagesLoops.php | <?php
namespace Xiaoler\Blade\Concerns;
use Countable;
use Xiaoler\Blade\Support\Arr;
trait ManagesLoops
{
/**
* The stack of in-progress loops.
*
* @var array
*/
protected $loopsStack = [];
/**
* Add new loop to the stack.
*
* @param \Countable|array $data
* @r... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Concerns/ManagesLayouts.php | src/Concerns/ManagesLayouts.php | <?php
namespace Xiaoler\Blade\Concerns;
use InvalidArgumentException;
trait ManagesLayouts
{
/**
* All of the finished, captured sections.
*
* @var array
*/
protected $sections = [];
/**
* The stack of in-progress sections.
*
* @var array
*/
protected $section... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Concerns/ManagesStacks.php | src/Concerns/ManagesStacks.php | <?php
namespace Xiaoler\Blade\Concerns;
use InvalidArgumentException;
trait ManagesStacks
{
/**
* All of the finished, captured push sections.
*
* @var array
*/
protected $pushes = [];
/**
* All of the finished, captured prepend sections.
*
* @var array
*/
pro... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Concerns/ManagesComponents.php | src/Concerns/ManagesComponents.php | <?php
namespace Xiaoler\Blade\Concerns;
use Xiaoler\Blade\Support\Arr;
use Xiaoler\Blade\Support\HtmlString;
trait ManagesComponents
{
/**
* The components being rendered.
*
* @var array
*/
protected $componentStack = [];
/**
* The original data passed to the component.
*
... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Compilers/CompilerInterface.php | src/Compilers/CompilerInterface.php | <?php
namespace Xiaoler\Blade\Compilers;
interface CompilerInterface
{
/**
* Get the path to the compiled version of a view.
*
* @param string $path
* @return string
*/
public function getCompiledPath($path);
/**
* Determine if the given view is expired.
*
* @par... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Compilers/Compiler.php | src/Compilers/Compiler.php | <?php
namespace Xiaoler\Blade\Compilers;
use InvalidArgumentException;
use Xiaoler\Blade\Filesystem;
abstract class Compiler
{
/**
* The Filesystem instance.
*
* @var \Xiaoler\Blade\Filesystem
*/
protected $files;
/**
* Get the cache path for the compiled views.
*
* @v... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Compilers/BladeCompiler.php | src/Compilers/BladeCompiler.php | <?php
namespace Xiaoler\Blade\Compilers;
use Xiaoler\Blade\Support\Arr;
use Xiaoler\Blade\Support\Str;
class BladeCompiler extends Compiler implements CompilerInterface
{
use Concerns\CompilesComments,
Concerns\CompilesComponents,
Concerns\CompilesConditionals,
Concerns\CompilesEchos,
... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Compilers/Concerns/CompilesLayouts.php | src/Compilers/Concerns/CompilesLayouts.php | <?php
namespace Xiaoler\Blade\Compilers\Concerns;
use Xiaoler\Blade\Factory as ViewFactory;
trait CompilesLayouts
{
/**
* The name of the last section that was started.
*
* @var string
*/
protected $lastSection;
/**
* Compile the extends statements into valid PHP.
*
* ... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
xleliu/blade | https://github.com/xleliu/blade/blob/b3a71e2e589e31956209e7f3d5ce6f9473e63a45/src/Compilers/Concerns/CompilesInjections.php | src/Compilers/Concerns/CompilesInjections.php | <?php
namespace Xiaoler\Blade\Compilers\Concerns;
trait CompilesInjections
{
/**
* Compile the inject statements into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileInject($expression)
{
$segments = explode(',', preg_replace("/[\(\... | php | MIT | b3a71e2e589e31956209e7f3d5ce6f9473e63a45 | 2026-01-05T04:34:28.053245Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.