blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
a7d065d6da6513b723161a1d11cd38cce68d1f1d | PHP | aherne/php-security-api | /src/Authentication/DAO/UserAuthenticationDAO.php | UTF-8 | 706 | 3.03125 | 3 | [] | no_license | <?php
namespace Lucinda\WebSecurity\Authentication\DAO;
/**
* Defines blueprints for a DAO that forwards user-password authentication to database.
*/
interface UserAuthenticationDAO
{
/**
* Performs a login operation in DB
*
* @param string $username Value of user name
* @param string $pas... | true |
ba6cb74d0fd918b37d078a483e5da2dd096c9bfa | PHP | kamdjouduplex/ERP | /app/UserDatabase.php | UTF-8 | 527 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
/**
* @SWG\Definition(type="object", @SWG\Xml(name="UserDatabase"))
*/
use Illuminate\Database\Eloquent\Model;
class UserDatabase extends Model
{
protected $fillable = [
'database',
'username',
'password',
'user_id'
];
public function user()
{
... | true |
e9bc0421b10c58c32073e14815732cb85fe13acd | PHP | stijnblommerde/yahoo_finance | /public/sell.php | UTF-8 | 1,809 | 2.84375 | 3 | [] | no_license | <?php
// access sell only when logged in
// sell contains simple form with drop down menu containing symbols of positions
// and sell button
// configuration
require("../includes/config.php");
// if user wants to sell a position
if (empty($_POST)) {
//access portfolio
... | true |
7ffa03ffb5be60ca59bd038e870cd31a1b16d5e2 | PHP | cliffom/tokenex-php | /src/Environment.php | UTF-8 | 1,822 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cliffom\Tokenex;
use GuzzleHttp\Client;
class Environment
{
protected $api_base_url;
protected $id;
protected $api_key;
public $error;
public $reference_number;
public function __construct($api_base_url = '', $id = '', $api_key = '')
{
$this->api_base_url = $api_... | true |
977965f25a8a0450b12b0232f5a2a3c8252925ed | PHP | acire-lb/PHP---Introduction-App | /Controller/BasicController.php | UTF-8 | 1,223 | 2.65625 | 3 | [] | no_license | <?php
require_once "Model/BasicModel.php";
require_once("Model/NavigationModel.php");
class BasicController
{
public $navigationModel;
private $title = "Learn how to Knitt";
public $basicModel;
function __construct(){
$this->basicModel= new BasicModel($this);
... | true |
1c0e9c4df4d17b02908eda5f202fa28153fa9364 | PHP | devraisdeveloper/my-blog | /migrations/m170619_182540_create_Post_table.php | UTF-8 | 1,027 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `Post`.
*/
class m170619_182540_create_Post_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('Post', [
'id' => $this->primaryKey(),
'user_id' => $this->intege... | true |
48ac971e38c04eac88bc16f70aecc7b194795c15 | PHP | thereference/drupal-security-audit | /coder_sniffer/Security/Sniffs/BadFunctions/BackticksSniff.php | UTF-8 | 1,239 | 2.734375 | 3 | [] | no_license | <?php
class BackticksSniff implements PHP_CodeSniffer_Sniff {
/**
* Returns the token types that this sniff is interested in.
*
* @return array(int)
*/
public function register() {
return array(T_BACKTICK);
}
/**
* Processes the tokens that this sniff is interested in.
*
* @param PHP_CodeSniffer_File $p... | true |
5bf0558a2c401349bd4b70d2aaae4f415cbd2839 | PHP | andy-keen-eye/task_book | /includes/helpers.php | UTF-8 | 1,228 | 2.78125 | 3 | [] | no_license | <?php
//render views
function render($view, $values)
{
extract ($values);
require('../views/header.php');
require($view);
require('../views/footer.php');
}
//set sort order and sort direction for table
function set_sort_table($sort_by, $direction)
{
session_start();
$_SESSION["sort_by"] = $sor... | true |
d4df98e323017786aeb153b5dab16082b2966ebe | PHP | gekif/CompletePHPMySQLCourse | /basicphp/insidejob.php | UTF-8 | 511 | 3.296875 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Inside Job | Pointers</title>
</head>
<body... | true |
3aa9e8b8807181399359e9f70bb1a6fbe15c1f03 | PHP | eaverm/module-cwatch | /cwatch.php | UTF-8 | 27,520 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* cWatch Module.
*
* @package blesta
* @subpackage blesta.components.modules.cwatch
* @copyright Copyright (c) 2018, Phillips Data, Inc.
* @license http://blesta.com/license/ The Blesta License Agreement
* @link http://blesta.com/ Blesta
*/
class cwatch extends Module
{
/**
* Initialize th... | true |
e0deb04fa0f872a8c58ca0f0e6ee2804669beaab | PHP | shahlakshya1988/phppos | /phpbasics/example25.php | UTF-8 | 690 | 3.03125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PHP Cookie</title>
</head>
<body>
<?php
// checking if our cookie exists or not
print_r($_COOKIE)... | true |
7efc1b4ed2051c4a1f52df19b51bb71b307067e1 | PHP | slince/fastserver | /src/Socket/TcpServer.php | UTF-8 | 2,837 | 2.8125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*
* This file is part of the fastserver/fastserver package.
*
* (c) Slince <taosikai@yeah.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FastServer\Socket;
use React\EventLoop\Loo... | true |
084a01dcfac42d1fa719bd982e0ff9fb4f50f539 | PHP | zackads/developme-laravel | /tests/Unit/CrackerTest.php | UTF-8 | 2,774 | 3.125 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use App\Cracker;
use PHPUnit\Framework\TestCase;
// Given an alphabet decryption key like the one below, create a program that can crack any message using the decryption key.
// Alphabet:
// a b c d e f g h i j k l m n o p q r s t u v w x y z
// Decryption Key:
// ! ) # ( . * % & > < ... | true |
3e1c939841c9835a5f26e6eccf78e301e65b9bfe | PHP | tagninrnguyen/shop | /app/Http/Controllers/Backend/Auth/ChangePasswordController.php | UTF-8 | 993 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Backend\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Hash;
class ChangePasswordController extends Controller
{
public function showChangePasswordForm()
{
return view('backend.auth.change_password'... | true |
a3b39e4c6683ea1b1befa625834161a82d3f2fa1 | PHP | erviker/p3musikk | /getsong.php | UTF-8 | 2,598 | 2.609375 | 3 | [] | no_license | <?php
include("db.php");
include("func.php");
$data = getdata();
$data[0] = $conn->real_escape_string($data[0]);
$data[1] = $conn->real_escape_string($data[1]);
if($data[0] != NULL) {
$sql = "SELECT id, Artist FROM Artist WHERE Artist = '{$data[0]}' ";
$result = $conn->query($sql);
if ($result->num_row... | true |
71a8bef8a7a54fc5aed3dcef85d6bb63c8fcc875 | PHP | halim880/news_api_backend | /app/Http/Requests/PostRequest.php | UTF-8 | 1,243 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Models\Post;
use App\Models\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class PostRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public ... | true |
3afa29d9ffad81296b3fb12d8625bfb078c31eb8 | PHP | ProgramistaZpolski/pzplUI | /docs/app/migrations/createTable.php | UTF-8 | 384 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Migrations;
use App\Core\Helpers\Storage;
class CreateTableMigration
{
/**
* Run the migration.
* @return String A sql query
*/
public function up()
{
return Storage::get("createTable.sql");
}
/**
* Reverse the migration.
* @return String A sql query
*/
pu... | true |
2b5a24ac9a02bdea375db73d58cd23c20011d85a | PHP | carlanlinux/DWES | /DWES03_TutoriaSesionesCookies/20_SESIONES_03/index.php | UTF-8 | 1,554 | 3.1875 | 3 | [] | no_license | <?php
/*
* Ejemplo muy parecido al anterior, pero solucionando el problema que
* tenía.
*
* Inicia / crea la sesión.
* comprueba si ha pulsado el botón del formulario (existir ha de existir porque si no no habría redirigido a esta página)
* Si lo ha pulsado, guarda en una variable de sesión el nombre... | true |
4cc31c1fe750c199030a3fc3ab37c18d20a311a9 | PHP | dannie1310/sca.grupohi.mx | /inc/php/dao/DAOArchivoRuta.php | UTF-8 | 1,901 | 2.515625 | 3 | [] | no_license | <?php session_start();
class DAOArchivoRuta
{
var $SCA;
var $SQL_REGISTRA = "sp_registra_archivo_ruta(%d,'%s','%s','%s','%s',@kind,@message)";
var $RUTA = "../../SourcesFiles/archivos_rutas/";
public function DAOArchivoRuta()
{
$this->SCA = SCA::getConexion();
}
pub... | true |
3cfbb905b51765130154d5c6ffa5eb1fec9cfcee | PHP | mangomessenger/core | /app/Services/Chat/ChatService.php | UTF-8 | 1,615 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Services\Chat;
use App\Chat;
use App\Services\ModelService;
use Illuminate\Database\Eloquent\Collection;
class ChatService extends ModelService
{
/**
* Chat instance
*
* @var Chat
*/
protected Chat $model;
/**
* MessageService constructor.
*
* @par... | true |
b1f394c40e05ee4340eeb9e9b8a1b89048f63de2 | PHP | jimhan1992/tranhan1 | /tranhan1/modul2/test/App_QLNS/Employee.php | UTF-8 | 1,189 | 3.671875 | 4 | [] | no_license | <?php
class Employee
{
protected string $name;
protected string $birthDay;
protected string $address;
protected string $position;
public function __construct( $name, $birthDay, $address, $position)
{
$this->name = $name;
$this->birthDay = $birthDay;
$this... | true |
c9570402188bf625557e4c8bc71d073a2c9579ed | PHP | ranvis/robots-txt-processor | /src/Parser.php | UTF-8 | 4,802 | 2.75 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* @author SATO Kentaro
* @license BSD 2-Clause License
*/
namespace Ranvis\RobotsTxt;
class Parser
{
protected $options;
protected $groupedDirectives = ['(?:Dis)?Allow|Crawl-delay|-ignored-'];
protected $groupMemberRegEx;
const TYPE_USER_AGENT = 1;
const TYPE_GROUP = 2;
const TYP... | true |
7cbbbb827094fdd30a60102d9bf76fc617f657f4 | PHP | alexvtua/laravel_test | /app/Http/Controllers/Api/BookController.php | UTF-8 | 1,535 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use App\Book;
use App\Http\Controllers\Controller;
use App\Http\Resources\BookResource;
use App\Http\Resources\BooksResource;
use Illuminate\Http\Request;
class BookController extends Controller
{
/**
* @var array
*/
private $sortable = [
'title',
... | true |
86c255f913ac7183593cf8e3452c1270b57b36a9 | PHP | jibinam/budabot2 | /core/TimerEvent.php | UTF-8 | 847 | 3.265625 | 3 | [] | no_license | <?php
class TimerEvent {
public $time = 0;
private $delay = 0;
private $callback = null;
private $args = array();
private $timer = null;
public function __construct($timer, $delay, $callback, $args) {
$this->delay = $delay;
$this->timer = $timer;
$this->callback = $callback;
$this->args = $args;
$this... | true |
f9b09933b9e5f1782077a463feef36db7556cb91 | PHP | Styx117/PHP-CMS | /EditUser.php | UTF-8 | 6,078 | 2.609375 | 3 | [] | no_license | <?php
//Establish connections with database, error logger and global session variables
session_start();
require("db.php");
require('errorLog.php');
//If a user isn't logged in, redirect the current user to the login page
if ($_SESSION['username'] == null )
{
header('Location: Login.php');
}
//if the user isn't an a... | true |
cc76374c2c72af5a260ec6c76114d3ab3ee908fa | PHP | daniel-qwerty/villegas-aldazosa | /Com/Database/Connection.php | UTF-8 | 4,238 | 2.96875 | 3 | [] | no_license | <?php
class Com_Database_Connection extends Com_Object
{
/**
* Mysql database server ip or name
* @access private
* @var String
*/
private $server = DATABASE_SERVER;
/**
* Mysql connection port
* @access private
* @var Integer
*/
private $port = DATABASE_PORT;
... | true |
9e6cb12b0c8bb3eb79ea2b4278571a826c6d2200 | PHP | HTTP-402/codeforgood | /site/create_user.php | UTF-8 | 692 | 2.703125 | 3 | [] | no_license | <?php
include('password_hash.php');
try {
// a new MongoDB connection
$conn = new Mongo('localhost');
// connect to test database
$db = $conn->users;
// a new products collection object
$collection = $db->login;
$pass = password_hash("wonderadmin", PA... | true |
81ff4929ed88ccaf1bdcd3c7ec91eb78fc1400d0 | PHP | JeradC95/Love-Sushi | /model/data-layer.php | UTF-8 | 767 | 2.8125 | 3 | [] | no_license | <?php
/**
* Class DataLayerSushi returns data for my app
*/
class DataLayerSushi
{
/** getRolls() returns an array of rolls
* @return array
*/
function getRolls()
{
return array("dragon roll", "california roll", "spicy tuna roll", "crab tempura",
"s... | true |
4d7d7c7fe5067e0a90040eebfd338fff6ff6680e | PHP | Bcdo/project | /vendor/craftcms/cms/src/web/twig/variables/Fields.php | UTF-8 | 5,408 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\web\twig\variables;
use Craft;
use craft\base\FieldInterface;
use craft\helpers\ArrayHelper;
use craft\models\FieldGroup;
use craft\models\FieldLayout;
/**
* F... | true |
a0a14576c9704bbc5c03c958454034aaf1eb4a76 | PHP | ribacq/cdm | /src/www/classes/ErrorController.class.php | UTF-8 | 354 | 2.75 | 3 | [] | no_license | <?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
class ErrorController {
public static function errorAction(string $error) {
return function (Request $request, Response $response) use ($error) {
$response->getBody()->write('Error: '.$error.'<br>'... | true |
f582c30eff6f9a106f085ae6e6d01e95c46c8512 | PHP | analistadeperon/tariff-calculation | /src/Seller/Adapters/Presenters/Register.php | UTF-8 | 668 | 2.765625 | 3 | [] | no_license | <?php
namespace SRC\Seller\Adapters\Presenters;
use SRC\Seller\Domain\Register\Presenter;
use SRC\Seller\Domain\RegisteredSeller;
class Register implements Presenter
{
public function __construct(private RegisterVM $registerVM)
{}
public function addData(RegisteredSeller $registeredSeller): void
{
... | true |
b21306c7ee8f14867158feccb47cd31daddad5ef | PHP | lukmanism/newsletter | /ajax/filemanager.php | UTF-8 | 10,465 | 2.625 | 3 | [] | no_license | <?php
/**
* Copyright (C) 2005, 2006, 2007, 2008 Brice Burgess <bhb@iceburg.net>
*
* This file is part of poMMo (http://www.pommo.org)
*
* poMMo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; eith... | true |
cc03e7da25296d034baa243895206e9e673c684f | PHP | yohangdev/content | /src/tests/Unit/Models/LanguageTest.php | UTF-8 | 2,036 | 2.6875 | 3 | [] | no_license | <?php
namespace WebAppId\Content\Tests\Unit\Models;
use WebAppId\Content\Models\Language;
use WebAppId\Content\Tests\TestCase;
class LanguageTest extends TestCase
{
private $language;
private $objLanguage;
public function start()
{
$this->language = new Language;
$this->objLanguage ... | true |
a75464d8cefb6a626d6cbe8e43d3ad4b76c3e59c | PHP | kiipoyon/mysite | /HEW/reset_change_idpas2.php | UTF-8 | 2,999 | 2.625 | 3 | [] | no_license | <?php
require 'common/common.php';
// データベースに接続する
$pdo = connect();
// ハッシュ化ファイル
require "password.php";
$flg=0;
$errorMessage = "";
$newpas1 = $_SESSION['newpas1'];
$mail = $_SESSION['mail'];
try {
// 接続完了
$pdo = connect();
}catch (PDOException $e) {
$errorMessage = 'データベース... | true |
373c769a83c5f762370124faa45578d578bf5f60 | PHP | ragonzalezm19/allways-on-prueba | /Conexion/leer.php | UTF-8 | 3,476 | 2.796875 | 3 | [] | no_license | <?php
/*
Ejemplo de una funcion leer
function leer($arg1, $arg2) {
$pdo = Database::connect();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT a.campo_1, a.campo_2, b.campo_1
FROM tabla_a AS a
INNER JOIN tabla_b b ON b.id = a.b_id
WHERE a.campo_1 = '... | true |
fbc493f3e950e30c9febb370ad1a79bbea4f4d8e | PHP | slonolet/ext-security-advisor | /src/plib/library/Template.php | UTF-8 | 652 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | <?php
// class for using HTML templates with PHP variable substitution
class Modules_SecurityAdvisor_Template
{
protected $_file;
protected $_keystore = array();
public function __construct($file = null)
{
$this->_file = $file;
}
// set key/value pair in keystore
public function s... | true |
7b7c1fea40cf116d068dd6c8e1d4e7a893a07e7e | PHP | zaknesler/demo-laravel-stripe | /app/Order.php | UTF-8 | 1,354 | 2.71875 | 3 | [] | no_license | <?php
namespace App;
use App\{ Order, OrderProduct };
use Illuminate\Database\Eloquent\Model;
class Order extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id',
'charge_id',
'charge_amount',
'card... | true |
4f71c0812f2ab0cede1a63bccb3f5993e8292229 | PHP | TomSchrier/Codecademy-Projects | /The-Hitchhikers-Guide-to-PHP-Math-Functions.php | UTF-8 | 1,532 | 3.4375 | 3 | [] | no_license | <?php
$initial = '555';
function convertOct($octString){
$result = octdec($octString);
return $result;
}
echo "del 1: ";
echo convertOct($initial);
$a = convertOct($initial);
echo "\n";
function convertDegreeToRadians($degree){
$result= deg2rad($degree);
return $result;
}
echo "del 2: ";
echo convertDegre... | true |
137a187829334162a125ef5da9fd87607a860dd7 | PHP | masom/liquid | /lib/Tags/Raw.php | UTF-8 | 946 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Liquid\Tags;
use Liquid\Liquid;
class Raw extends \Liquid\Block {
protected static $FullTokenPossiblyInvalid;
public static function init() {
static::$FullTokenPossiblyInvalid = '/\A(.*)' . Liquid::TagStart . '\s*(\w+)\s*(.*)?' . Liquid::TagEnd .'\z/sm';
}
/**
* @para... | true |
8f64b32ce677b65e01d8fd57e8365a322826f9bf | PHP | cjsjtec/HandsOn-php-4501 | /HandsOn/Cap8/7-array-object.php | UTF-8 | 863 | 3.59375 | 4 | [] | no_license | <?php
// essa classe ArrayObject implementa as tres interfaces anteriores sem modificar o comportamento padrao
class Biblioteca extends ArrayObject
{
public function getByName($name)
{
foreach ($this as $livro) {
if($livro->nome === $name) {
return $livro;
}
}
}
}
class Livro
{
private $nome;
public... | true |
81569795c3d16deaca4b752e745fe19ae837190b | PHP | cdebattista/laravel-permission | /stubs/app/Actions/Permission/CreatePermission.php | UTF-8 | 881 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Actions\Permission;
use App\Models\Permission;
use Cdebattista\LaravelPermission\Contracts\CreatesPermission;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
class CreatePermission implements CreatesPermission
{
/**
* Validate and create a new permission.
*
... | true |
595568c733e4978b8cb579e0d4abff0b77907cb9 | PHP | Seplarui/PHP | /numberformat1.php | UTF-8 | 359 | 3.703125 | 4 | [] | no_license | <html>
<!--Enunciado: Dado un cierto valor numérico, imprimirlo con dos decimales separados por una
coma, mostrando también los miles separados por puntos.
Ejecución: El valor corresponde a: 8.546.921.546,49-->
<?php
$numero= 8546921546.49451;
$resultado=number_format($numero,2,',','.');
echo $numero;
echo "<br>"... | true |
fd3af2a11ff692c1837f1a1fbccf65d4884ac329 | PHP | gamecraft/SeedGame-admin | /evaluater.php | UTF-8 | 2,622 | 2.59375 | 3 | [] | no_license | <?php
require_once("class_loader.php");
require_once("config/db_config.php");
define("CLOUD_RIGHT_ANSWERS", "abcdbcad");
define("SOFTWARE_RIGHT_ANSWERS", "bacbacda");
define("ENTREPRENEUR_RIGHT_ANSWERS", "dadaaccb");
define("NOT_ANSWERED_PLACEHOLDER", "e");
define("CLOUD", "Cloud");
define("ENTREPRENEUR", "Entrepre... | true |
37c990e4a4ba209014d9523b62bc354275d5addb | PHP | Bhagyashree94/PHP_programs | /challenge_01.php | UTF-8 | 1,008 | 3.578125 | 4 | [] | no_license | <?php
class Bicycle{
var $brand;
var $model;
var $year;
var $description = "Used Bicycle";
var $weight_kg = 0.0;
fuction name(){
return $this->brand . " " . $this->model . " (" . $this->year . ")";
}
fuction weight_lbs(){
return floatval($this.weight_kg) * 2.2046226218;
}
function set... | true |
160eccfe734023451a0e95d951b1357f7ac79eb7 | PHP | yongjiangbuaa/march3 | /WebProject/GMTool/gameengine/framework/module/stream/XJSONStream.php | UTF-8 | 1,222 | 2.796875 | 3 | [] | no_license | <?php
import('module.stream.XAbstractStream');
/**
* XJSONStream
*
* json stream
*
* <b>json格式数据流</b>
*
* @author Tianwei
* @package stream
*/
class XJSONStream extends XAbstractStream{
/**
* (non-PHPdoc)
* @see XAbstractStream::getInput()
*/
public function getInput(){
import('util.http.XServlet... | true |
8718f7332775e9cdc776afd458126c4404cfa6cd | PHP | freelancefrivas/timetracker | /app/Http/Requests/EmployeeRequest.php | UTF-8 | 764 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class EmployeeRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
... | true |
d913234be844cac1fcff080e53a445ea5b59b55f | PHP | cryptooman/cc-project | /components/src/RequestFraud.php | UTF-8 | 4,646 | 2.78125 | 3 | [] | no_license | <?php
/**
* Usage:
* RequestFraud::init( ... );
* In controller
* if (!RequestFraud::isFraud( ... )) {
* ... bounce or reject
* }
* In html <header>
* RequestFraud::renderSetComputedCookieJs();
*/
class RequestFraud
{
const COOKIE_NAME_SECRET_PHP = '93... | true |
9881288ab956e43736f4bb81ec1c36c6281ad896 | PHP | gustavorizzon/academic-manager | /app/Models/Curso.php | UTF-8 | 944 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Curso extends Model
{
use HasFactory;
const SHIFT_MORNING = 'A';
const SHIFT_AFTERNOON = 'B';
const SHIFT_NIGHT = 'C';
/**
* The attributes that are mass assignable.
*
... | true |
f506f93d03ea9a6dfc9885e1097363b347e27c97 | PHP | TechKingsUG/panel | /app/Extensions/DynamicDatabaseConnection.php | UTF-8 | 2,154 | 2.734375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Extensions;
use Pterodactyl\Models\DatabaseHost;
use Illuminate\Contracts\Encryption\E... | true |
bd730ce5c4929a412891ced24cd54dbe2594c0c1 | PHP | aique/AutoloadTest | /application/model/User/Validator.php | UTF-8 | 144 | 2.625 | 3 | [] | no_license | <?php
class Application_Model_User_Validator
{
public static function validateUserId($id)
{
return preg_match('/^[1-9][0-9]*$/', $id);
}
} | true |
11b739eaab97cf8ba4b09fba1fdd0184a1841e88 | PHP | pegro/PiFotomat | /lib/Filesystem.php | UTF-8 | 3,123 | 2.75 | 3 | [] | no_license | <?php
/**
* This file is part of PiFotomat.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | true |
3cf0aeea63e8c5e2bcdcb53aabf35d5991c9f5e1 | PHP | simonceddy/aflcrawler | /src/Requester.php | UTF-8 | 1,155 | 2.890625 | 3 | [] | no_license | <?php
namespace AflCrawler;
use GuzzleHttp\Client as Guzzle;
/**
* Decorates GuzzleHttp\Client
*/
class Requester
{
/**
* The GuzzleHttp Client
*
* @var Guzzle
*/
protected $guzzle;
public function __construct(Guzzle $guzzle = null)
{
$this->guzzle = $guzzle ?? new Guzzl... | true |
d96c69d1e6f69a70eda86026775c6b2623bd6195 | PHP | MarcoAntonino/PHP | /blog/swolley/Lezione12aprile/includes/content.php | UTF-8 | 1,510 | 2.640625 | 3 | [] | no_license | <?php
$categoria = isset($_REQUEST['idcat']) ? $_REQUEST['idcat'] : false;
if ($categoria)
$query = "SELECT * FROM posts JOIN categorie ON categorie.idcategoria=posts.idcategoria WHERE posts.idcategoria=" . $categoria . " ORDER BY data DESC";
else
$query = "SELECT * FROM posts JOIN categorie ON categorie.idcat... | true |
1447d38bb1e059d29bf58011b11f76c0063e817a | PHP | xiaomao1884600/test_git | /app/Elastic/Foundation/Base/Elastic.php | UTF-8 | 2,104 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xiewh
* Date: 2018/1/19
* Time: 下午2:43
*/
namespace App\Services\Elastic\Foundation\Base;
use Elasticsearch\ClientBuilder;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
class Elastic
{
/**
* Elastic 链接配置
*
* @var \Illuminate\Config\Repository... | true |
3c43ddb8e902ce3b5c362398327cc74182e82fd3 | PHP | Shofiul-Alam/magento-app | /src/vendor/vertex/module-tax/Api/Data/LogEntrySearchResultsInterface.php | UTF-8 | 702 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"OSL-3.0",
"MIT"
] | permissive | <?php
/**
* @copyright Vertex. All rights reserved. https://www.vertexinc.com/
* @author Mediotype https://www.mediotype.com/
*/
namespace Vertex\Tax\Api\Data;
/**
* Data model representing a result from a search against the Vertex API Log
*
* @api
*/
interface LogEntrySearchResultsIn... | true |
8dbef70df6396c2d2ad1e494523c48a5894266a9 | PHP | Gevorg618/Laravel-Structure-with-modules | /modules/Admin/Http/Controllers/Customizations/TypesController.php | UTF-8 | 2,964 | 2.78125 | 3 | [] | no_license | <?php
namespace Modules\Admin\Http\Controllers\Customizations;
use Illuminate\Http\Request;
use Modules\Admin\Http\Controllers\AdminBaseController;
use Modules\Admin\Repositories\Customizations\TypesRepository;
use Modules\Admin\Http\Requests\Customizations\TypeRequest;
class TypesController extends AdminBaseControl... | true |
c59a8587ee1b1cd1bbe6db2cb18ce9bf53cb8231 | PHP | venca1/menickacz-api | /src/MenickaCZ/IHttpClient.php | UTF-8 | 186 | 2.875 | 3 | [] | no_license | <?php
namespace MenickaCZ;
interface IHttpClient
{
public function __construct(string $baseUrl = null, ICache $cache = null);
public function requestGet(string $url): string;
} | true |
797def5db6b556cead189b96295528d10c5caa8a | PHP | jalbertomr/ProtoWebPages | /cap_05/comprobarFichero.php | ISO-8859-1 | 969 | 3.09375 | 3 | [] | no_license | <?php
// Dump de la variable "fichero"
echo( var_dump($_FILES["fichero"])."<br>\n");
// Se comprobando si el archivo tiene el formato adecuado.
echo("comprobando formato adecuado <br>\n");
if ($_FILES["fichero"]["type"]!="image/jpeg") {
die ("El fichero no tiene el formato adecuado.");
}
// Se comprueba que... | true |
36ec590dfdbfb8e26ae32b41d3669a6ea3434427 | PHP | mark-martinez/mymdb-php | /app/Models/DomainObjects/TV.php | UTF-8 | 572 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Models\DomainObjects;
class TV extends Listing {
public $poster_path;
public $popularity;
public $overview;
public $backdrop_path;
public $vote_average;
public $first_air_date;
public $origin_country;
public $genres;
public $original_language;
public $vote_c... | true |
6b6db1a0363b135e5c160ce719422999619180a9 | PHP | daniromero2000/CashRegister | /app/Http/V1/Controllers/Payments/SavePaymentController.php | UTF-8 | 1,663 | 2.53125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace App\Http\V1\Controllers\Payments;
use App\Deserializers\Payments\CreatePaymentDeserializer;
use App\Http\V1\Responses\GeneralErrorResponse;
use App\UseCases\Interfaces\Payments\SavePaymentUseCaseInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller... | true |
1de94fae94b3a25a6ded4a354b4ffc690dda6292 | PHP | netorodrigues/locadora-slim | /app/Exceptions/ValueObjects/InvalidUniqueIdReceivedException.php | UTF-8 | 385 | 2.75 | 3 | [] | no_license | <?php
declare (strict_types = 1);
namespace App\Exceptions\ValueObjects;
use App\Exceptions\APIException;
final class InvalidUniqueIdReceivedException extends APIException
{
public static function handle(string $id): self
{
return new self(
sprintf(
'Invalid unique id info... | true |
ac9b12a3f9f31f0033e153cf7abaa2c17469d14a | PHP | domozhirov/taskmanager | /src/Core/Config.php | UTF-8 | 3,292 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Core;
/**
* Class Config
*
* @property Config actions
*
* @property Config admin
* @property int id
* @property string login
* @property string email
* @property string name
* @property int access
*
* @property Config db
* @property string host
* @property int port
* @prope... | true |
ce3130bd596bcb65f338f185f176ca660eba3325 | PHP | ISGlobalWeb/hollyton | /weblogic/obj.php | UTF-8 | 643 | 2.8125 | 3 | [] | no_license | <?php
class CatListObj {
private $catId;
private $catName;
public function getCatId() { return $this->catId; }
public function getCatName() { return $this->catName; }
public function setCatId($x) { $this->catId = $x; }
public function setCatName($x) { $this->catName = $x; }
}
class Su... | true |
fea2305f077bfd21a2b9ea6fbe686a2fd8f3d90b | PHP | DonMalavita/Root_Dashboard | /resources/library/Autoloader.php | UTF-8 | 1,867 | 2.96875 | 3 | [] | no_license | <?php
/**
* AutoLoader.class.php
* --------------------
* Registreert een simpele class loader.
* Gebruik:
* $loader = new AutoLoader;
* // Hiermee activeer je hem.
*
* En gebruik:
*
*/
class Autoloader {
private static $regex_s = array("/","\\");
/**
* @ORM\Column(type="string")
*/
pr... | true |
bafaf05803ac4c63fd09bae44ebf3b5c6b1e873c | PHP | LuckyCyborg/system | /src/Log/Console/ClearCommand.php | UTF-8 | 1,212 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Nova\Log\Console;
use Nova\Console\Command;
use Nova\Filesystem\Filesystem;
class ClearCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'log:clear';
/**
* The console command description.
*
* @var string
... | true |
76f897a38af7b4055e2ac6c70d2e85ec8c5245f9 | PHP | LycheeOrg/Lychee | /app/Http/Controllers/SearchController.php | UTF-8 | 1,004 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Actions\Search\AlbumSearch;
use App\Actions\Search\PhotoSearch;
use App\Contracts\Exceptions\LycheeException;
use App\Http\Requests\Search\SearchRequest;
use App\Http\Resources\SearchResource;
use Illuminate\Routing\Controller;
class SearchController extends Controller
{... | true |
c766b3d17963c1fa3fd414bfab0546cc5e61bac3 | PHP | VDVT/Warehouse | /plugins/products/src/Services/StoreProductCategoryService.php | UTF-8 | 759 | 2.53125 | 3 | [] | no_license | <?php
namespace Botble\Products\Services;
use Botble\Products\Models\Products;
use Botble\Products\Services\Abstracts\StoreProductCategoryServiceAbstract;
use Illuminate\Http\Request;
class StoreProductCategoryService extends StoreProductCategoryServiceAbstract
{
/**
* @param Request $request
* @param... | true |
f43dab16e843ac3587b2933a4c3710580c707f9a | PHP | JBZoo/Retry | /src/Strategies/PolynomialStrategy.php | UTF-8 | 966 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* JBZoo Toolbox - Retry.
*
* This file is part of the JBZoo Toolbox project.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT
* @copyright Copyright (C) JBZoo.com, All rights reserved.
* @see http... | true |
c2e2f3cc1861b6f773ec925ef215c11571923cd1 | PHP | Nishan211775/RoomRentingSystem | /model/Customer.php | UTF-8 | 1,972 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Nishan
* Date: 5/17/2017
* Time: 10:39 PM
*/
class Customer
{
private $id;
private $firstName;
private $lastName;
private $username;
private $gender;
private $contact;
private $address;
private $accountType;
private $city;
private $p... | true |
bd701b8820dcb105897068ec87608778ab4f7f03 | PHP | bootcamp-s17/timething | /app/common.php | UTF-8 | 1,260 | 2.84375 | 3 | [] | no_license | <?php
$ENV = parse_ini_file('env.ini');
date_default_timezone_set('America/Kentucky/Louisville');
$status_message = array(
'text' => '',
'style' => 'alert-info'
);
$active_client = 0;
function getDb() {
global $ENV;
$db = pg_connect("host=$ENV[HOST] port=$ENV[PORT] dbname=$ENV[DB_NAME] u... | true |
68c61997aedd951a622b393a03a0b7c9ceadea18 | PHP | lesserror-hxr/php-objects-patterns-practice | /Objects/code_snippet/使用__clone复制对象/Account.php | UTF-8 | 204 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace popp\ch04\batch21;
class Account
{
public $balance;
public function __construct(float $balance)
{
$this->balance = $balance;
}
}
//done
| true |
f0204398437784f7fbe87822d25f3d3ee5b166e9 | PHP | lefevbre-organization/eShopOnContainers | /src/Web/POC/test-nextcloud/nextcloud/custom_apps/mail/lib/AddressList.php | UTF-8 | 3,819 | 2.84375 | 3 | [
"MIT",
"AGPL-3.0-only"
] | permissive | <?php
declare(strict_types=1);
/**
* @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms... | true |
2734b0cb6f4819e0f9b08d49513c23a34ada75f3 | PHP | codegeek911/Symfony_shoppingcart | /src/AppBundle/Entity/DiscountRules/CouponCodeDiscountRule.php | UTF-8 | 695 | 2.640625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Entity\DiscountRules;
use AppBundle\Entity\Booklist;
use AppBundle\Entity\Cart;
use AppBundle\Entity\CartBookItem;
use AppBundle\Entity\DiscountRules\DiscountRule;
use AppBundle\Entity\DiscountRules\DiscountDetail;
class CouponCodeDiscountRule implements DiscountRule{
pub... | true |
f9a2081659cf093075f53fb01667c3485b7e44da | PHP | xiaoyu-lyt/eGoServer | /Application/Api/Controller/UserController.class.php | UTF-8 | 8,804 | 2.65625 | 3 | [] | no_license | <?php
/**
* UserController.class.php
* Created by PhpStorm.
* Author: xiaoyu
* Time: 8/15/16 15:38
*/
namespace Api\Controller;
use Api\Controller\BaseController;
class UserController extends BaseController
{
/**
* 获取验证码,成功返回验证码,失败返回错误信息
* @access public
*
* @param string $receiver 接收验证码... | true |
dc094266a0ecbc69706c4246aa6f46c1efb4321f | PHP | AlainDessi/adweb | /Html/Html.php | UTF-8 | 3,462 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Core\Html;
class Html
{
/**
* Attributes ( class, id, name )
* @var array
*/
protected $attributes = [];
protected $prefix;
protected $suffix;
protected $tag;
protected $opentag;
protected $closetag;
protected $icons;
/**
* Constructeur
*/
... | true |
64d5d7eb60c86f4456607043657299e261662234 | PHP | patrick-a-cavanaugh/swe781game | /API/src/php/Game/Validator/CustomConstraintValidatorFactory.php | UTF-8 | 1,063 | 2.65625 | 3 | [] | no_license | <?php
namespace Game\Validator;
use Symfony\Component\Validator\ConstraintValidatorFactoryInterface;
use Symfony\Component\Validator\Constraint;
/**
* Mostly the same as Symfony\Component\Validator\ConstraintValidatorFactory, but can fetch validators from the DIC.
*/
class CustomConstraintValidatorFactory impleme... | true |
0f9b371186930b322e631e13be6119e38b34ba42 | PHP | equipe2do3a/site | /upload.php | UTF-8 | 2,231 | 2.90625 | 3 | [] | no_license | <?php
require_once '../conexao/conecta.inc';
$nome = $_POST['nome'];
$email = $_POST['email'];
//$arquivo = isset($_FILES["foto"]) ? $_FILES["foto"] : FALSE;
$arquivo = $_FILES["foto"];
$erro = $config = array();
$config["tamanho"] = 5242880;
$config["largura"] = 3000;
$config["altura"] = 3000;
if (... | true |
433b458e2311fa889ea008422bd3b8f6965cdbfa | PHP | antonioi520/socialProj | /DirectoryIterator.php | UTF-8 | 1,324 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="./css/bootstrap.css">
</head>
<body>
<?php
// http://php.net/manual/en/class.directoryiterator.php
//DIRECTORY_SEPARATOR
require_once './autoload.php';
$folder = './uploads';
if ( !is_dir($folder) ) {
die(... | true |
16d3a80c979c4816e2399a42aedbd4d03d0d0413 | PHP | LyricSun/All | /Documents/learn_php的副本/pdo2.php | UTF-8 | 390 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: information
* Date: 2017/11/30
* Time: 下午7:36
*/
$dbms = 'mysql';
$host = 'localhost';
$dbname = 'demo';
$user = 'root';
$pass = '123456';
$dsn = "$dbms:host=$host;dbname=$dbname";
$db = new PDO($dsn,$user,$pass);
$res = $db->query('SELECT * FROM student');
foreach ($r... | true |
518828ccf1df7eacf64523356c15265b5cdf536f | PHP | kuntarto/ksp | /controller/password.php | UTF-8 | 267 | 3.171875 | 3 | [] | no_license | <?php
function password(){
$gpass=NULL;
$n = 5; // jumlah karakter yang akan di bentuk.
$chr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvqxyz0123456789";
for($i=0;$i<$n;$i++){
$rIdx = rand(1,strlen($chr));
$gpass .=substr($chr,$rIdx,1);
}
return $gpass;
};
?> | true |
83c1b7cdba089ce26953965e48ca36e130b1c10d | PHP | w442201084/authaccess | /src/lib/wechat/GlobalAccessToken.php | UTF-8 | 1,363 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: demo
* Date: 2020/12/17
* Time: 19:19
*/
namespace access\lib\wechat;
use access\config\WeChatServiceConfig;
use access\lib\common\Common;
/**
* @desc 获取全局access_token
* Class GlobalAccessToken
* @package access\lib\wechat
*/
class GlobalAccessToken
{
private $re... | true |
f47bd9daa329d4e1404ec423433ff7b2381a0036 | PHP | luigif/WsdlToPhp | /samples/xignite-edgar/Array/Document/XiEdgarTypeArrayOfDocument.php | UTF-8 | 2,032 | 2.703125 | 3 | [] | no_license | <?php
/**
* Class file for XiEdgarTypeArrayOfDocument
* @date 08/07/2012
*/
/**
* Class XiEdgarTypeArrayOfDocument
* @date 08/07/2012
*/
class XiEdgarTypeArrayOfDocument extends XiEdgarWsdlClass
{
/**
* The Document
* Meta informations :
* - minOccurs : 0
* - maxOccurs : unbounded
* - nillable : tru... | true |
6dae8d633befb77a3ce0d56b4c5e58cc1e6fe68a | PHP | Lamine517/Phassmar | /backend/app/Http/Controllers/AlerteController.php | UTF-8 | 5,149 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Exception;
use App\alerte;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
class AlerteController extends Controller
{
public static function ajouterAlerte(Request $request)
{
$validator = Validator::m... | true |
63c03fdb6ee80bc0f2e2a45c200857888dd17036 | PHP | Deribolot/MyProject1 | /application/models/LeftMenu.php | UTF-8 | 722 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: rv_000
* Date: 26.10.2017
* Time: 11:12
*/
class LeftMenu implements iMenu
{
function getData($mylittleuser,$verified_admin=null)
{
$aData['items'] = [];
if ((Users::findById($mylittleuser->login)->login==$mylittleuser->login) && (Users::findById($m... | true |
3023194d9177d63b3eaec40229b8342aa985d820 | PHP | pfilsx/FormLayerBundle | /tests/Layer/EntityFormLayerTest.php | UTF-8 | 3,428 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Pfilsx\FormLayer\Tests\Layer;
use DateTime;
use Pfilsx\FormLayer\Exception\InvalidArgumentException;
use Pfilsx\FormLayer\Tests\app\Entity\Model;
use Pfilsx\FormLayer\Tests\app\Entity\Node;
use Pfilsx\FormLayer\Tests\app\FormLayer\ModelFormLayer;
use Pfilsx\FormLayer\Tests\app\FormLayer\NodeFormLaye... | true |
80a2dd0f2b0931db15d4c7a72ebfe4afe2275bb3 | PHP | BerilBBJ/scraperwiki-scraper-vault | /Users/G/gordy/universities_of_india.php | UTF-8 | 10,088 | 2.890625 | 3 | [] | no_license | <?php
require 'scraperwiki/simple_html_dom.php';
$link = "http://www.indiastudycenter.com/Univ/Statewise-Universities.asp";
run( "India", $link );
function run( $country, $link)
{
$dom = getHtmlDom( $link );
$counter = 0;
foreach( $dom->find( "div.r div.c p" ) as $entry )
{
$ancs = $entry-... | true |
35683618b27ccabb390d89af1446437bdb77a7ef | PHP | officersiam/project20210607 | /plugin/application.php | UTF-8 | 8,457 | 2.703125 | 3 | [] | no_license | <?php
// call the application() function if sitesetting is clicked
if (isset($_POST['application'])) {
application();
}
// application
function application(){
global $db, $errors;
$application_pic = $_FILES['application_pic']['name'];
$targetPic ... | true |
d4fa216f07193b37ae289c5f0119739c4d0d31af | PHP | veselaneznam/FishAndPlacesOrigin | /src/FishAndPlaces/GreenObject/Domain/Model/Camp.php | UTF-8 | 434 | 2.71875 | 3 | [] | no_license | <?php
namespace FishAndPlaces\GreenObject\Domain\Model;
use FishAndPlaces\GreenObject\Domain\Value\GreenObjectType;
class Camp extends GreenObject implements Entity
{
/**
* @return int
*/
public function getType()
{
return GreenObjectType::CAMP;
}
/**
* @return Camp
... | true |
87a62c549d7adb562a4d6089b1556391281f4628 | PHP | helei112g/weixin-sdk | /src/Wxpub/Weixin/BasicApi.php | UTF-8 | 1,389 | 2.640625 | 3 | [] | no_license | <?php
/**
* @author: helei
* @createTime: 2016-06-16 12:55
* @description: 主要解决weiixn接入,及获取基础信息
*/
namespace Wxpub\Weixin;
use Wxpub\Utils\Curl;
use Wxpub\Utils\DataParser;
use Wxpub\WxpubConfig;
use Wxpub\WxpubUrl;
class BasicApi
{
/**
* 进行签名的验证
*
* @note 调用该方法的控制器,在收到返回值为true时,需要echo 出 ech... | true |
b031e916a68bea745d52b2e85cfd7bf66f27416e | PHP | khe0818/CS307 | /post.php | UTF-8 | 2,610 | 2.546875 | 3 | [] | no_license | <?php
/**
* Author: jay
* Date: 3/3/15
* Time: 7:54 PM
*/
require_once "inc/global.inc.php";
$ph = new PostsHandler();
$post = $ph->fetchPost($_GET['id']);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>
<?php if ($post) echo $post->fname; else echo "Does Not Exist!"; ?> ~ Missin... | true |
450674f40f48a3bba4643aea7a7eeae3d6bb3b2c | PHP | charles80929/PHP | /Invoice System/source/application/models/ProductGroup.php | UTF-8 | 932 | 2.765625 | 3 | [] | no_license | <?php
/**
* @property int $id
* @property string $name
* @property int $deleted
*
* @property Product[] $products
*/
class ProductGroup extends Core_ActiveRecord_Row {
public function __construct($id=null){
parent::__construct(new ProductGroupModel... | true |
692edc3adf8c306fb7fd2b510f31558ff1e01050 | PHP | jasynecka/bst-currency | /app/core/DBConnection.php | UTF-8 | 811 | 2.8125 | 3 | [] | no_license | <?php
namespace core;
use \PDO;
class DbConnection
{
private static $pdo;
public static function getPDO(): PDO
{
if (!isset(self::$pdo)) {
$appConfig = new AppConfig();
$connectionParams = sprintf(
'%s:host=%s;charset=%s;dbname=%s',
$appCo... | true |
35b18abcdce69c8c7cab295cc628bab08b143335 | PHP | ideas2life/i2log | /src/TempSystemLog.php | UTF-8 | 756 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: xatzistnr
* Date: 11/05/2018
* Time: 8:40 ΠΜ
*/
namespace Ideas2life\I2Log;
class TempSystemLog implements SystemLogInterface
{
/**
* @var LogEntryInterface[]
*/
protected $logs = [];
/**
* @param $message
* @param mixed $data
* @return... | true |
fd4e46b26a071d1128eb2825be7ffc3a796a6869 | PHP | bmvc-php/bmvc-app | /vendor/mirarus/bmvc-libs/src/File.php | UTF-8 | 1,875 | 3.125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* File
*
* Mirarus BMVC
* @package BMVC\Libs
* @author Ali Güçlü (Mirarus) <aliguclutr@gmail.com>
* @link https://github.com/mirarus/bmvc-libs
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version 2.8
*/
namespace BMVC\Libs;
trait File
{
/**
* @param string $file
*... | true |
374c1d94e4f5bfd4bf828e13ff64334caffa89bd | PHP | vicburgosv/licanray | /Aplicacion/docente/php/ingresar_anotacion.php | UTF-8 | 2,793 | 2.546875 | 3 | [] | no_license | <?php
$ano='2019';
session_start();
$ano=$_SESSION['ano'];
$rut=$_POST['rut'];
require('conexion.php');
$conexion=mysqli_connect($host,$user,$pw)or die("Error al conectar con el servidor");
mysqli_select_db($conexion,$db)or die("Error al conectar con la base de datos");
?>
<div class="volver_small" align="cente... | true |
c2a0a6c86336fe65d835c183f68a59f3c5d50192 | PHP | ektagithub/Social-Media-Network | /AddAlbum.php | UTF-8 | 2,681 | 3.015625 | 3 | [] | no_license | <?php
require(dirname(__FILE__) . "/Common/ClassesAndFunctions.php");
require(dirname(__FILE__) . "/Common/ConstantsAndSettings.php");
// Start Session
session_start();
// User
$user = $_SESSION['user'];
if (!isset($user)) {
$_SESSION["from"] = "AddAlbum.php";
header("Location: Login.php");
}
$accessibiliti... | true |
aaccc5d24dbcacbe7a27c6357603e57f7e9b46de | PHP | L-TCT/Mission3 | /edward-comics-php/src/php/update_carte.php | UTF-8 | 2,270 | 2.703125 | 3 | [] | no_license | <?php
require 'connect.php';
function regex_data($param)
{
$param = trim($param);
$param = stripcslashes($param);
$param = htmlspecialchars($param);
return $param;
}
$postdata = file_get_contents('php://input');
if (isset($postdata) && !empty($postdata)) {
// Extract the data.
$data = json_d... | true |
41e2e681f62965c09250370afec5527c1d1a8654 | PHP | jeremypleb/automatic-class-schedule-creator | /db/database.php | UTF-8 | 4,316 | 3.234375 | 3 | [] | no_license | <?php
require_once "MyDB.php";
class Database
{
/*
function getJsonDataObject()
{
// The file is too big
$json = file_get_contents('../data/semester-sections-20195.json', true);
$jsonArray = json_decode($json, true);
error_log( print_r($jsonArray, TRUE) );
... | true |
2e70bfa9b71ebd8079e7b643ab082fa75973a12e | PHP | nvvu99/php-mvc | /forms/ArticleEditForm.php | UTF-8 | 443 | 2.71875 | 3 | [] | no_license | <?php
include_once 'ArticleCreateForm.php';
class ArticleEditForm extends ArticleCreateForm
{
private $articleId;
public function __construct(
int $articleId = 0,
string $title = '',
string $content = ''
) {
$this->articleId = $articleId;
parent::__construct($title... | true |
1abc1f21c0233e0c498ebfdd31ea66ff66ac7546 | PHP | code-lts/doctum | /tests/phar/data/src/Stuff.php | UTF-8 | 682 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
$obj = new stdClass;
function getWeakRef(stdClass $obj): WeakReference
{
return WeakReference::create($obj);
}
/**
* Binary safe bzip2 file read
* @link https://php.net/manual/en/function.bzread.php
* @param resource $bz <p>
* The file pointer. It must be valid and must point to a file
* successfully ... | true |