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
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/hash/hclear.tpl.php
app/views/hash/hclear.tpl.php
<form style="text-align: center;" method="post" action=""> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <h2>Clear <?php echo count($ns)?> hash(s)?</h2> <?php foreach($ns as $n){ ?> <input type="hidden" name="n[]" value="<?php echo htmlspecialchars($n)?>" /> <p style="font-we...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/zset/zdel.tpl.php
app/views/zset/zdel.tpl.php
<form style="text-align: center;" method="post" action=""> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <input type="hidden" name="n" value="<?php echo htmlspecialchars($n)?>" /> <h2>Remove <?php echo count($ks)?> key(s) in <code><?php echo htmlspecialchars($n)?></code>?</h2> <...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/zset/zscan.tpl.php
app/views/zset/zscan.tpl.php
<h2>zscan: <a href="<?php echo _url('zset/zscan', array('n'=>$n))?>"><code><?php echo $n?></code></a></h2> <div style="float: left;"> <a class="btn btn-xs btn-primary" href="<?php echo _url('zset/zset', array('n'=>$n))?>"> <i class="glyphicon glyphicon-plus"></i> Add </a> </div> <div style="float: right;"> <for...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/zset/index.tpl.php
app/views/zset/index.tpl.php
<h2>Type: ZSET</h2> <div style="float: left;"> <a class="btn btn-xs btn-primary" href="<?php echo _url('zset/zset')?>"> <i class="glyphicon glyphicon-plus"></i> Add </a> </div> <div style="float: right;"> <form method="get"> Start: <input type="text" name="s" value="<?php echo htmlspecialchars($s)?>" /> Size...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/zset/zclear.tpl.php
app/views/zset/zclear.tpl.php
<form style="text-align: center;" method="post" action=""> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <h2>Clear <?php echo count($ns)?> zset(s)?</h2> <?php foreach($ns as $n){ ?> <input type="hidden" name="n[]" value="<?php echo htmlspecialchars($n)?>" /> <p style="font-we...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/zset/zset.tpl.php
app/views/zset/zset.tpl.php
<h2>Add or Update ZSET type record(s)</h2> <form role="form" method="post"> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <table class="table table-striped" id="new_table"> <thead> <tr> <th>Zset</th> <th>Key</th> <th> Score <a class="btn btn-xs btn-success" onc...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/zset/zget.tpl.php
app/views/zset/zget.tpl.php
<p><b>Zset:</b></p> <?php echo htmlspecialchars($n)?> <p><b>Key:</b></p> <?php echo htmlspecialchars($k)?> <p><b>Score:</b></p> <?php echo htmlspecialchars($v)?>
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/kv/set.tpl.php
app/views/kv/set.tpl.php
<h2>Add or Update KV type record(s)</h2> <form role="form" method="post"> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <table class="table table-striped" id="new_table"> <thead> <tr> <th>Key</th> <th>Value</th> <th width="80"> TTL <a class="btn btn-xs btn-succ...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/kv/scan.tpl.php
app/views/kv/scan.tpl.php
<h2>Type: KV</h2> <div style="float: left;"> <a class="btn btn-xs btn-primary" href="<?php echo _url('kv/set')?>"> <i class="glyphicon glyphicon-plus"></i> Add </a> </div> <div style="float: right;"> <form method="get"> Start: <input type="text" name="s" value="<?php echo htmlspecialchars($s)?>" /> Size: <s...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/kv/get.tpl.php
app/views/kv/get.tpl.php
<p><b>Key:</b></p> <?php echo htmlspecialchars($k)?> <p><b>Value(<?php echo strlen($v)?> bytes):</b></p> <?php echo htmlspecialchars($v)?> <p><b>TTL:</b></p> <?php echo $ttl?>
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/kv/del.tpl.php
app/views/kv/del.tpl.php
<form style="text-align: center;" method="post" action=""> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <h2>Remove <?php echo count($ks)?> key(s)?</h2> <?php foreach($ks as $k){ ?> <input type="hidden" name="k[]" value="<?php echo htmlspecialchars($k)?>" /> <p style="font-wei...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/queue/qpop.tpl.php
app/views/queue/qpop.tpl.php
<h2>qpop: <code><?php echo $n?></code></h2> <form style="text-align: center;" method="post" action=""> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <input type="hidden" name="n" value="<?php echo htmlspecialchars($n)?>" /> Pop <input name="num" type="text" size="5" value="1" st...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/queue/qrange.tpl.php
app/views/queue/qrange.tpl.php
<h2>qrange: <code><?php echo $n?></code></h2> <div style="float: left;"> <a class="btn btn-xs btn-primary" href="<?php echo _action('qpush', array('n'=>$n))?>"> <i class="glyphicon glyphicon-plus"></i> Push </a> &nbsp; <a class="btn btn-xs btn-danger" href="<?php echo _action('qpop', array('n'=>$n))?>"> <i c...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/queue/index.tpl.php
app/views/queue/index.tpl.php
<h2>Type: QUEUE</h2> <div style="float: left;"> <a class="btn btn-xs btn-primary" href="<?php echo _action('qpush')?>"> <i class="glyphicon glyphicon-plus"></i> Push </a> </div> <div style="float: right;"> <form method="get"> Start: <input type="text" name="s" value="<?php echo htmlspecialchars($s)?>" /> Siz...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/queue/qpush.tpl.php
app/views/queue/qpush.tpl.php
<h2>Add List type record(s)</h2> <form role="form" method="post"> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <table class="table table-striped" id="new_table"> <thead> <tr> <th>List</th> <th width="80">Location</th> <th> Item <a class="btn btn-xs btn-success...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/queue/qget.tpl.php
app/views/queue/qget.tpl.php
<p><b>List:</b></p> <?php echo htmlspecialchars($n)?> <p><b>Index:</b></p> <?php echo htmlspecialchars($k)?> <p><b>Item(<?php echo strlen($v)?> bytes):</b></p> <?php echo htmlspecialchars($v)?>
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/views/queue/qclear.tpl.php
app/views/queue/qclear.tpl.php
<form style="text-align: center;" method="post" action=""> <input type="hidden" name="jump" value="<?php echo htmlspecialchars($jump)?>" /> <h2>Clear <?php echo count($ns)?> queue(s)?</h2> <?php foreach($ns as $n){ ?> <input type="hidden" name="n[]" value="<?php echo htmlspecialchars($n)?>" /> <p style="font-w...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/config/config.php
app/config/config.php
<?php define('ENV', 'online'); return array( 'env' => ENV, 'logger' => array( 'level' => 'all', // none/off|(LEVEL) 'dump' => 'file', // none|html|file, 可用'|'组合 'files' => array( // ALL|(LEVEL) #'ALL' => dirname(__FILE__) . '/../../logs/' . date('Y-m') . '.log', ), ), 'servers' => array( array( 'ho...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/classes/SafeUtil.php
app/classes/SafeUtil.php
<?php class SafeUtil { const CAPTCHA_FIELD_NAME = '_captcha_code'; const ENCRYPT_FIELD_NAME = '_encrypt_code'; private static $ssdb_prefix = 'psa_safe_'; static $salt = 'ssdb_&1234567890*@'; static function token(){ return md5(uniqid() . mt_rand() . microtime(1) . self::$salt); } // 保存一份 token 对应的数据, 有效期为 $...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/classes/SimpleSSDB.php
app/classes/SimpleSSDB.php
<?php /** * Copyright (c) 2012, ideawu * All rights reserved. * @author: ideawu * @link: http://www.ideawu.com/ * * SSDB PHP client SDK. */ class SSDBException extends Exception { } class SSDBTimeoutException extends SSDBException { } /** * All methods(except *exists) returns false on error, * so one should...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/classes/BaseController.php
app/classes/BaseController.php
<?php class BaseController extends Controller { protected $ssdb; function init($ctx){ session_start(); $ctx->user =$_SESSION['login_user']; if(!$ctx->user){ _redirect('login'); return; } $servers = array(); if(isset(App::$config['ssdb'])){ $servers[] = App::$config['ssdb']; } if(isset(Ap...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
ssdb/phpssdbadmin
https://github.com/ssdb/phpssdbadmin/blob/773149de5af4f5c50537e9db5c6082a0a8d94af9/app/classes/captcha/SimpleCaptcha.php
app/classes/captcha/SimpleCaptcha.php
<?php /** * Script para la generación de CAPTCHAS * * @author Jose Rodriguez <jose.rodriguez@exec.cl> * @license GPLv3 * @link http://code.google.com/p/cool-php-captcha * @package captcha * @version 0.3 * */ /** * SimpleCaptcha class * */ class SimpleCaptcha { /** Width of the image */ public $width ...
php
BSD-3-Clause
773149de5af4f5c50537e9db5c6082a0a8d94af9
2026-01-05T02:08:50.184474Z
false
inacho/php-credit-card-validator
https://github.com/inacho/php-credit-card-validator/blob/af3bab9af09dd159fbd23815ab08b1092d7fa963/src/CreditCard.php
src/CreditCard.php
<?php /** * Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. * Also validates the CVC and the expiration date. * * @author Ignacio de Tomás <nacho@inacho.es> * @copyright 2014 Ignacio de Tomás (http://inacho.es) */ namespace Inacho; class CreditCard { prot...
php
MIT
af3bab9af09dd159fbd23815ab08b1092d7fa963
2026-01-05T02:09:02.813068Z
false
inacho/php-credit-card-validator
https://github.com/inacho/php-credit-card-validator/blob/af3bab9af09dd159fbd23815ab08b1092d7fa963/tests/Test.php
tests/Test.php
<?php use Inacho\CreditCard; class Test extends PHPUnit_Framework_TestCase { // card numbers of visa, mastercard, amex, dinersclub, discover and jcb taken from: // https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm // Card numbers of visaelectron, maestro and dankort tak...
php
MIT
af3bab9af09dd159fbd23815ab08b1092d7fa963
2026-01-05T02:09:02.813068Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/regression/wineQuality.php
regression/wineQuality.php
<?php declare(strict_types=1); namespace PhpmlExamples; include 'vendor/autoload.php'; use Phpml\CrossValidation\StratifiedRandomSplit; use Phpml\Dataset\Demo\WineDataset; use Phpml\Metric\Accuracy; use Phpml\Regression\SVR; use Phpml\SupportVectorMachine\Kernel; $dataset = new WineDataset(); $split = new Stratifi...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/bbcRestored.php
classification/bbcRestored.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\ModelManager; include 'vendor/autoload.php'; $start = microtime(true); $modelManager = new ModelManager(); $model = $modelManager->restoreFromFile(__DIR__.'/../model/bbc.phpml'); $total = microtime(true) - $start; echo sprintf('Model loaded in %ss'...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/airPollutionVisualization.php
classification/airPollutionVisualization.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Classification\KNearestNeighbors; use Phpml\Dataset\CsvDataset; use Phpml\Math\Distance\Minkowski; include 'vendor/autoload.php'; $minLat = 41.34343606848294; $maxLat = 57.844750992891; $minLng = -16.040039062500004; $maxLng = 29.311523437500004; $...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/airPollution.php
classification/airPollution.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Classification\KNearestNeighbors; use Phpml\Dataset\CsvDataset; include 'vendor/autoload.php'; $dataset = new CsvDataset(__DIR__.'/../data/air.csv', 2, false, ';'); foreach (range(1, 10) as $k) { $correct = 0; foreach ($dataset->getSamples(...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/languageDetection.php
classification/languageDetection.php
<?php declare(strict_types=1); namespace PhpmlExamples; include 'vendor/autoload.php'; use Phpml\Dataset\CsvDataset; use Phpml\Dataset\ArrayDataset; use Phpml\FeatureExtraction\TokenCountVectorizer; use Phpml\Tokenization\WordTokenizer; use Phpml\CrossValidation\StratifiedRandomSplit; use Phpml\FeatureExtraction\Tf...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/bbcPipeline.php
classification/bbcPipeline.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Classification\SVC; use Phpml\CrossValidation\StratifiedRandomSplit; use Phpml\Dataset\FilesDataset; use Phpml\FeatureExtraction\StopWords\English; use Phpml\FeatureExtraction\TfIdfTransformer; use Phpml\FeatureExtraction\TokenCountVectorizer; use Php...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/spamFilter.php
classification/spamFilter.php
<?php declare(strict_types=1); namespace PhpmlExamples; include 'vendor/autoload.php'; use Phpml\Dataset\CsvDataset; use Phpml\Dataset\ArrayDataset; use Phpml\FeatureExtraction\TokenCountVectorizer; use Phpml\Tokenization\WordTokenizer; use Phpml\CrossValidation\StratifiedRandomSplit; use Phpml\FeatureExtraction\Tf...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/bbc.php
classification/bbc.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Classification\SVC; use Phpml\CrossValidation\StratifiedRandomSplit; use Phpml\Dataset\FilesDataset; use Phpml\FeatureExtraction\StopWords\English; use Phpml\FeatureExtraction\TfIdfTransformer; use Phpml\FeatureExtraction\TokenCountVectorizer; use Php...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/classification/mnist.php
classification/mnist.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Classification\SVC; use Phpml\Dataset\MnistDataset; use Phpml\Metric\Accuracy; use Phpml\ModelManager; require 'vendor/autoload.php'; function convert($size) { $unit=['b','kb','mb','gb','tb','pb']; return @round($size/pow(1024, ($i=floor(log...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/clustering/arson.php
clustering/arson.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Clustering\KMeans; require 'vendor/autoload.php'; $lines = file(__DIR__.'/../data/crimes-arson.csv'); foreach ($lines as &$line) { $row = explode(';', $line); $line = [(float) $row[0], (float) $row[1]]; } $clusterer = new KMeans(5); $cluste...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/clustering/synteticSquaredErrors.php
clustering/synteticSquaredErrors.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Clustering\KMeans; use Phpml\Math\Distance\Euclidean; require 'vendor/autoload.php'; $lines = file(__DIR__.'/../data/syntetic-g.csv'); foreach ($lines as &$line) { $row = explode(',', $line); $line = [(float) $row[0], (float) $row[1]]; } fu...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/clustering/robberySquaredErrors.php
clustering/robberySquaredErrors.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Clustering\KMeans; use Phpml\Math\Distance\Euclidean; require 'vendor/autoload.php'; $lines = file(__DIR__.'/../data/crimes-robbery.csv'); foreach ($lines as &$line) { $row = explode(';', $line); $line = [(float) $row[0], (float) $row[1]]; }...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/clustering/robbery.php
clustering/robbery.php
<?php declare(strict_types=1); namespace PhpmlExamples; use Phpml\Clustering\KMeans; require 'vendor/autoload.php'; $lines = file(__DIR__.'/../data/crimes-robbery.csv'); foreach ($lines as &$line) { $row = explode(';', $line); $line = [(float) $row[0], (float) $row[1]]; } $clusterer = new KMeans(14); $clu...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/preparation/aqcin2csv.php
preparation/aqcin2csv.php
<?php $data = json_decode(file_get_contents(__DIR__ . '/../data/air.json'), true); $lines = []; function getLabel(int $index): string { if($index <= 50) { return 'good'; } elseif($index <= 100) { return 'moderate'; } elseif ($index <= 150) { return 'unhealthy for sensitive'; }...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
php-ai/php-ml-examples
https://github.com/php-ai/php-ml-examples/blob/2432a8573ed87c63c0d6284aacbd89688d50de8b/preparation/crimes.php
preparation/crimes.php
<?php $handle = fopen(__DIR__.'/../data/crimes.csv', 'r'); $header = fgetcsv($handle); $lines = []; $index = 0; $filter = ['ROBBERY']; while (($row = fgetcsv($handle)) !== false) { if(!in_array($row[6], $filter)) { continue; } if(!is_numeric($row[20]) || !is_numeric($row[21])) { continue;...
php
MIT
2432a8573ed87c63c0d6284aacbd89688d50de8b
2026-01-05T02:09:05.760240Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/.php-cs-fixer.dist.php
.php-cs-fixer.dist.php
<?php $finder = Symfony\Component\Finder\Finder::create() ->name('*.php') ->notName('*.blade.php') ->ignoreDotFiles(true) ->ignoreVCS(true) ->in([ __DIR__ . '/src', __DIR__ . '/tests', ]); $config = new PhpCsFixer\Config(); return $config->setRules([ '@PSR12' => true, ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ContainerResolver.php
src/yoyo/ContainerResolver.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Containers\IlluminateContainer; use Clickfwd\Yoyo\Containers\YoyoContainer; use Clickfwd\Yoyo\Interfaces\YoyoContainerInterface; use Illuminate\Container\Container; class ContainerResolver { protected static $preferred = null; public static function setPrefer...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ClassHelpers.php
src/yoyo/ClassHelpers.php
<?php namespace Clickfwd\Yoyo; use ReflectionClass; use ReflectionMethod; class ClassHelpers { public static function getDefaultPublicVars($instance, $baseClass = null) { $class = new ReflectionClass(get_class($instance)); $names = self::getPublicProperties($instance, $baseClass); $...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/QueryString.php
src/yoyo/QueryString.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Services\Request; class QueryString { private $defaults; private $new; private $keys; private $currentUrl; public function __construct($defaults, $new, $keys) { $this->defaults = $defaults; $this->new = $new; $this...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Request.php
src/yoyo/Request.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Interfaces\RequestInterface; class Request implements RequestInterface { private $request; private $server; private $dropped = []; public function __construct() { $this->request = $_REQUEST; $this->server = $_SERVER; } ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/YoyoCompiler.php
src/yoyo/YoyoCompiler.php
<?php namespace Clickfwd\Yoyo; use DOMDocument; use DOMXPath; class YoyoCompiler { protected $componentType; protected $componentId; protected $name; protected $variables; protected $attributes; protected $spinning; protected $listeners; protected $props; protected $withHi...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/YoyoPhalconController.php
src/yoyo/YoyoPhalconController.php
<?php namespace Clickfwd\Yoyo; use Phalcon\Mvc\Controller; class YoyoPhalconController extends Controller { public function handleAction() { $this->view->disable(); /** @var Yoyo $yoyo */ $yoyo = $this->di->get('yoyo'); $yoyoRequest = new Request(); $yoyoRequest->mock(...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/helpers.php
src/yoyo/helpers.php
<?php namespace Yoyo; use Clickfwd\Yoyo\Services\Configuration; use Clickfwd\Yoyo\Yoyo; if (! function_exists('Yoyo\yoyo_render')) { function yoyo_render($name, $variables = [], $attributes = []): string { $yoyo = Yoyo::getInstance(); return $yoyo->mount($name, $variables, $attributes)->rend...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/InvocableComponentVariable.php
src/yoyo/InvocableComponentVariable.php
<?php namespace Clickfwd\Yoyo; use Closure; class InvocableComponentVariable { protected $callable; public function __construct(Closure $callable) { $this->callable = $callable; } public function __get($key) { return $this->__invoke()->{$key}; } public function __ca...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/AnonymousComponent.php
src/yoyo/AnonymousComponent.php
<?php namespace Clickfwd\Yoyo; class AnonymousComponent extends Component { public function render() { $data = array_merge($this->variables, $this->request->all()); return $this->view($this->componentName, $data); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ComponentResolver.php
src/yoyo/ComponentResolver.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Interfaces\ViewProviderInterface; use Clickfwd\Yoyo\Interfaces\YoyoContainerInterface; use Psr\Container\ContainerExceptionInterface; class ComponentResolver { protected $name = 'default'; protected $variables; protected $registered; protected $hint...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Yoyo.php
src/yoyo/Yoyo.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Exceptions\BypassRenderMethod; use Clickfwd\Yoyo\Exceptions\HttpException; use Clickfwd\Yoyo\Exceptions\NotFoundHttpException; use Clickfwd\Yoyo\Interfaces\RequestInterface; use Clickfwd\Yoyo\Interfaces\YoyoContainerInterface; use Clickfwd\Yoyo\Services\BrowserEventsSe...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/YoyoHelpers.php
src/yoyo/YoyoHelpers.php
<?php namespace Clickfwd\Yoyo; class YoyoHelpers { public static function encode_vals(array $vars): string { $adjusted = []; foreach ($vars as $key => $val) { $newKey = is_array($val) ? $key.'[]' : $key; $adjusted[$newKey] = $val; } return json_encode($...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ComponentManager.php
src/yoyo/ComponentManager.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Exceptions\ComponentMethodNotFound; use Clickfwd\Yoyo\Exceptions\ComponentNotFound; use Clickfwd\Yoyo\Exceptions\NonPublicComponentMethodCall; class ComponentManager { private $id; private $name; private $request; private $component; private $r...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/View.php
src/yoyo/View.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Interfaces\ViewProviderInterface; use InvalidArgumentException; class View { protected $paths; protected $views; protected $yoyoComponent; protected static $hints; public function __construct($paths) { $paths = (array) $paths; ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/YoyoPhalconServiceProvider.php
src/yoyo/YoyoPhalconServiceProvider.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\ViewProviders\PhalconViewProvider; use Phalcon\Di\DiInterface; use Phalcon\Di\ServiceProviderInterface; use Phalcon\Mvc\View\Simple as SimpleView; class YoyoPhalconServiceProvider implements ServiceProviderInterface { private $yoyoConfig = []; private $viewEx...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Component.php
src/yoyo/Component.php
<?php namespace Clickfwd\Yoyo; use Clickfwd\Yoyo\Concerns\BrowserEvents; use Clickfwd\Yoyo\Concerns\Redirector; use Clickfwd\Yoyo\Exceptions\BypassRenderMethod; use Clickfwd\Yoyo\Exceptions\ComponentMethodNotFound; use Clickfwd\Yoyo\Exceptions\MissingComponentTemplate; use Clickfwd\Yoyo\Interfaces\ViewProviderInterfa...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/NonPublicComponentMethodCall.php
src/yoyo/Exceptions/NonPublicComponentMethodCall.php
<?php namespace Clickfwd\Yoyo\Exceptions; class NonPublicComponentMethodCall extends \Exception { public function __construct($componentName, $method) { parent::__construct("Unable to call non-public method [$method] in Yoyo component [$componentName]."); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/ComponentNotFound.php
src/yoyo/Exceptions/ComponentNotFound.php
<?php namespace Clickfwd\Yoyo\Exceptions; class ComponentNotFound extends \Exception { public function __construct($alias) { parent::__construct("Yoyo component with alias [$alias] not found."); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/ComponentMethodNotFound.php
src/yoyo/Exceptions/ComponentMethodNotFound.php
<?php namespace Clickfwd\Yoyo\Exceptions; class ComponentMethodNotFound extends \Exception { public function __construct($component, $method) { parent::__construct( "Public method [{$method}] not found on Yoyo component [{$component}]" ); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/IncompleteComponentParamInRequest.php
src/yoyo/Exceptions/IncompleteComponentParamInRequest.php
<?php namespace Clickfwd\Yoyo\Exceptions; class IncompleteComponentParamInRequest extends \Exception { public function __construct() { parent::__construct('The component parameter is missing the component name or action.'); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/FailedToRegisterComponent.php
src/yoyo/Exceptions/FailedToRegisterComponent.php
<?php namespace Clickfwd\Yoyo\Exceptions; class FailedToRegisterComponent extends \Exception { public function __construct($alias, $componentClassName) { $message = 'Component registration failed.'; if ($componentClassName == 'Anonymous') { $message = PHP_EOL."[$alias] template no...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/ContainerResolutionException.php
src/yoyo/Exceptions/ContainerResolutionException.php
<?php namespace Clickfwd\Yoyo\Exceptions; use Psr\Container\ContainerExceptionInterface; class ContainerResolutionException extends \Exception implements ContainerExceptionInterface { public function __construct(string $message, ?\Throwable $previous = null) { parent::__construct($message, 0, $previo...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/HttpException.php
src/yoyo/Exceptions/HttpException.php
<?php namespace Clickfwd\Yoyo\Exceptions; class HttpException extends \Exception { protected $statusCode; protected $headers; public function __construct(int $statusCode, ?string $message = '', array $headers = []) { $this->statusCode = $statusCode; $this->headers = $headers; ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/NotFoundHttpException.php
src/yoyo/Exceptions/NotFoundHttpException.php
<?php namespace Clickfwd\Yoyo\Exceptions; class NotFoundHttpException extends HttpException { public function __construct(?string $message = '', array $headers = []) { parent::__construct(404, $message, $headers); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/BypassRenderMethod.php
src/yoyo/Exceptions/BypassRenderMethod.php
<?php namespace Clickfwd\Yoyo\Exceptions; class BypassRenderMethod extends \Exception { public function __construct($statusCode) { parent::__construct('', $statusCode); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/BindingNotFoundException.php
src/yoyo/Exceptions/BindingNotFoundException.php
<?php namespace Clickfwd\Yoyo\Exceptions; use Psr\Container\NotFoundExceptionInterface; class BindingNotFoundException extends \Exception implements NotFoundExceptionInterface { public function __construct(string $message, ?\Throwable $previous = null) { parent::__construct($message, 0, $previous); ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Exceptions/MissingComponentTemplate.php
src/yoyo/Exceptions/MissingComponentTemplate.php
<?php namespace Clickfwd\Yoyo\Exceptions; class MissingComponentTemplate extends \Exception { public function __construct($template, $componentName) { parent::__construct("Unable to find template [$template] for [$componentName] component."); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Blade/CreateBladeViewFromString.php
src/yoyo/Blade/CreateBladeViewFromString.php
<?php namespace Clickfwd\Yoyo\Blade; use Illuminate\View\Component; class CreateBladeViewFromString extends Component { public function __invoke($view, $contents) { return $this->createBladeViewFromString($view, $contents); } public function render() { // } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Blade/Application.php
src/yoyo/Blade/Application.php
<?php namespace Clickfwd\Yoyo\Blade; use Illuminate\Container\Container; class Application extends Container { public function getNamespace() { return ''; } // public function runningInConsole() // { // return false; // } // public function basePath($path) // { /...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Blade/YoyoServiceProvider.php
src/yoyo/Blade/YoyoServiceProvider.php
<?php namespace Clickfwd\Yoyo\Blade; use Illuminate\Support\ServiceProvider; class YoyoServiceProvider extends ServiceProvider { public function boot() { $this->registerBladeDirectives(); $this->registerViewCompilerEngine(); } protected function registerViewCompilerEngine() { ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Blade/YoyoBladeDirectives.php
src/yoyo/Blade/YoyoBladeDirectives.php
<?php namespace Clickfwd\Yoyo\Blade; class YoyoBladeDirectives { public function __construct($blade) { $blade->directive('yoyo', [$this, 'yoyo']); $blade->directive('yoyo_scripts', [$this, 'yoyo_scripts']); $blade->directive('spinning', [$this, 'spinning']); $blade->directiv...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Blade/YoyoBladeCompilerEngine.php
src/yoyo/Blade/YoyoBladeCompilerEngine.php
<?php namespace Clickfwd\Yoyo\Blade; use Illuminate\View\Engines\CompilerEngine as LaravelCompilerEngine; class YoyoBladeCompilerEngine extends LaravelCompilerEngine { protected $yoyoComponent; protected $isRenderingYoyoComponent; public function startYoyoRendering($component) { $this->yoyo...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Blade/yoyo-view.blade.php
src/yoyo/Blade/yoyo-view.blade.php
@yoyo($name, $variables, $attributes, $action)
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Interfaces/YoyoContainerInterface.php
src/yoyo/Interfaces/YoyoContainerInterface.php
<?php namespace Clickfwd\Yoyo\Interfaces; use Closure; use Psr\Container\ContainerInterface; interface YoyoContainerInterface extends ContainerInterface { /** * Binds value to the container for later resolution * * @param string $id * @param Closure|object|string $value * @return void ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Interfaces/RequestInterface.php
src/yoyo/Interfaces/RequestInterface.php
<?php namespace Clickfwd\Yoyo\Interfaces; interface RequestInterface { public function all(); public function except($keys); public function get($key, $default = null); public function drop($key); public function method(); public function fullUrl(); public function isYoyoRequest(); ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Interfaces/ViewProviderInterface.php
src/yoyo/Interfaces/ViewProviderInterface.php
<?php namespace Clickfwd\Yoyo\Interfaces; interface ViewProviderInterface { public const HINT_PATH_DELIMITER = '::'; public function __construct($view); public function render($template, $vars = []): self; public function makeFromString($content, $vars = []): string; public function exists($te...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Twig/YoyoTwigExtension.php
src/yoyo/Twig/YoyoTwigExtension.php
<?php namespace Clickfwd\Yoyo\Twig; use Clickfwd\Yoyo\Services\BrowserEventsService; use Twig\Extension\AbstractExtension; use Twig\Extension\GlobalsInterface; use Twig\Markup; use Twig\TwigFunction; use function Yoyo\yoyo_render; use function Yoyo\yoyo_scripts; class YoyoTwigExtension extends AbstractExtension imp...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ViewProviders/BladeViewProvider.php
src/yoyo/ViewProviders/BladeViewProvider.php
<?php namespace Clickfwd\Yoyo\ViewProviders; use Clickfwd\Yoyo\Interfaces\ViewProviderInterface; class BladeViewProvider extends BaseViewProvider implements ViewProviderInterface { protected $view; protected $template; protected $vars; protected $engine; public function __construct($view) ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ViewProviders/YoyoViewProvider.php
src/yoyo/ViewProviders/YoyoViewProvider.php
<?php namespace Clickfwd\Yoyo\ViewProviders; use Clickfwd\Yoyo\Exceptions\ComponentNotFound; use Clickfwd\Yoyo\Interfaces\ViewProviderInterface; use InvalidArgumentException; class YoyoViewProvider extends BaseViewProvider implements ViewProviderInterface { protected $view; protected $name; protected $...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ViewProviders/PhalconViewProvider.php
src/yoyo/ViewProviders/PhalconViewProvider.php
<?php namespace Clickfwd\Yoyo\ViewProviders; use Clickfwd\Yoyo\Interfaces\ViewProviderInterface; class PhalconViewProvider extends BaseViewProvider implements ViewProviderInterface { protected $view; protected $template; protected $vars; private $viewExtention = '.phtml'; public function __co...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ViewProviders/BaseViewProvider.php
src/yoyo/ViewProviders/BaseViewProvider.php
<?php namespace Clickfwd\Yoyo\ViewProviders; abstract class BaseViewProvider { protected $view; public function getProviderInstance() { return $this->view; } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/ViewProviders/TwigViewProvider.php
src/yoyo/ViewProviders/TwigViewProvider.php
<?php namespace Clickfwd\Yoyo\ViewProviders; use Clickfwd\Yoyo\Interfaces\ViewProviderInterface; class TwigViewProvider extends BaseViewProvider implements ViewProviderInterface { protected $view; protected $template; protected $vars; protected $yoyoComponent; public static $twig_template_ext...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Services/Response.php
src/yoyo/Services/Response.php
<?php namespace Clickfwd\Yoyo\Services; use Clickfwd\Yoyo\Concerns; class Response { use Concerns\Singleton; use Concerns\ResponseHeaders; protected $headers = []; protected $statusCode = 200; public function __construct() { } public function header($name, $value) { $t...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Services/BrowserEventsService.php
src/yoyo/Services/BrowserEventsService.php
<?php namespace Clickfwd\Yoyo\Services; use Clickfwd\Yoyo\Concerns\Singleton; use Clickfwd\Yoyo\Yoyo; class BrowserEventsService { use Singleton; private $request; private $response; private $eventQueue = []; private $browserEventQueue = []; public function __construct() { $t...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Services/PageRedirectService.php
src/yoyo/Services/PageRedirectService.php
<?php namespace Clickfwd\Yoyo\Services; use Clickfwd\Yoyo\Concerns\Singleton; class PageRedirectService { use Singleton; private $response; public function __construct() { $this->response = Response::getInstance(); } public function redirect($url) { if ($url) { ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Services/Configuration.php
src/yoyo/Services/Configuration.php
<?php namespace Clickfwd\Yoyo\Services; use Clickfwd\Yoyo\Concerns\Singleton; class Configuration { use Singleton; private static $options; public static $htmx = '1.9.4'; protected static $allowedConfigOptions = [ 'historyEnabled', 'historyCacheSize', 'refreshOnHistoryMiss'...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Services/UrlStateManagerService.php
src/yoyo/Services/UrlStateManagerService.php
<?php namespace Clickfwd\Yoyo\Services; use Clickfwd\Yoyo\Yoyo; class UrlStateManagerService { private $request; private $currentUrl; public function __construct() { $this->request = Yoyo::request(); $this->currentUrl = $this->request->fullUrl(); } public function pushStat...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Containers/YoyoContainer.php
src/yoyo/Containers/YoyoContainer.php
<?php namespace Clickfwd\Yoyo\Containers; use Clickfwd\Yoyo\Exceptions\BindingNotFoundException; use Clickfwd\Yoyo\Exceptions\ContainerResolutionException; use Clickfwd\Yoyo\Interfaces\YoyoContainerInterface; class YoyoContainer implements YoyoContainerInterface { protected static $instance; protected $bind...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Containers/IlluminateContainer.php
src/yoyo/Containers/IlluminateContainer.php
<?php namespace Clickfwd\Yoyo\Containers; use Clickfwd\Yoyo\Interfaces\YoyoContainerInterface; use Closure; use Illuminate\Container\Container; class IlluminateContainer implements YoyoContainerInterface { protected static $instance; protected $container; public static function getInstance() { ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Concerns/Redirector.php
src/yoyo/Concerns/Redirector.php
<?php namespace Clickfwd\Yoyo\Concerns; trait Redirector { public $redirectTo; public function redirect($url) { $this->redirectTo = $url; return $this; } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Concerns/BrowserEvents.php
src/yoyo/Concerns/BrowserEvents.php
<?php namespace Clickfwd\Yoyo\Concerns; use Clickfwd\Yoyo\Services\BrowserEventsService; trait BrowserEvents { public function emit($event, ...$params) { (BrowserEventsService::getInstance())->emit($event, $params); } public function emitTo($target, $event, ...$params) { (Browser...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Concerns/Singleton.php
src/yoyo/Concerns/Singleton.php
<?php namespace Clickfwd\Yoyo\Concerns; trait Singleton { /** * @var reference to singleton instance */ private static $instance; /** * Creates a new instance of a singleton class (via late static binding), * accepting a variable-length argument list. * * @return self *...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/src/yoyo/Concerns/ResponseHeaders.php
src/yoyo/Concerns/ResponseHeaders.php
<?php namespace Clickfwd\Yoyo\Concerns; trait ResponseHeaders { public function location($path) { $this->header('HX-Location', $path); return $this; } public function pushUrl($url) { $this->header('HX-Push-Url', $url); return $this; } public function red...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/InitYoyoContainer.php
tests/InitYoyoContainer.php
<?php use Clickfwd\Yoyo\ContainerResolver; use Clickfwd\Yoyo\Containers\YoyoContainer; use Clickfwd\Yoyo\Yoyo; ContainerResolver::setPreferred(YoyoContainer::getInstance()); $yoyo = new Yoyo(YoyoContainer::getInstance()); $yoyo->configure([ 'namespace' => 'Tests\\App\\Yoyo\\', ]);
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/Pest.php
tests/Pest.php
<?php use Clickfwd\Yoyo\Yoyo; $yoyo = new Yoyo(); $yoyo->configure([ 'namespace' => 'Tests\\App\\Yoyo\\', ]);
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/HelpersBlade.php
tests/HelpersBlade.php
<?php namespace Tests; use Clickfwd\Yoyo\Blade\Application; use Clickfwd\Yoyo\Blade\YoyoServiceProvider; use Clickfwd\Yoyo\ViewProviders\BladeViewProvider; use Illuminate\Container\Container; use Illuminate\Contracts\Foundation\Application as ApplicationContract; use Illuminate\Contracts\View\Factory as ViewFactory; ...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/Helpers.php
tests/Helpers.php
<?php namespace Tests; use Clickfwd\Yoyo\Services\Response; use Clickfwd\Yoyo\View; use Clickfwd\Yoyo\ViewProviders\YoyoViewProvider; use Clickfwd\Yoyo\Yoyo; use Clickfwd\Yoyo\YoyoCompiler; use Clickfwd\Yoyo\YoyoHelpers; require_once __DIR__.'/HelpersBlade.php'; require_once __DIR__.'/HelpersTwig.php'; function yoy...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/HelpersTwig.php
tests/HelpersTwig.php
<?php namespace Tests; use Clickfwd\Yoyo\Twig\YoyoTwigExtension; use Clickfwd\Yoyo\ViewProviders\TwigViewProvider; function yoyo_twig() { $yoyo = yoyo_instance(); $yoyo->registerViewProvider(function () { return new TwigViewProvider(twig()); }); } function twig() { $loader = new \Twig\Loade...
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/app/Comment.php
tests/app/Comment.php
<?php namespace Tests\App; class Comment { public function title() { return 'the comment title'; } public function body() { return 'the comment body'; } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false
clickfwd/yoyo
https://github.com/clickfwd/yoyo/blob/1989402c0c6219110ac7150f733a9b02dd972a90/tests/app/Post.php
tests/app/Post.php
<?php namespace Tests\App; class Post { protected $comment; public function __construct(Comment $comment) { $this->comment = $comment; } public function title() { return $this->comment->title(); } }
php
MIT
1989402c0c6219110ac7150f733a9b02dd972a90
2026-01-05T02:09:17.924721Z
false