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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
58ccddd5ae9d670652a63fc58879937f8569ef54 | PHP | TomasHermanek/assignment-gis-THermanek | /src/Core/Routing.php | UTF-8 | 1,559 | 2.875 | 3 | [] | no_license | <?php
namespace Core;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
/**
* Class Routing handles routing in app
* @package Core
*/
clas... | true |
a78375c0aa62cfc1c42c15cb20f20a21716cac14 | PHP | marcimat/bigup | /inc/Bigup/CacheFichiers.php | UTF-8 | 10,404 | 2.984375 | 3 | [] | no_license | <?php
namespace Spip\Bigup;
/**
* Gère le cache des fichiers dans tmp/bigupload
*
* @plugin Bigup
* @copyright 2016
* @author marcimat
* @licence GNU/GPL
* @package SPIP\Bigup\Fonctions
*/
/**
* Gère le cache des fichiers dans tmp/bigupload
*
**/
class CacheFichiers {
use LogTrait;
/**... | true |
ea7e9cf9296d63019931a3234e7b8c4555224fec | PHP | asahara53/laravelBlog | /app/Models/Comment.php | UTF-8 | 1,102 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Comment extends Model
{
protected $fillable = [
'body',
'post_id',
];
/** Postとのリレーション定義
*
* @return void
* @access public
*/
public function post()
{
return $this->belongsTo('App... | true |
39b216550c75a3b13adcdefbcc0d15d973499759 | PHP | rastakoy/AlisaCMS-X | /adminarea/classes/class.Start.php | WINDOWS-1251 | 4,277 | 2.609375 | 3 | [] | no_license | <?php
class Start extends DatabaseInterface{
/**
*/
function constructor($array){
$classData = new Data();
foreach($array as $key=>$menu){
$array[$key]['external'] = ($menu['external']=='1')?'':'';
if($menu['filter']){
$query = $this->query("SELECT * FROM `filters` WHERE `id`='$menu[filter]' ");
... | true |
f8f771a1190cd01e98fc6a9cae71269c05c13ab9 | PHP | rainbowzl7/design-patterns-in-php | /ChainOfCommand.php | UTF-8 | 1,135 | 3.265625 | 3 | [] | no_license | <?php
/**
* Chain of Command
*also named: Chain Of Responsibility
*/
interface Command {
public function onCommand($name, $args);
}
class CommandChain {
private $_commands = array();
public function addCommand($cmd){
$this->_commands[] = $cmd;
}
public function runCommand($name, $args){
foreach ($this->_... | true |
66f50cfdba46fde368ab269b38009c339b597528 | PHP | carloscasalar/kata-football | /src/League/Run.php | UTF-8 | 1,758 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace League;
class Run {
public static function execute() {
$teams = [
new Team('The Creative Prowlers'),
new Team('The Brute Comets'),
new Team('The Heavenly Warhawks'),
new Team('Spirit Squirrels'),
... | true |
b4c42e2152fdf38d5ec150b575f93400e5447411 | PHP | bobalazek/web-application-starter-kit | /src/Application/Doctrine/ORM/DoctrineManagerRegistry.php | UTF-8 | 2,690 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Application\Doctrine\ORM;
use Doctrine\Common\Persistence\ManagerRegistry;
/**
* @author Borut Balazek <bobalazek124@gmail.com>
*/
class DoctrineManagerRegistry implements ManagerRegistry
{
protected $managers;
protected $connections;
protected $defaultManager;
protected $defaultCon... | true |
00139114621a8b23ab1c1ea86e3976dee8d3cac4 | PHP | avshatalov48/bitrix24-core-corp | /modules/tasks/lib/util/userfield/type/enumeration.php | UTF-8 | 1,853 | 2.625 | 3 | [] | no_license | <?php
namespace Bitrix\Tasks\Util\UserField\Type;
use Bitrix\Tasks\Util\Collection;
use Bitrix\Tasks\Util\UserField\Type;
/**
* Class Enumeration
*
* @package Bitrix\Tasks\Util\UserField\Type
*/
final class Enumeration extends Type
{
private static $enums = [];
public static function cloneValue(
$value,
ar... | true |
563a0e28aeff238ef8d51831b241e24927208980 | PHP | Yuta-Nakano/slm | /src/database/migrations/2021_01_08_072908_create_product_stocks_table.php | UTF-8 | 1,974 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductStocksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_s... | true |
a7522fc0bf5b6d97a968c1c7f814e1d7e20b30b3 | PHP | TheFrozenFire/CardsAgainstHumanity | /module/Application/src/Application/Form/Login.php | UTF-8 | 352 | 2.609375 | 3 | [] | no_license | <?php
namespace Application\Form;
use Zend\Form;
class Login extends Form\Form {
public function __construct() {
parent::__construct();
$this->add($email = new Form\Element\Email("email"));
$email->setLabel("Email Address");
$this->add($displayName = new Form\Element\Text("displayName"));
$displayName-... | true |
af6a744e5df2e1af844be49618751d43374aa1de | PHP | olvidio/orbix | /apps/ubis/model/entity/TelecoUbiGlobal.php | UTF-8 | 8,549 | 2.71875 | 3 | [] | no_license | <?php
namespace ubis\model\entity;
use core;
/**
* Clase que implementa la entidad d_teleco_ubis
*
* @package delegación
* @subpackage model
* @author Daniel Serrabou
* @version 1.0
* @created 01/10/2010
*/
abstract class TelecoUbiGlobal extends core\ClasePropiedades
{
/* ATRIBUTOS -----------------------... | true |
4528f73ca62124ec65da55210273861f7eedcf08 | PHP | lightster/pickem-app | /src/Lidsys/User/Service/AuthenticationResetService.php | UTF-8 | 4,775 | 2.546875 | 3 | [] | permissive | <?php
namespace Lidsys\User\Service;
use Exception;
use Lidsys\Application\Service\MailerService;
use The\Db;
class AuthenticationResetService
{
private $auth;
private $mailer;
private $auth_config;
public function __construct(
AuthenticatorService $auth,
MailerService $mailer,
... | true |
46d996b4571a63a9d4b47eaf4021d0f3001a5c15 | PHP | fecaps/email_microservice | /app/Queue.php | UTF-8 | 944 | 2.65625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Queue extends Model
{
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = ['id', 'created_at', 'updated_at'];
public function addToQueue(array $data): int
{
$data = sel... | true |
a934dcd68bebda5fa87c177d6b6ee2f14d3cecb8 | PHP | alexcos/symfony | /src/G4/UtilBundle/Events/StatEvent.php | UTF-8 | 1,415 | 2.84375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Stats event package
*
* @category Allegiant
* @package G4.UtilBundle.Events
*
* @author Georgiana Gligor <g@lolaent.com>
*/
namespace G4\UtilBundle\Events;
/**
* Stats events, indicating time elapsed for performing a certain operation
*/
class StatEvent extends LoggingEvent
{
/**
* @v... | true |
f52cfe1d7a737e952a638c2cdc1ca33585a23dbb | PHP | KirillAvramov/EnglishProj | /console/migrations/m181109_165504_create_junction_table_for_text_and_word_tables.php | UTF-8 | 2,454 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `text_has_word`.
* Has foreign keys to the tables:
*
* - `text`
* - `word`
*/
class m181109_165504_create_junction_table_for_text_and_word_tables extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$t... | true |
24391dd27694805f0d425d6fdbf011ee825c768b | PHP | alchermd/laravel-vue-todo-list | /app/Http/Controllers/Api/TasksController.php | UTF-8 | 1,817 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use App\Models\Task;
use Illuminate\Http\Request;
class TasksController
{
public function index()
{
return Task::simplePaginate(10, [
'id',
'title',
'description',
'is_finished',
]);
}
public fu... | true |
c13d11e861973a01a32b1f4abfe74a142e2b3b00 | PHP | LeninDHP/ambientesnopropietarios | /deberes/deber5/index10.php | UTF-8 | 1,536 | 2.796875 | 3 | [] | no_license |
<?php
//$conn = new Mysqli($host, $usuario,$cont,$bdd);
//if($conn->connect_error)
// die ($conn->connect_error);
?>
<html>
<head>
<title>Literal 10</title>
<link rel="stylesheet" type="text/css" href="css/jquerycss.css">
</head>
<body>
<script type="text/javascript" src="jscrip/jquery.js"></script>
<div>
<li>C... | true |
8415d5f4bcbefa9f9f805d5c49c86c4df674cf1f | PHP | NAbdulla1/intern-api-backend | /src/utils/CORSHeaders.php | UTF-8 | 1,030 | 2.59375 | 3 | [] | no_license | <?php
namespace Utils;
class CORSHeaders
{
static function setProperResponseHeadersForCors(): void
{
http_response_code(200);
header("Access-Control-Allow-Origin: http://localhost:3000");// the origin to allow access from to this api
header("Access-Control-Expose-Headers: Content-Len... | true |
6bca2442af1d745e54e501d0a5a81f3db26e2373 | PHP | AliMsayleb/problem-solving-questions | /Buddy-Strings.php | UTF-8 | 1,951 | 3.515625 | 4 | [] | no_license | <?php
// Hi, here's your problem today. This problem was recently asked by AirBNB:
// Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A so that the result equals B.
// Example 1:
// Input: A = "ab", B = "ba"
// Output: true
// Example 2:
// Input: A = "ab", B = "ab... | true |
4fb5ea54efe0bb0aa3c95524250590306babc7c3 | PHP | rilwanfit/url-shortener | /api/src/UrlGeneration/Domain/UrlRepository.php | UTF-8 | 280 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\UrlGeneration\Domain;
use DateTime;
interface UrlRepository
{
public function findByUrlRequest(ShorteningUrlRequest $request): ?ShorteningUrl;
public function save(ShorteningUrl $shorteningUrl, DateTime $createdAt): void;
} | true |
f7e74ca1c8518dcda84ef1538730807249dca59a | PHP | rich29d/ADS_compras | /versao_1/grupos/4/application/models/Departamentos_model.php | UTF-8 | 886 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Departamentos_model extends CI_Model
{
public function getDepartamentos()
{
$query = $this->db->get("departamentos");
return $query->result();
}
public function inserirDepartamento($dados=NULL)
{
if($dados != NULL)
{
$this->d... | true |
75d5542092a0dbc944f2b451a99959c347a7a394 | PHP | Happyr/SimpleBusBundle | /Message/EventSubscriber/WhenPongWriteLog.php | UTF-8 | 638 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Happyr\SimpleBusBundle\Message\EventSubscriber;
use Psr\Log\LoggerInterface;
use Happyr\SimpleBusBundle\Message\Event\Pong;
class WhenPongWriteLog
{
/**
* @var LoggerInterface
*/
private $logger;
/**
* @param LoggerInterface $logger
*/
public function __construct(... | true |
451618c49a0c7e8d65796dd1e992712561814a29 | PHP | jaimeirazabal1/Sistema-de-Informaci-n-TEXTILES-DEL-PACIFICO | /models/BillImpl - copia.php | UTF-8 | 25,247 | 2.578125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of ClientImpl
*
* @author JuliánAndrés
*/
if (file_exists("../models/Conexion.php")) {
include_once(... | true |
7da4037862dd2e0e013f39922106b7cb9eb3c9e9 | PHP | p810/ioc-container | /src/Entry.php | UTF-8 | 4,559 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace p810\Container;
use function is_a;
use function is_array;
use function array_unshift;
use function array_key_exists;
/**
* Represents an item in `p810\Container\Container`, i.e. a resolvable class.
*/
class Entry
{
/**
* @var callable
*/
protected $factory;
/**
* @var nu... | true |
8427f4930f4ed042c93b7b469fb1063b062dda26 | PHP | antonyhopkins008/film-app | /src/Entity/Studio.php | UTF-8 | 1,865 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity()
* @ORM\Table(name="studio")
* @UniqueEntity("name")
*/
class Stu... | true |
324a02029dbedd39e9b86abef14506284ff98907 | PHP | subooom/project-1 | /app/core/session.php | UTF-8 | 422 | 2.984375 | 3 | [] | no_license | <?php
class Session
{
public function set($key, $value)
{
$_SESSION[$key] = $value;
return $this;
}
public function has($key)
{
return array_key_exists($key, $_SESSION);
}
public function get($key)
{
if(!$this->has($key)) return null;
return $_SESSION[$key];
}
public function remove($key)
{... | true |
88bd794c76a9de3ce8710616ba4dc0fd9dc58cb4 | PHP | sdsnyder/BlogPHP | /blogview.php | UTF-8 | 2,734 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>Blog Posts</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css" title="style" />
</... | true |
d6ab1a615c34d4c3816983881a0e8750ee0f905b | PHP | imaneis/project5oc | /blog/model/backend/admin/AdminSessionManager.php | UTF-8 | 1,362 | 2.828125 | 3 | [] | no_license | <?php
require_once("model/Manager.php");
class AdminSessionManager extends Manager
{
public function login($name, $email, $password)
{
try {
$db = $this->dbConnect();
$req = $db->prepare("SELECT id, pseudo, email, pass FROM members WHERE pseudo=:pseudo OR email=:email");
... | true |
1824efdd9b43352849f0b8d970eea90e06515cb1 | PHP | abbasfisal/Laravel-AskBox-Project | /infrastructure/Enumerations/Databases/AskEnum.php | UTF-8 | 1,370 | 3 | 3 | [] | no_license | <?php
namespace Infrastructure\Enumerations\Databases;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
/**
* Class AskEnum
* This Class defined For Ask Model
* @package Infrastructure\Enumerations\Databases
*/
final class AskEnum
{
/*---------------------------------
| Ask Table Columns Name
... | true |
362958a671e6c6150a86d6a6249f4a7d7e45bd40 | PHP | fangHfang/php-mvc | /app/model/admin/typeModel.php | UTF-8 | 1,283 | 2.578125 | 3 | [] | no_license | <?php
class typeModel{
function __construct()
{
$this->db=new db("type");
}
function gettype($limit){
// $arr=$this->db->seleteALL("*","1 $limit");
$this->db->table="type,category";
$arr=$this->db->seleteALL("*","type.cid=category.cid $limit");
$this->db->close();
... | true |
762cec0160b391185f3d81a8800452c29f520a9c | PHP | subodhthakur0000/Bhatti_Danda | /app/Http/Controllers/IntroductionController.php | UTF-8 | 1,229 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Introduction;
use Session;
use DB;
class IntroductionController extends Controller
{
public function add()
{
return view('cd-admin.introduction.addintroduction');
}
public function show()
{
$intro=DB::table('introductio... | true |
b086637a531f41df20ae7a7725601069109a404f | PHP | DaffaFA/PHP-MVC-EXAM | /App/Core/App.php | UTF-8 | 1,009 | 2.71875 | 3 | [] | no_license | <?php
class App {
public $url;
private $controller = 'Home';
private $method = 'index';
public function __construct()
{
$this->parseUrl();
$this->wController();
var_dump($this->url);
}
public function parseUrl()
{
if ( isset($_GET['url']) ) {
... | true |
deb1144d1bf5455e5d9951f64a024e400ce4ec9d | PHP | vitrale/guestbook | /app/Controllers/AuthenticationController.php | UTF-8 | 4,014 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use Config\Services;
use App\Entities\User;
class AuthenticationController extends BaseController
{
public function notAuthorizedPage()
{
return view('authentication/not_authorized');
}
public function registerPage()
{
return view('authentication/... | true |
f324a62953dcf6e1313df0c65c6794858afeae69 | PHP | ElenaOrozco/Curso-Laravel | /app/Http/Controllers/MessagesController.php | UTF-8 | 1,164 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Message;
use App\Http\Requests\CreateMessageRequest;
use Illuminate\Http\Request;
class MessagesController extends Controller
{
public function show(Message $message){
//Buscar el mensaje por id
//$message = Message::find($id);
//Mandar a llamar la vi... | true |
7af0aee1f4afd8998fe3d2d40f69609a24efa304 | PHP | lokesh75way/event-scheduling | /tests/TestCase/Controller/EventControllerTest.php | UTF-8 | 3,777 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Test\TestCase\Controller;
use App\Controller\EventController;
use Cake\TestSuite\IntegrationTestTrait;
use Cake\TestSuite\TestCase;
use Cake\ORM\TableRegistry;
/**
* App\Controller\EventController Test Case
*
* @uses \App\Controller\EventController
*/
class EventControllerTest extends TestCase... | true |
c443918c026d813b42848d6bc70ffbbd177b30d0 | PHP | paullewallencom/jquery-978-1-7821-6006-9 | /_/Chapter 8/wurfl-php/WURFL/Storage.php | UTF-8 | 1,707 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (c) 2012 ScientiaMobile, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version... | true |
0d548e5f4a91d5e0e0a8a97bace6a800382b536e | PHP | phamleo/Saito | /plugins/Stopwatch/src/Lib/Stopwatch.php | UTF-8 | 9,274 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* Saito - The Threaded Web Forum
*
* @copyright Copyright (c) the Saito Project Developers
* @link https://github.com/Schlaefer/Saito
* @license http://opensource.org/licenses/MIT
*/
namespace Stopwatch\Lib;
class Stopwatch
{
protected static $_startupTime = 0;
pro... | true |
5201704286f508cf2cea12dc6ad353fd9530db07 | PHP | cativo23/Laravel_Projects | /linkt/app/Http/Controllers/LinkController.php | UTF-8 | 2,808 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Link;
use Auth;
use Exception;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;
class LinkController extends ... | true |
abf58e97b433cfdd563a6b783d4904b7fe235de2 | PHP | emonkak/php-di | /src/Cache/ApcuCache.php | UTF-8 | 986 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Emonkak\Di\Cache;
/**
* @implements \ArrayAccess<string,?mixed>
*/
class ApcuCache implements \ArrayAccess
{
private string $prefix;
private int $lifetime;
public function __construct(string $prefix = '', int $lifetime = 0)
{
$this->prefix = $prefix;
$this->lifetim... | true |
e20e68aafa17a1632cb812954a0ef0ecf3634fcf | PHP | positivecodes/nomnom | /components/GitLab.php | UTF-8 | 1,529 | 2.734375 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
namespace app\components;
use Yii;
use yii\base\Component;
use yii\helpers\VarDumper;
use yii\httpclient\Client;
/**
* GitLab
*
* @property Client $client
*/
class GitLab extends Component
{
/**
* @var string GitLab repo URL
*/
public $url = 'https://gitlab.human-device.com/';
/**
... | true |
5c8c230c7e724a5de1042c84c3d3efc99190f30d | PHP | suwatjanee/ionic | /2.History/config/DbConnect.php | UTF-8 | 1,274 | 2.875 | 3 | [] | no_license | <?php
class DatabaseConnection /*สร้างคลาส ไม่การสืบทอด*/{
private $host = "localhost"; /*4ตัวแปร */
private $db_name = "history";
private $username = "root";
private $password = "06032541";
public $conn;/*สามารถเอาไปใช้ที่คลาสอื่นได้ --เชื่อมต่อ-- */
public function getConnection()/*เมทธอต เชื่อมฐานข้อ... | true |
c46824d6f53b365d5220de0d3fda262f06476b9c | PHP | papertank/origami-notice | /src/Flash.php | UTF-8 | 598 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Origami\Notice;
class Flash {
/**
* @param $message
* @param $level
* @param $title
* @param $overlay
*/
public function __construct(
$message,
$level,
$title,
$overlay
)
{
$this->message = $message;
$this->level = $level;
$this->title = $title;
$th... | true |
42a646fc4755750324d00205ac6a1ccb28452f32 | PHP | egorka-pom1dorka/PHP_courses | /hw10/modules/modul.php | UTF-8 | 619 | 2.75 | 3 | [] | no_license | <?php
require_once("../productModel.php");
$model = new productModel();
$query="";
if ($_GET) {
$name = $_GET['name'];
$from = $_GET['from'];
$to = $_GET['to'];
if ($name) {
$query .= " AND name LIKE '%{$name}%'";
}
if ($from) {
$query .= " AND price>=$from";
}
if($to){
$query .= " AND p... | true |
01c648d80fe1b9cda8f91bda2f6133d9cd0513e2 | PHP | kahwee/backstage | /protected/modules/backstage/extensions/krichtexteditor/KRichTextEditor.php | UTF-8 | 3,380 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* KRichTextEditor generates a rich text editor interface using tiny mce.
*
* An example usage would be:
*
* Yii::import('ext.krichtexteditor.KRichTextEditor');
* $this->widget('KRichTextEditor', array(
* 'model' => $model,
* 'value' => $model->isNewRecord ? $model->{$name} : '',
* 'attribute' => ... | true |
25ffbd8aa108d9b764392c3aa588e7bbbb7eb8e9 | PHP | junder79/WebPay-REST-PHP | /conexion/conexion.php | UTF-8 | 467 | 2.546875 | 3 | [] | no_license | <?php
//Conexion a la base de datos
$host="localhost";
$user="root";
$password="";
$database="lavameapp_2";
$conexion =mysqli_connect($host , $user , $password , $database);
mysqli_set_charset($conexion,"utf8");
//Comprobar que la conexion sea correcta
if(mysqli_connect_errno())
{
die('Error de conexión: ' . mys... | true |
f7c1f506ce4ec7f8ba75b4bfd07f775bea0cacd8 | PHP | micromingle/gloomy-dungeons-2 | /tools/site/source/sources/base.core.php | UTF-8 | 1,312 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
defined('POPLR') or die();
class Poplr_Core {
const LIST_FILES = 1;
const LIST_DIRS = 2;
public static function defaultIndexPhpContent() {
return '<' . '?' . "php\n\n"
. "if (file_exists(dirname(__FILE__) . '/../index.php')) {\n"
. "\trequire(dirname(__FILE__) . '/../index.php');\n"
. "}\n";
}
... | true |
08b05b068242ff08493a716dcc28190852c56e68 | PHP | jellelampaert/ci4_auth | /src/Config/Auth.php | UTF-8 | 2,194 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php namespace jellelampaert\ci4_auth\Config;
use CodeIgniter\Config\BaseConfig;
class Auth extends BaseConfig
{
/*
* Can a user register itself?
*/
public $userCanRegister = true;
/*
* Is a new user activated automatically or does an admin need to activate the account first?
... | true |
ad19de87297f8ae6fd8deafc3ad75e106b8239fd | PHP | mustafashakeel/learns | /examples/PHP/example62.php | UTF-8 | 784 | 2.8125 | 3 | [] | no_license | <?php // Recipe 62: Get User From DB
require_once('../WDC.php');
$dbhost = 'localhost'; // Normally no need to change this
$dbname = 'mydb'; // Change to your database name
$dbuser = 'testing'; // Change to your database user name
$dbpass = 'testing'; // Change to your database password
mysql_connect($dbhos... | true |
f9bc044d1f109435f8e37357e3ca5a82ae8b2732 | PHP | nov1/mvc2.com | /css/temp.php | UTF-8 | 6,792 | 2.53125 | 3 | [] | no_license | <!-- <div class='lside'>-->
<!-- <div class='menu_filter'>-->
<!-- <h4>Подбор по параметрам:</h4>-->
<!-- <hr>-->
<!--
<!---->
<!---->
<!--
<!--
<!--
<!--
<!-- <div class='content'>-->
<!-- <div class="sort">-->
<!-- ... | true |
b7b6a1836adca0dfdc6e972f388adfe25211225f | PHP | constraction/student | /tp3/Apps/Home/Controller/LoginController.class.php | UTF-8 | 2,309 | 2.5625 | 3 | [] | no_license | <?php
namespace Home\Controller;
use Think\Controller;
use Home\Model\UserModel;
class LoginController extends Controller {
/**
* 显示登录页
*/
public function index(){
header("Content-type:text/html;charset=utf-8");
$this->display('Apps\Home\View\Login\login.html');
}
/**
... | true |
c74913060852db4928335f0d7b417a324e97961f | PHP | Becklyn/BecklynRadBundle | /src/Sortable/SortableHandler.php | UTF-8 | 4,229 | 2.703125 | 3 | [] | permissive | <?php declare(strict_types=1);
namespace Becklyn\RadBundle\Sortable;
use Becklyn\RadBundle\Entity\Interfaces\SortableEntityInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
final class SortableHandler
{
/**
* @var EntityRepository
*/
private $repository;
/**
*/... | true |
c1afd7bd75cc3984578a9ed27671513011c3e405 | PHP | AlexandriusII/drmvc-framework | /Application/Controllers/Main.php | UTF-8 | 1,038 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace Application\Controllers;
use System\Core\Controller;
/**
* Class Main
* @package Application\Controllers
*/
class Main extends Controller
{
// Styles
public $styles_vendor;
public $styles;
// Scripts
public $scripts_vendor;
public $scripts;
/**
* Main constructor
... | true |
1b856e42de0dcc0083fd66a8189785896e8b89bf | PHP | MarcoMdMj/Localization | /src/Driver/UrlGenerator.php | UTF-8 | 6,071 | 2.96875 | 3 | [] | no_license | <?php
namespace MarcoMdMj\Localization\Driver;
use Illuminate\Routing\Router;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
/**
* UrlGenerator service.
*
* @package MarcoMdMj\Localization
*/
class UrlGenerator
{
/**
* Instance of the localization driver.
*
* @var DriverInterf... | true |
7cc88557885116e70fb574f94ec5473e73057bca | PHP | JamieYnonan/maraquser | /app/tests/Mu/Domain/Model/Permission/NameTest.php | UTF-8 | 1,158 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Mu\Domain\Model\Permission;
use PHPUnit\Framework\TestCase;
class NameTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException
*/
public function testInvalidMinLength()
{
new Name('ab');
}
/**
* @expectedException \InvalidArgumentException... | true |
9db54eb82509f540ff367b28b9a9e16b489da1c6 | PHP | paulovelho/MagratheaPHP | /Magrathea/MagratheaLogger.php | UTF-8 | 2,140 | 3.109375 | 3 | [] | no_license | <?php
/**
* Magrathea class for logging anything
* The log will be created in *logs* folder in the root of the project (same dir level as *app*)
* By default, the message is written with a timestamp before it.
* - For *Log* function, the default file is saved with a timestamp in the name
* - For *LogError* fu... | true |
2c126df3369eae68e89813d914080907aae76001 | PHP | veritech/pare-project | /search/documents/chat_document.php | UTF-8 | 12,072 | 2.53125 | 3 | [] | no_license | <?php
/**
* Global Search Engine for Moodle
*
* @package search
* @category core
* @subpackage document_wrappers
* @author Valery Fremaux [valery.fremaux@club-internet.fr] > 1.8
* @date 2008/03/31
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*
* document handling for chat activity module
* This fi... | true |
9263a24c0f85dbd5f361c892e03b6c196df4be69 | PHP | imba97/to-a-ru-CMS | /app/Helpers/function.php | UTF-8 | 1,390 | 2.625 | 3 | [] | no_license | <?php
use App\Website;
use Illuminate\Log\Writer;
use Monolog\Logger;
function getArticleStatusClass ($status) {
switch ($status) {
case "0": $r = 'active'; break;
case "1": $r = 'success'; break;
case "2": $r = 'warning'; break;
case "3": $r = 'danger'; break;
default: $r ... | true |
64df98fe769aa8b8d1b57212ee76a7bfff6d49e5 | PHP | mostafaMahfouz25/php-oop-project | /includes/core/raintpl.class.php | UTF-8 | 5,236 | 2.953125 | 3 | [] | no_license | <?php
/**
* Project: RainTPL, compile HTML template to PHP
*
* File: raintpl.class.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, ... | true |
d5cb1df1415d6d18d8f4d80c527ae04d67d0cd1a | PHP | vishal-web/guitarshop | /application/modules/web/controllers/Web.php | UTF-8 | 1,682 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Web extends MX_Controller
{
function __construct() {
parent::__construct();
$this->load->library('form_validation');
$this->form_validation->CI =& $this;
}
function index()
{
$data['username'] = $this->input->post('username',TRUE);
// $data['view_file'] = 'view';
$this->load->module('templat... | true |
b8e3198c2c1d1f9fff4fb450762e45137c4d88f6 | PHP | jvarona05/customer-alliance-test | /src/Services/HotelService.php | UTF-8 | 1,606 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Services;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Contracts\Cache\ItemInterface;
use Doctrine\ORM\EntityManagerInterface;
use App\Services\Paginator;
use App\Entity\Review;
use App\Entity\Hotel;
class HotelService
{
priv... | true |
b230b32328b4bd3e1a5e6d78160537509c33fba5 | PHP | sestakp/vut-brno-information-technology | /BIT - Bachelor IT/5.term/IIS - Information Systems/serverAPI/app/Models/Presentation.php | UTF-8 | 4,281 | 2.53125 | 3 | [] | no_license | <?php
/**
* Author: Pavel Šesták
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\User;
use App\Models\Room;
use App\Models\Conference;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facade... | true |
071a26f3fec6011dc3cf580e50af87c1a4f2a42d | PHP | bencarter78/vandango | /app/Http/Controllers/Api/V1/UserManager/UserController.php | UTF-8 | 1,183 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api\V1\UserManager;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redis;
use App\UserManager\Users\UserRepository;
class UserController extends Controller
{
/**
* @var UserRepository
*/
private $users;
/**
... | true |
a233ada69bafdd9a2e7a8ae1980523576996331d | PHP | udistrital/migracion | /weboffice/clase/listado.class.php | UTF-8 | 10,013 | 2.59375 | 3 | [] | no_license | <?
/*--------------------------------------------------------------------------------------------------------------------------
@ Derechos de Autor: Vea el archivo LICENCIA.txt que viene con la distribucion
------------------------------------------------------------------------------------------------------------... | true |
c850716fc49bd4f537866b7761833059bf4e3cb9 | PHP | nericode/sysven-core-ui | /app/Http/Controllers/ProductController.php | UTF-8 | 2,432 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\src\Common\Entities\ProductEntity;
use App\src\Data\ProductInputSupplyRepository;
use App\src\Data\ProductRepository;
use App\src\Service\ProductInputSupplyUseCase;
use App\src\Service\ProductUseCase;
use Illuminate\Http\Request;
class ProductController
extends Contr... | true |
f2729046067b884c90e17990a91abd7807967262 | PHP | ebiram63/Exorter | /project-exporter/Exporter/TextExporter.php | UTF-8 | 523 | 3.09375 | 3 | [] | no_license | <?php
include "Exporter.php";
class TextExporter extends Exporter{
protected $format = '.txt';
public function export(){
// var_dump($this->data);
$file_name = "text-file-" . rand(100,999) . $this->format;
$file_path = __DIR__ . "/files/$file_name";
file_put_contents($file_pat... | true |
d3ce4563c53db1e8211745d92493fb081e9b1eea | PHP | mtaziz/dealschrome | /sagittaros-dealschrome-web-7972cef2add3152090edcbe650ba3356cad9c3af/dealschrome/protected/components/Filehelper.php | UTF-8 | 1,131 | 3.28125 | 3 | [] | no_license | <?php
class Filehelper {
/**
* cleanse a url to exclude non word tokens
* @param type $url
* @return type
*/
public static function cleanseUrl($url) {
return preg_replace("#\W#", "", $url);
}
/**
* recursively remove a directory
* @param type $dir
*/
p... | true |
ead5cf7931c088b0915abc360b130118b1ef2cb8 | PHP | max-fa/RecipeHub | /db/traits/get.php | UTF-8 | 2,201 | 2.796875 | 3 | [] | no_license | <?php
function traits_get($params,$pdo) {
if( isset( $params["trait_id"] ) ) {
return traits_get_one( $params["trait_id"],$pdo );
} else {
return traits_get_all($pdo);
}
}
function traits_get_all($pdo) {
$statement = $pdo->prepare("SELECT * FROM traits ORDER BY id");
if( $statement->exe... | true |
8884d327937f321d5c3bf4938a7ffa36f65cea10 | PHP | therealgambo/ramlfications-php | /src/Console/Commands/InspectRouteCommand.php | UTF-8 | 4,329 | 2.609375 | 3 | [] | no_license | <?php
namespace TheRealGambo\Ramlfications\Console\Commands;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Cil... | true |
5e99adc69f3fbbb4409b9cae70daa1a8819a3ba9 | PHP | monkeyphp/mphp-music-brainz | /src/MphpMusicBrainz/Adapter/Xml/ResultSet/AbstractResultSetAdapter.php | UTF-8 | 7,434 | 2.75 | 3 | [] | no_license | <?php
/**
* AbstractResultSetAdapter.php
*
* PHP Version PHP 5.3.10
*
* @category MphpMusicBrainz
* @package MphpMusicBrainz
* @subpackage MphpMusicBrainz\Adapter\Xml\ResultSet
* @author David White [monkeyphp] <git@monkeyphp.com>
*/
namespace MphpMusicBrainz\Adapter\Xml\ResultSet;
use DateTime;
use... | true |
299a2ce766f530e3a98543f3da836b2888f7742d | PHP | walanbeel/Ecom-store-project-1 | /app/models/admin/category.php | UTF-8 | 1,422 | 2.671875 | 3 | [] | no_license | <?PHP
require("app/models/database.php");
require("core/db.php");
class category{
public $db;
function __construct(){
$this->db=new DB();
}
function getparentCatergory(){
$cols=array('*');
$tbls=array("category");
return $this->db
->select($cols)
->from... | true |
c741e311ace95c0b8df1663c1c7d76b43aa59ff6 | PHP | leonredman/PHP-inventory-app | /login.php | UTF-8 | 3,203 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
session_start();
$host = "us-cdbr-iron-east-05.cleardb.net";
$username = "b6142378047cd5";
$password = "a549180b";
$database = "heroku_94df7b248ed20e6";
$message = "";
// if page breaks can use login tutorial https://www.youtube.com/watch?v=b-2_Y53CTYA
// connect to database with PDO try and ca... | true |
b6fb48227d29648038715c2fb9090a6acb8935d5 | PHP | ramon-b/php-json-schema-model-generator | /src/Model/Schema.php | UTF-8 | 3,928 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace PHPModelGenerator\Model;
use PHPModelGenerator\Model\Property\PropertyInterface;
use PHPModelGenerator\Model\SchemaDefinition\SchemaDefinitionDictionary;
use PHPModelGenerator\Model\Validator\PropertyValidatorInterface;
use PHPModelGenerator\PropertyProcessor\Decorator\Sche... | true |
2aa2a91963977fc90e2ee42aca2fb58d5b9122de | PHP | kakiikada/sql-study | /0122/favorite.php | UTF-8 | 932 | 2.875 | 3 | [] | no_license | <?php if(isset($_SESSION['customer'])): ?>
<table>
<th>商品番号</th>
<th>商品名</th>
<th>価格</th>
<?php
$pdo=new PDO('mysql:host=localhost;dbname=shop;charset=utf8',
'staff', 'password');
$sql=$pdo->prepare(
'select * from favorite, product '.
'where customer_id=? and product_id=id');
$s... | true |
37fc2ecc56e211f1e8b7718a8e99e5563e58b657 | PHP | sarthak1598/security-scripts | /python-penetration-testing-essentials/Chapter 7/htm_sql_web/basics/Strings.php | ISO-8859-1 | 4,457 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>
<?php
/*
echo "\x2a";... | true |
3a15c0ef77df01954819110b584d00f6b2fe828e | PHP | siukibo/PHP_learn | /OOP_Models_Database/Demo01_LT_HuongDoiTuong/clsNhanvien.php | UTF-8 | 629 | 3.40625 | 3 | [] | no_license | <?php
class clsNhanvien{
//khai báo các thuộc tính của lớp Nhanvien
public $manv;
public $hoten;
//khai báo hàm tạo
function clsNhanvien($manv, $hoten){
$this->manv = $manv;
$this->hoten = $hoten;
}
//khai báo một số hàm getter, setter
function getManv()
{
return $this->manv;
}
function setManv($manv)
... | true |
1028a2387b22352427c8373daa7eb750a49e3698 | PHP | hiscaler/backend-skeleton | /modules/admin/forms/CreditForm.php | UTF-8 | 608 | 2.5625 | 3 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\admin\forms;
use Yii;
use yii\base\Model;
/**
* 积分表单
*/
class CreditForm extends Model
{
public $credits;
public $remark;
public function rules()
{
return [
[['credits'], 'required'],
[['credits'], 'integer'],
[['remark'], 's... | true |
f23b1c75ec3c343e461dc63626c270b165204526 | PHP | salim-kobe/salim-watch-repo | /application/controllers/user/register/RegisterController.class.php | UTF-8 | 2,161 | 2.703125 | 3 | [] | no_license | <?php
session_start();
class RegisterController extends ConnexionUser
{
public function httpGetMethod(Http $http, array $queryFields)
{
}
public function httpPostMethod(Http $http, array $formFields)
{
//On instancie l'objet UserModel
$userModel = new UserModel();
//On vérifi... | true |
0efba0b06c357a777d93c7946e1a030c5c16a50f | PHP | GBozhilov/PHP-Web-Development-Basics | /19. INTERFACES AND ABSTRACTION/InterfacesAndAbstractionLab/02.Writer/index.php | UTF-8 | 274 | 2.671875 | 3 | [] | no_license | <?php
spl_autoload_register();
$writerName = 'JSON';
$writerName .= 'Writer';
$article = new Article('Title', 'Author', 20.5);
try {
$writer = Factory::getWriter($writerName);
echo $writer->write($article);
} catch (Exception $ex) {
echo $ex->getMessage();
} | true |
52c0241ff5a114def4f92baa797006c78cca4e3a | PHP | yangjiekang/apollo-config | /src/Repository.php | UTF-8 | 2,674 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Totoro\Apollo;
class Repository
{
/**
* The cache store implementation.
*
* @var \Illuminate\Contracts\Cache\Store
*/
protected $store;
/**
* Create a new cache repository instance.
*
* @param \Totoro\Apollo\Store $store
* @return void
*/
... | true |
ddb156c5ffc1522e0b9f316485a69e0f3a7d23ce | PHP | bernardyip/Recado | /model/CategoryTask.php | UTF-8 | 297 | 2.953125 | 3 | [] | no_license | <?php
class CategoryTask {
public $category;
public $tasks;
public $totalTaskCount;
public function __construct($category, $tasks, $totalTaskCount) {
$this->category = $category;
$this->tasks = $tasks;
$this->totalTaskCount = $totalTaskCount;
}
}
?> | true |
2611171c7cdd5ed54edbb51c85f5f075e66bf18d | PHP | hikaru-shindo/api-bundle | /tests/Resource/HeaderTest.php | UTF-8 | 417 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Saikootau\ApiBundle\Tests\Resource;
use PHPUnit\Framework\TestCase;
use Saikootau\ApiBundle\Resource\Header;
class HeaderTest extends TestCase
{
public function testObjectInitializesCorrectly(): void
{
$header = new Header('foo', 'bar');
$this->asser... | true |
453079637a4b6d20bb6e4a82027861d513679035 | PHP | Kubai-Ievhen/example_2 | /app/Http/Requests/Sessions/IndexSession.php | UTF-8 | 556 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Sessions;
use Illuminate\Foundation\Http\FormRequest;
class IndexSession extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
*... | true |
288bc28fe8bc1a341688a92293d65e8edabc1232 | PHP | francescodominidiato/katas | /gameoflife/first-version-of-game.php | UTF-8 | 3,497 | 3.359375 | 3 | [] | no_license | <?php
class Cell
{
private $state;
private $neighbours;
public function __construct($initialState)
{
$this->state = $initialState;
}
public function neighboursAre(array $neighbours)
{
$this->neighbours = $neighbours;
}
public function isAlive()
{
retu... | true |
80856b13e15f0e5a7f3785afc2176c1326a9d7e2 | PHP | marimokkori/php_crawl_for_test | /LIB_nntp.php | UTF-8 | 3,141 | 2.984375 | 3 | [] | no_license | <?php
function read_nntp_buffer($socket)
{
$this_line ="";
$buffer ="";
while($this_line!=".\r\n") // Read until lone . found on line
{
$this_line = fgets($socket); // Read line from socket
$buffer = $buffer . $this_line;
#
# UNCOMMENT TH... | true |
8c78c8658092d1cca75c0803786965c85ec78acc | PHP | DiazJorge/information-retrieval-methods | /booleano.php | UTF-8 | 10,659 | 3 | 3 | [] | no_license | <html>
<body bgcolor="#c3e4ee"></body>
<body>
<?php
$matriz;
class Pila
{
private $vector_pila;
public function __construct()
{
$this->vector_pila = array();
}
public function vacia()
{
if(empty( $this->vector_pila ))
... | true |
ac58fdb2f0401ef72c9ea3842dd0d8f3447f2054 | PHP | le01on/Home-Works-and-stady | /Databases/classes/AddressStreets.php | UTF-8 | 1,156 | 2.96875 | 3 | [] | no_license | <?php
require_once ($_SERVER['DOCUMENT_ROOT'] . '/lesson12/traits/SnakeCaseCamelCase.php');
class AddressStreets
{
use SnakeCaseCamelCase;
private $id;
private $cityId;
private $type;
private $name;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
... | true |
67251c124308eccb9904d2d4e2ca3bd84d6c76aa | PHP | kalesis/test-yii | /protected/modules/cruge/components/CrugeAccessControlFilter.php | UTF-8 | 2,554 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/* CrugeAccessControlFilter
Concede acceso en base a verificar si el nombre del controller y el action a ser usado
estan definidos en las operaciones creadas por el administrador de RBAC.
como funciona:
si este filtro es usado y un usuario quiere acceder al action: "site/contact"
entonces:
... | true |
bdad6215054c00b0a5b249ec8f1d3e9265775a18 | PHP | bayulalu/workshop | /app/Http/Controllers/FormController.php | UTF-8 | 2,661 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Auth;
use App\Models\Form;
use Illuminate\Http\Request;
class FormController extends Controller
{
public function index(Request $request)
{
// TODO 2 : 2.9 MEMBUAT SISTEM PENCARIAN PADA FORM
$search_q = urlencode($request->input('cari'));
i... | true |
196ed2a35ad07b7f357f16ba2c50a5e3499c8f83 | PHP | hoshime/2019techc | /public/edit-profile.php | UTF-8 | 1,755 | 2.78125 | 3 | [] | no_license | <?php
// 接続 ref. https://www.php.net/manual/ja/pdo.connections.php
$dbh = new PDO('mysql:host=database-2.cqezj6zrtivy.us-east-1.rds.amazonaws.com;dbname=bbs_db', 'admin', 'Hoshi1momo!');
$select_sth = $dbh->prepare('SELECT id, login_name, password, created_at FROM users WHERE login_name = :login_name');
$select_sth->ex... | true |
f93c49859eace80e6a07234167f93ba8663fbda8 | PHP | matthieubrenne/ecf-bibliotheque | /src/Controller/AuteurController.php | UTF-8 | 3,330 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Auteur;
use App\Form\AuteurType;
use App\Repository\AuteurRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\R... | true |
97c49ebeb489e8b00208b243f8f43e16e8e77783 | PHP | kanivip/doan | /GioHang.php | UTF-8 | 2,738 | 2.515625 | 3 | [] | no_license |
<?php include_once('includes/header.php') ?>
<style>
.Title ul{
display:flex;
padding:0px 5%;
}
.Title ul li{
padding:1% 50px;
width:200px;
height:100px;
border-top:1px solid red;
}
.Title ul li img{
width:100px;
height:100px;
}
.order{
display:flex;
padding:0px 5%;
}
</style>... | true |
bf4c4b175694d296b2c0dcdb2e11ab988c726744 | PHP | tariqmth/skylink-sdk | /src/Apis/V2/WebServicesExceptionMiddleware.php | UTF-8 | 847 | 2.59375 | 3 | [] | no_license | <?php
namespace RetailExpress\SkyLink\Sdk\Apis\V2;
use SoapFault;
class WebServicesExceptionMiddleware implements Middleware
{
const EXCEPTION_REGEX = '/^System.Web.Services.Protocols.SoapException: (.*?)\n/';
/**
* {@inheritdoc}
*/
public function execute($request, &$response, SoapFault $soap... | true |
d1cb488d189ff1a90ee1926cbffd927ea3f65653 | PHP | jaimeirazabal1/Sistema-de-Informaci-n-TEXTILES-DEL-PACIFICO | /models/Spend.php | UTF-8 | 1,443 | 2.6875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Spend
*
* @author JuliánAndrés
*/
class Spend {
private $code;
public function setCode($v... | true |
c38e3b6fa14dc51c7952314eae3de6530a66afde | PHP | mindaugasbarysas/php-statsd-exporter | /src/Metrics/MetricProcessor.php | UTF-8 | 3,568 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Metrics;
use App\Metrics\Backend\RedisBackend;
class MetricProcessor
{
/**
* @var RedisBackend
*/
protected $backend;
/**
* @var int
*/
protected $ttl;
/**
* @var array
*/
protected $quantiles = [0.5, 0.9, 0.99];
/**
* MetricProces... | true |
04023770082aae8fc2bb058a2cedd142428c8a0a | PHP | alikach97/eTrash | /objects/companies.php | UTF-8 | 1,950 | 2.9375 | 3 | [] | no_license | <?php
class Company{
// database connection and table name
private $conn;
private $table_name = "companies";
// object properties
public $cid;
public $name;
public $email;
public $username;
public $password;
// constructor with $db as database connection
public function _... | true |
58f6d37526853eb4575a452395dc8fa369ddc813 | PHP | qxy735/YuYiPHPFramework | /src/System/Database/Query.php | UTF-8 | 8,921 | 3 | 3 | [] | no_license | <?php namespace System\Database;
/**
* YuYi WorkRoom
*
* @version 1.1.0
* @author QIXIEYU
*/
use BadMethodCallException;
class Query
{
/**
* 数据库链接句柄
*
* @var
*/
public $connection;
/**
* where 条件
*
* @var string
*/
protected $where = '';
/**
* ... | true |
f2bc4ee4c4570e89e05d1a9704f0ad5a2d1300d1 | PHP | GoDoY-SP-/aula-php7-expressive | /src/CodeEmailMKT/Application/Action/TestePageAction.php | UTF-8 | 1,687 | 2.90625 | 3 | [] | no_license | <?php
namespace CodeEmailMKT\Application\Action;
use CodeEmailMKT\Domain\Entity\CustomerEntity;
use CodeEmailMKT\Domain\Persistence\CustomerRepositoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\HtmlResponse;
use Zend\Expressive\Template;
... | true |
b9d92f9c936148d43ec0e289f4482089ed1aba2a | PHP | DongChunL/Bicycle-rental-management-system | /main/News/list1.php | UTF-8 | 3,711 | 2.71875 | 3 | [] | no_license | <?php
header("content-type:text/html;charset=utf8");
date_default_timezone_set('Asia/Shanghai');
//连接数据库
$link = mysqli_connect('localhost','root','','garage');
if (!$link) {
die("连接失败:".mysqli_connect_error());
}
mysqli_query($link,"set names utf8");
$keyword = isset($_GET['keyword'])?$_GET['keyword']:"";
$page =... | true |
5739c726267a71d6fc6ed986dfc9b90d2b86a434 | PHP | erodriguezds/ActiveORM | /src/ConditionBlock.php | UTF-8 | 2,909 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace ActiveORM;
/**
* Represents a block of SQL conditions.
* @author Edu
*/
class ConditionBlock
{
protected $conditions;
protected $operator;
public function __construct($conditions, $operator = 'AND')
{
$this->conditions = is_string($conditions) ?
[ $conditions ] ... | true |
5512cde8dd078440b583ced90fdd2c8297c0f2f3 | PHP | JMRBDev/2DAW | /Desarrollo web en entorno Servidor/2 - PHP/Proyectos-Docker/ejercicios-php/html/ejercicios/28octubre/ejercicio3/www (1)/mercadoapp/Modelo/BaseProducto.php | UTF-8 | 4,160 | 3 | 3 | [
"Unlicense"
] | permissive | <?php
require_once('./Utiles/AbstractBaseDatos.php');
require_once('Entidades/Producto.php');
class BaseProducto extends AbstractBaseDatos{
/**
* Implementa la función abstract de AbsractBaseDatos
*/
/**
* Obtiene todos los elementos de Categoria
*/
public function obtener... | true |