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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5bf197952ff75c3966977ccc30f937b124ff6008 | PHP | boan-jfm/unbox | /src/BoxedReference.php | UTF-8 | 776 | 3.203125 | 3 | [] | no_license | <?php
namespace mindplay\unbox;
use Interop\Container\ContainerInterface;
/**
* This class implements a boxed reference to a component in a Container.
*/
class BoxedReference implements BoxedValueInterface
{
/**
* @var ContainerInterface
*/
private $container;
/**
* @var string
*/
... | true |
fbc7df035c4bb4bc4ec0918bb205011bcd815472 | PHP | hussy1995/hassan3 | /imgupload.php | UTF-8 | 1,191 | 2.546875 | 3 | [] | no_license | <?php
if(isset($_REQUEST['submit'])){
$imgfolder='images';
if(!is_dir($imgfolder)){
mkdir($imgfolder);
}
$userfolder=$imgfolder."/Hassan";
if(!is_dir($userfolder)){
mkdir($userfolder);
}
$imagepath1=$imgfolder."/".basename($_FILES["myfile"]["name"]);
... | true |
6f93de9f3d81d80693e5f9bda4bbaf6fa50aeceb | PHP | SekmSet/MicroService | /slim-skeleton/src/Application/Actions/Message/updateMessageAction.php | UTF-8 | 1,734 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Application\Actions\Message;
use App\Application\Actions\Action;
use App\Repository\MessageRepository;
use App\Repository\UserRepository;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Log\LoggerInterface;
class updateMessageAction extends Action
{
/**
* @var MessageReposit... | true |
71234382a757cf4b9ad32ab65c13618ad876fa31 | PHP | camerongchappell/cs313-php | /web/Assignments/Week 06/suitDetails.php | UTF-8 | 2,390 | 2.671875 | 3 | [] | no_license | <?php
require "dbConnect.php";
$db = get_db();
?>
<!DOCTYPE html>
<html>
<head>
<title>Spider-Man Suit Details</title>
<meta charset="utf-8">
<meta name="author" content="Cameron Chappell">
<link rel="shortcut icon" href="../../shared/favicon.ico" type="image/x-icon">
<link rel=... | true |
158f6b96b03de32c5aecfd1f09107e30658d99b1 | PHP | giorgoschar/Hotel-Booking-WDA | /cancel.php | UTF-8 | 4,900 | 2.6875 | 3 | [] | no_license | <?php
session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once "dbconn.php";
if(!isset($_SESSION["username"])) {
header("location:index.php?page=profile");
}
if(isset($_POST["bookingid"]) && !empty($_POST["bookingid... | true |
458eb619a539d63bd4cb91ecc0ccbb7de3921477 | PHP | drozzi-pro/admin-columns | /classes/Search/Settings/Column.php | UTF-8 | 1,530 | 2.78125 | 3 | [] | no_license | <?php
namespace ACP\Search\Settings;
use AC;
use AC\View;
use ACP;
class Column extends AC\Settings\Column implements AC\Settings\Header {
/**
* @var string
*/
private $search;
/**
* @return array
*/
protected function define_options() {
return [
'search' => 'on',
];
}
public function create_... | true |
7eef5709ba547f5f9c0d226a96ce94e50320b362 | PHP | RaphaelManke/chefkochWrapperToRDF | /library/utils.php | UTF-8 | 2,377 | 3.078125 | 3 | [] | no_license | <?php
include_once 'konstanten.php';
function after ($this, $inthat)
{
if (!is_bool(strpos($inthat, $this)))
return substr($inthat, strpos($inthat,$this)+strlen($this));
};
function after_last ($this, $inthat)
{
if (!is_bool(strrevpos($inthat, $this)))
return substr... | true |
fc4f712bfe281da929e2cde9047a88049487b69e | PHP | jancinert/magsql | /src/Universal/Query/DropDatabaseQuery.php | UTF-8 | 791 | 2.828125 | 3 | [
"BSD-4-Clause-UC"
] | permissive | <?php
namespace Magsql\Universal\Query;
use Magsql\ToSqlInterface;
use Magsql\ArgumentArray;
use Magsql\Driver\BaseDriver;
use Magsql\Driver\MySQLDriver;
use Magsql\Universal\Traits\IfExistsTrait;
class DropDatabaseQuery implements ToSqlInterface
{
use IfExistsTrait;
protected $dbName;
public function ... | true |
518aeb0dbcf820208951b8124cda8fc3ceb21862 | PHP | Fighter77777/rock-paper-scissors | /src/Utils/RockPaperScissors/GameLauncher.php | UTF-8 | 1,272 | 3.046875 | 3 | [] | no_license | <?php
namespace App\Utils\RockPaperScissors;
use App\Models\RockPaperScissors\GameSeries;
use App\Models\RockPaperScissors\PlayersCollection;
use App\Utils\RockPaperScissors\GameResults\PlayRoundInterface;
use \Iterator;
/**
* Class GameLauncher
*/
class GameLauncher
{
/**
* @var PlayRoundInterface
*... | true |
e655e196c4bcaf4384055cdfe2b70df0bcba4430 | PHP | newcommerce/jsforms | /php_incs/db.inc.php | UTF-8 | 4,472 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
$host = "";
$user = "";
$pass = "";
$db = "";
$lastQuery = "";
$mysql_con = mysql_connect($host, $user, $pass);
if(!$mysql_con)
{
// send me an email
header_status(500);
tastyError(1, "Couldn't connect to the database", 500);
}
mysql_select_db($db);
mysql_query("SET character_set_results = 'utf8', character... | true |
4f1cd3845aa5aa6f63289c1ac10af29767929be2 | PHP | wangshengli123456789/19kt | /app/Http/Controllers/RuleController.php | UTF-8 | 1,657 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 王胜利
* Date: 2018/10/29
* Time: 17:16
*/
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Http\Models\Rule;
use App\Http\Models\RoleRule;
class RuleController extends Controller
{
/**
* 添加权限
* @return \Illuminate\Contracts\View\Fac... | true |
9ecabedbe0c70f441524df32d1922990398f61f4 | PHP | MobiusSoftLtd/mobius-trader-api-php | /lib/MobiusTrader/Cache.php | UTF-8 | 1,251 | 2.71875 | 3 | [] | no_license | <?php
class MobiusTrader_Cache
{
private $_data = array();
public function __construct($config)
{
$this->config = array_merge(array(
'cache_enabled' => true,
'cache_path' => '/tmp/mt7.cache',
'cache_lifetime' => 60 * 5,
), $config);
$this->load(... | true |
8c9bd2e5117f242b309b236471f463a21bb2dafe | PHP | aniruddha-chakraborty/tax | /database/migrations/2016_04_02_204604_create_shopkeeper_table.php | UTF-8 | 871 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateShopkeeperTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shopkeeper', function (Blueprint $table) {
... | true |
bd057c9b69f9429ff845d0a291b00427941e5a10 | PHP | sebajax/sis_maletas | /application/controllers/ConsultaBdo.php | UTF-8 | 5,089 | 2.578125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Description of ConsultaBdo
*
* @author sebastian.ituarte@gmail.com
*/
class ConsultaBdo extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model(array('ConsultaBdo_model'));
... | true |
afa7210d0c9b3232e5931262ce96ae154f760342 | PHP | thepain123/hydroponic | /BackEnd/database/seeds/DevicesTableSeeder.php | UTF-8 | 1,766 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use App\Devices;
class DevicesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$devices = [
[
'user_id' => 2,
"... | true |
68d5a4d3a32f2a5c80d6f19ec1996238ba8966bf | PHP | antvolin/payment_callback | /application/libraries/Services/OrderService.php | UTF-8 | 669 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Lib\Services;
use Lib\Entity\Order\Order;
use Lib\Exception\OrderIdFieldSizeException;
use Lib\Repository\OrderRepositoryInterface;
class OrderService
{
private OrderRepositoryInterface $repository;
private Order $order;
/**
* @param OrderRepositoryInterface $repository
* @para... | true |
d88125b4c4f7e4a59c321de4207bec9be8e4226b | PHP | architrave-de/brainloop-soap-php | /src/StructType/Milestone.php | UTF-8 | 3,227 | 2.671875 | 3 | [] | no_license | <?php
namespace Brainloop\Soap\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for Milestone StructType
* Meta informations extracted from the WSDL
* - nillable: true
* - type: tns:Milestone
* @subpackage Structs
* @generated on Tue, 07 Nov 17 12 44
*/
class Milestone extend... | true |
1723fbca07c75b5a58ecd6209568196cff8d4015 | PHP | ceronarciad/thudev | /app/Http/Controllers/ProductController.php | UTF-8 | 4,420 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CreateProductRequest;
use App\Http\Requests\UpdateProductRequest;
use App\Repositories\ProductRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
class ProductController extends AppBaseController
{
... | true |
57ad2bb09b19e4b9101777a3c3bffb64a8d7fc92 | PHP | Azzyxec/pms | /app/entities/User.php | UTF-8 | 340 | 2.859375 | 3 | [] | no_license | <?php
namespace Pms\Entities;
class User {
public $id;
public $type;
public $name;
public $password;
public $doctorId;
public $locationId;
function __construct(){
$this->id = "-1";
$this->type = "-1";
$this->name = "-1";
$this->doctorId = "-1";
$this->password = "";
$this->loca... | true |
77e069a0e57e464903dc74c5c581f018796009fd | PHP | RetaxMaster/SchoolMedia | /phplib/planes.php | UTF-8 | 2,548 | 2.609375 | 3 | [] | no_license | <?php
/*
tbl_acadplans
id_plan
tiempodura
id_modalidad
temario
prerrequisitos
perfil
objetivos
titulo
fcreac
urldoc
lstenabled
*/
// Crea una nueva ubicación
function plans_createRecord($tiempodura, $id_modalidad, $temario, $prerrequisitos, $perfil, $objetivos, $título, $fcre... | true |
6ba6b5fdcd437796ee196eb31a57c07496a17211 | PHP | SamuilovAD/certification-demo | /src/Controller/Grow/GrowController.php | UTF-8 | 9,868 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Controller\Grow;
use App\Entity\Grow;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class GrowController extends AbstractController{
private $userFunct... | true |
89dc7114d149c37eedbddada71105d0b3f9266dc | PHP | webexfavorhero/EcommercePortal | /findmyrice/app/controllers/ContactController.php | UTF-8 | 1,525 | 2.546875 | 3 | [] | no_license | <?php
namespace Findmyrice\Controllers;
use Aws\CloudFront\Exception\Exception;
use Phalcon\Tag;
use Findmyrice\Forms\ContactForm;
use Findmyrice\Models\ContactUs;
use Findmyrice\Mail\Mail;
/**
* Findmyrice\Controllers\UsersController
* CRUD to manage users
*/
class ContactController extends ControllerBase
{
p... | true |
751edc14dd9348f090800d58aff40a27e127adf9 | PHP | fagray/warevent-snippet | /Warevent/AccessValidator/Contracts/AccessValidatorRepository.php | UTF-8 | 221 | 2.640625 | 3 | [] | no_license | <?php
namespace Warevent\AccessValidator\Contracts;
interface AccessValidatorRepository {
/**
* Determines if the user is authorize to perform the specified ability.
*/
public function isAuthorizeTo($ability);
} | true |
50e393bb70ed9b7420856335069c7065f52ff16f | PHP | munhing/llpm | /app/LLPM/Containers/ContainerDaysCalculationByWorkOrder.php | UTF-8 | 1,703 | 2.921875 | 3 | [] | no_license | <?php
namespace LLPM\Containers;
use Activity;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
use LLPM\Containers\CalculateContainerDays2;
use LLPM\Repositories\ContainerRepository;
class ContainerDaysCalculationByWorkOrder
{
protected $containerRepository;
protected $calculateContainerDays;
funct... | true |
d8834cbaed1105fbb92acf0dd8b75196454fec72 | PHP | niieq/diy | /manage.php | UTF-8 | 2,214 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
require_once 'vendor/autoload.php';
require_once 'libs/sqlobjects/generated-conf/config.php';
require_once 'libs/Autoload.php';
new Autoload('libs/base/');
if(!isset($argv[1])) $argv[1] = "";
switch($argv[1]){
case "":
print("No argument was passed. Please use `php m... | true |
64b5610ff9e4a9a440d303b6c412c94f10bc9b61 | PHP | WillZWL/project | /simplyelectronics.net/admincentre/reports/pmgw_report_service.php | UTF-8 | 34,159 | 2.609375 | 3 | [] | no_license | <?php
include_once "../database.php";
abstract class Pmgw_report_service
{
private $create_on;
private $create_at;
private $create_by;
abstract public function get_pmgw();
abstract public function is_ria_record($dto_obj);
abstract public function is_refund_record($dto_obj);
abstract public function... | true |
b349064c1c7dcfc8a5e33b0c35a66320821802b4 | PHP | andreVasco/equipe4 | /php/album-fotos.php | UTF-8 | 564 | 2.640625 | 3 | [] | no_license |
<html>
<?php
$msg= false;
$id = $_GET['id'];
$imagem = $_POST["imagem"];
//abre a conexão
$conexao = mysqli_connect('localhost', 'root','', 'oreman');
//cria a query
$query = "INSERT INTO detalhesproduto (albumid, endereco) VALUES ({$id}, '{$imagem}') ";
//verifica sucesso ou falha
if(mysqli_query($conexao, $q... | true |
db49e29cca76696b70a16608d2399974aa2bb6a7 | PHP | iqbalhossen999/hostel-mgt | /libraries/user.class.php | UTF-8 | 1,227 | 2.71875 | 3 | [] | no_license | <?php
class User{
private $userinfo;
private $timeout;
function user(){
if(!empty($_SESSION['user'])){
if((time()-$_SESSION['start']) < 900 ){ //Auto Session Timeout at 15 Minutes (900 Sec)
session_name("BUP_Hall");
$this->userinfo = $_SESSION['user'];
$_SESSION['start'] = time();
//$this->t... | true |
dc35ad2b456bebf90351aad6c3ce748a39394592 | PHP | askmattcairns/mvc-starter | /index.php | UTF-8 | 1,038 | 2.515625 | 3 | [] | no_license | <?php
// Fix headers to keep the Facebook session in place.
header('p3p: CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"');
$default_controller = 'contest';
$default_function = 'index';
$param = NULL;
// Load Controller
$controller = $default_controller;
if (
array_key_exists( 'c', $_GET )
&& file_exists( '... | true |
08eabd01aaac173921a1f81336415c435d3927d7 | PHP | quebone/campusapp | /service/IngredientsService.php | UTF-8 | 3,218 | 2.796875 | 3 | [] | no_license | <?php
namespace Campusapp\Service;
use Campusapp\Service\Entities\Ingredient;
use Campusapp\Exceptions\DuplicatedInstanceException;
class IngredientsService extends Service
{
public function __construct() {
parent::__construct();
}
public function getIngredients(): array {
try {
... | true |
cf6f37b2c83f491f0144391261b35f598eb039a1 | PHP | albawebstudio/petfinder-api | /src/PetfinderConnector.php | UTF-8 | 6,899 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace albawebstudio\PetfinderApi;
use albawebstudio\PetfinderApi\exceptions\InvalidAuthorizationException;
use albawebstudio\PetfinderApi\exceptions\InvalidRequestException;
use albawebstudio\PetfinderApi\exceptions\PetfinderConnectorException;
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\... | true |
00a46db0301693bcb294f49fe26a52b0abc2904b | PHP | IonBazan/laravel-container-debug | /src/Helper/ContainerHelper.php | UTF-8 | 2,802 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace IonBazan\Laravel\ContainerDebug\Helper;
use Illuminate\Container\Container;
class ContainerHelper
{
/**
* @var Container
*/
private $container;
public function __construct(Container $container)
{
$this->container = $container;
}
public function getContainer... | true |
2ef61e403aa11853fec0a1a063e8e810c244d9df | PHP | marosolutions/marketing-php | /src/Contacts.php | UTF-8 | 15,037 | 2.8125 | 3 | [] | no_license | <?php
namespace Maropost\Api;
use Maropost\Api\Abstractions\OperationResult;
use Maropost\Api\Abstractions\Api;
use Maropost\Api\ResultTypes\GetResult;
/**
* Class Contacts
* @package Maropost\Api
*/
class Contacts
{
use Api;
/**
* Contacts constructor.
* @param $accountId
* @param $authTo... | true |
b7805b6470b0e7eabfb776ee263f6550354f5a99 | PHP | kradwhite/mytarget-api-client | /src/resources/advert_objects/Banners.php | UTF-8 | 804 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: Aleksandrov Artem
* Date: 21.10.2019
* Time: 7:55
*/
namespace kradwhite\myTarget\api\resources\advert_objects;
use kradwhite\myTarget\api\resources\Resource;
/**
* Ресурс, позволяющий получить список всех рекламных объявлений пользователя.
* Создание баннеров осуществляется с помощью ресурса... | true |
66b0826bc8cfeddc3a185af5b6a261efaa8ded25 | PHP | kheangp/biblio_kheang2 | /livres/livrelisthomep.php | UTF-8 | 3,341 | 2.796875 | 3 | [] | no_license |
<?php
/**** LISTE DES LIVRES SUR HOMEPAGE **/
/*************************************/
// $servname = "localhost"; $dbname = "bd_kheang_biblio"; $user = "root"; $pass = "";
try{
// $dbco = new PDO("mysql:host=$servnam... | true |
cad44ae9e8d544d4af4fc0db7fe9a4c60d2b2851 | PHP | mjacobus/php-query-builder | /lib/PO/QueryBuilder/Clauses/SetClause.php | UTF-8 | 1,598 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace PO\QueryBuilder\Clauses;
/**
* @author Marcelo Jacobus <marcelo.jacobus@gmail.com>
*/
class SetClause extends Base
{
/**
* Set (override) the values to be set
*
* @param array $values
* @return PO\QueryBuilder\SetClause
*/
public function set(ar... | true |
7939198a9a412f326563407de92fe716ccb0a06c | PHP | arif161/ThekeJao-Home-Rent-System | /index.php | UTF-8 | 3,778 | 2.53125 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML Page Header</title>
<link rel="stylesheet" href="css/semantic.min.css">
<?php require_once('db_config.php'); ?>
</head>
<body>
<div
style="text-align: center ;background-color:#B0E0E6; padding: 7%;">
<h1>Welcome To Home Rent... | true |
eac14e54aae5d748a10479175fdd1b0a25de48ed | PHP | Vishalhari/Student-Management | /database/seeds/TermsSeeder.php | UTF-8 | 823 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\model\Terms;
use Carbon\Carbon;
class TermsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Terms::insert([
'terms' => 'One',
'created_at' => Carbon::now()->f... | true |
d6e7ebbbb97baba60ebe2c539d2394f40bd8ccb4 | PHP | EQ4/smafe | /smintapi/lib/VersionService.php | UTF-8 | 359 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class VersionService extends RestService {
public function __construct() {
parent::__construct("get");
}
public function performGet($url, $arguments, $accept) {
$version = new Version($url, $arguments, $accept);
$response = $version->getResponseObject($this->getResponseContentType());
$t... | true |
9315ede0dfcc280566c6b49c055b48145b1c8582 | PHP | yanwan12/Web_ISEN | /ProjetWeb/inscription.php | UTF-8 | 3,871 | 2.515625 | 3 | [] | no_license | <?php
require 'init.php';
if(!empty($_POST)){
$errors = array();
$db = App::getDatabase();
$valid= new Validateur($_POST, $db);
$valid->isUniq('mail', $db, 'Un utilisateur est déjà enregistré a cette adresse !');
if($valid->isValid()){
App::getUser()->nouvuser($db, $_POST['nom'],$_POST['pnom'],$_POST['mail'],$_... | true |
da45288b9ce9254a217b50cbfc1abe54f4a5e575 | PHP | DiegoPino/datapackage-php | /src/DataStreams/DefaultDataStream.php | UTF-8 | 1,801 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace frictionlessdata\datapackage\DataStreams;
use frictionlessdata\datapackage\Exceptions\DataStreamOpenException;
/**
* streams the raw data without processing - used for default data package resources.
*/
class DefaultDataStream extends BaseDataStream
{
public $fopenResource;
/**
* @par... | true |
b09b7d9d1850bd7d0f15b22eb72eb84e13d03f0c | PHP | armasmontse/bexponencial | /database/migrations/2018_10_23_141020_create_schools_table.php | UTF-8 | 1,697 | 2.703125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSchoolsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('schools', funct... | true |
f02c17b246ad753f7d68ea85a7f729cd7b5720ea | PHP | Urik/Web-Architecture-Project | /Others/PeticionDeCobertura.php | UTF-8 | 3,527 | 3.046875 | 3 | [] | no_license | <?php
/*
*/
/**
* Description of PeticionDeCobertura
*
* @author Usuario
*/
class PeticionDeCobertura extends Thing {
/** @var Cliente */
private $cliente;
private $modelo = 0;
private $sumaAsegurada = 0000000.0000;
private $datos = "";
private $aprobada = false;
/** @var Insurance... | true |
dfe2dc3b8a3e255a1a2964070ffe91b988746bae | PHP | chrisaugustsson/weatherService | /src/WeatherService/WeatherController.php | UTF-8 | 2,184 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Anax\WeatherService;
use Anax\Commons\ContainerInjectableInterface;
use Anax\Commons\ContainerInjectableTrait;
class WeatherController implements ContainerInjectableInterface
{
use ContainerInjectableTrait;
public function indexActionGet()
{
$title = "Forecast from IP";
... | true |
00ab0ea4e1758c628088f5aa04bdc89d057a725d | PHP | linegg/LeetCodePHP | /scripts/L141_LinkedListCycle.php | UTF-8 | 656 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: linyz
* Date: 2020/4/12
* Time: 21:11
*/
namespace app\scripts;
require_once '../autoload.php';
use app\lib\ToolUtil;
class L141_LinkedListCycle
{
/**
* @param ListNode $head
* @return Boolean
*/
function hasCycle($head) {
$p = $head;
... | true |
cc915e725f37e65559f845bff72a53280bac3c25 | PHP | Ivanky1/www | /factory.php | UTF-8 | 893 | 3.453125 | 3 | [] | no_license | <?php
abstract class ImageType {
protected $type;
public function returnType() {
return $this->type;
}
}
class GIFType extends ImageType {
function __construct() {
$this->type = "GIF";
}
}
class JPGType extends ImageType {
function __construct() {
$thi... | true |
d5b64fbe162671e3022f58eeac93952fc5ada743 | PHP | mughu94/WowFramework | /src/Wow/Net/Route.php | UTF-8 | 6,044 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Wow\Net;
/**
* The Route class is responsible for routing an HTTP request to
* an assigned callback function. The Router tries to match the
* requested URL against a series of URL patterns.
*/
class Route {
/**
* @var string URL pattern
... | true |
827d2f2ed9282b16d4ec6a8a67ddae36f5622607 | PHP | MultiSafepay/PHP | /controllers/notificationController.php | UTF-8 | 1,130 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
include('../config/config.php');
$notification = new notificationController();
if (isset($_GET['type'])) {
$notification->linkNotification();
} else {
$notification->updateOrder();
}
class notificationController {
/**
* This function is used for Notification urls that are beeing used to update the ... | true |
35c0ad07b9e60c5dfd891e06991fef9f1fd5e2b7 | PHP | zhangsw2613/qframework | /qframework/logs/Logs.php | UTF-8 | 1,273 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Q框架
* @package Qframework
* @author 北海有鱼(zhangsw2613@163.com)
* @since Version 1.0.0
*/
namespace qframework\logs;
use qframework;
class Logs
{
protected static $conf = [];
public function __construct()
{
if (self::$conf == []) {
self::$conf = Q... | true |
938ee9328257f07aa6a2150e39128e02f4fd9c4a | PHP | bimandika/files_antivirus | /lib/AppConfig.php | UTF-8 | 4,872 | 2.609375 | 3 | [] | no_license | <?php
/**
* Copyright (c) 2015 Victor Dubiniuk <victor.dubiniuk@gmail.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace OCA\Files_Antivirus;
use \OCP\IConfig;
/**
* @method string getAvMode()
* @method string getAvSocket()
*... | true |
be156f0fba3840f3c68aace63eaf1402e814053d | PHP | Manzadey/stream-telecom | /src/Email/EmailResponse.php | UTF-8 | 932 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Manzadey\StreamTelecom\Email;
class EmailResponse
{
protected $success = false;
protected $msg;
protected $data;
/**
* EmailResponse constructor.
*
* @param array $response
*/
public function __construct(array $response)
{
foreach ($response['respon... | true |
0ef6ee73704bcec82b39fa6e00615d6de6c3eee3 | PHP | gowthamvn/ktask_2 | /edit_event.php | UTF-8 | 2,949 | 2.5625 | 3 | [] | no_license | <?php
@session_start();
include("dbconnect.php");
$id=$_GET['id'];
include("dbconnect.php");
$result=mysqli_query($con,"select * from events where id='$id' ");
$result=mysqli_fetch_array($result);
$location=$result['location'];
$date=$result['date'];
$Organiser=$result['Organiser'];
$Contact=$result['Co... | true |
14819b2daf9295448d228ca5fa3e23bf32570d00 | PHP | jeansucanada/cscie15P4 | /database/seeds/TagsTableSeeder.php | UTF-8 | 443 | 2.875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class TagsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = ['Happy','Angry','Sad','Easy','Busy','Dizzy','Crazy','Messy','Noisy','Grumpy','Funny','Jolly'];
foreach($data a... | true |
1e8c3b8703222602fb14ccfb506b71227098f529 | PHP | katatk/real-estate | /process/register-processing.php | UTF-8 | 3,812 | 2.9375 | 3 | [] | no_license | <?php
session_start();
// user can only access process/register-processing via the POST method, not GET (typing directly into the address bar)
if (empty($_POST['submit'])) {
header('Location: ../register');
die();
}
include_once '../inc/validation.php';
include_once '../inc/config.php';
// set the ... | true |
2dba73726ff497915e6403d82778796f8dda1972 | PHP | gismo-framework/gismo | /src/api/src/Api/GoDiService_Api_Property.php | UTF-8 | 642 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: matthes
* Date: 09.08.16
* Time: 20:11
*/
namespace Gismo\Component\Api;
use Gismo\Component\Api\Container\Procedure;
use Gismo\Component\Di\DiContainer;
class GoDiService_Api_Property {
/**
* @var DiContainer
... | true |
235ba9aa6972909f3a50d46dbff189d55c357ae1 | PHP | bruno-chavez/WakandaMobile | /app/Http/Controllers/Auth/DivisionLoginController.php | UTF-8 | 1,355 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
class DivisionLoginController extends Controller
{
public function __construct() {
$this->middleware('guest');
}
public function showLoginForm() {
// Verifica el tipo d... | true |
2ea4dd6e6a46d08865f0ebf83f53b2d4c8713066 | PHP | kiannsewell/perpus | /app/Models/Book.php | UTF-8 | 638 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Book extends Model
{
use HasFactory;
protected $fillable = ['title', 'code', 'writer', 'publisher', 'year', 'photo', 'rack_id'];
public function rack()
{
return $thi... | true |
9657cccac3458e5ab5bc7a57fd5b2eaa0f54e6b6 | PHP | DanielCender/CST-126-Projects | /activity6/myfuncs.php | UTF-8 | 1,164 | 3.125 | 3 | [] | no_license | <?php
/*
* Project: activity6
* Module Name: activity6
* Author: Daniel Cender
* Date: April 7, 2019
* Synopsis: This file holds a function that returns a connection to the MySQL database.
*/
// Below -> Safely get Env Vars, per https://secure.php.net/manual/en/function.getenv.php
$user = (getenv('CLEARDB_DATABA... | true |
060ee010c610918bb30b796193698ef1c45e6406 | PHP | shadowdestiny/dockenizacion | /src/apps/web/services/card_payment_providers/GCPCardPaymentProvider.php | UTF-8 | 1,650 | 2.59375 | 3 | [] | no_license | <?php
namespace EuroMillions\web\services\card_payment_providers;
use EuroMillions\shared\vo\results\PaymentProviderResult;
use EuroMillions\web\entities\User;
use EuroMillions\web\interfaces\ICardPaymentProvider;
use EuroMillions\web\interfaces\IHandlerPaymentGateway;
use EuroMillions\web\services\card_payment_pro... | true |
5d8af7a0171dbf49c136d84cd76ea1e504fad159 | PHP | DanPurdy/Backup-Diary | /session/list_timetable.php | UTF-8 | 4,670 | 2.84375 | 3 | [] | no_license | <?php
require('includes/pdoconnection.php');
function __autoload($class_name) {
include 'models/class_'.$class_name . '.php';
}
$dbh = dbConn::getConnection();
$session= new session($dbh);
if(!isset($_GET['week'])){
$weekNum = 0;
}else{
$weekNum= htmlentities($_GET['week']);
}
$result=$session->listWeek... | true |
61f226a4dc073f90416fd64c425bbe131a2c1104 | PHP | chuznoob/CMK | /lib/class/Productos.php | UTF-8 | 3,397 | 3.015625 | 3 | [] | no_license | <?php
require_once 'Conexion.php';
class Productos
{
private $con;
private $id_producto;
private $proveedores_id_proveedor;
private $categoria_id_Categoria;
private $nom_producto;
private $pre_producto;
private $can_producto;
public function __construct()
{
$this->con = Conexion::singleton_conexion();
}
//-----... | true |
ef51ffe894326e30d71f85cfec98bf84a69294fc | PHP | lynngarfield13/portfolio-php | /send_email.php | UTF-8 | 2,457 | 3.0625 | 3 | [] | no_license |
<?php
$contact_name = filter_input(INPUT_POST, 'contactName');
$from_email = filter_input(INPUT_POST, 'contactEmail');
$subject= filter_input(INPUT_POST, 'contactSubject');
$message= filter_input(INPUT_POST, 'contactMessage');
/*// $message = str_replace("\n", "n\", $message);
... | true |
8ee46fdb331a988d9b1dedefa767fa398a3fd684 | PHP | sagol/geojoy | /protected/models/users/RecoveryPasswordForm.php | UTF-8 | 1,935 | 2.734375 | 3 | [] | no_license | <?php
namespace app\models\users;
/**
* Форма восстановления пароля
*/
class RecoveryPasswordForm extends \CFormModel {
/**
* Email
* @var string
*/
public $email;
/**
* Правила валидации модели
* @return array
*/
public function rules() {
return array(
array('email', 'checkFields'),
);... | true |
fed5fbdf6667bb3aea51d2c15303cfcaa44a842c | PHP | pawelhanusik/31337cms | /admin/functions.php | UTF-8 | 1,666 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
function getArticles($filter){
$articles = [];
$articlesPaths = [];
if($filter !== "internal"){
$articlesPaths = array_merge($articlesPaths, glob("../articles/homepage/*"));
$articlesPaths = array_merge($articlesPaths, glob("../articles/homepage/.??*"));
}
if($filter !== "homepage"){
$artic... | true |
ef8ba9f8916bc701ada06287b47ebb814140ecfc | PHP | dimor22/family-photo-wp | /template-parts/family-unit.php | UTF-8 | 2,024 | 2.703125 | 3 | [] | no_license | <?php
$users = get_users(['orderby' => 'user_registered', 'order' => 'DESC']);
$user_ids = [];
foreach( $users as $user ) {
$user_ids[] = $user->ID;
}
foreach ($user_ids as $user_id) {
$args = array(
'post_type' => 'familiares',
'author' => $user_id
);
$query = new WP_Query( $args )... | true |
d1a610cee92a36279884ca37e37a393757f403c5 | PHP | MuhonenN/projekti_php | /userauth.php | UTF-8 | 1,655 | 2.828125 | 3 | [] | no_license | <?php
require_once('connectdb.php');
function register($username, $email, $password)
{
$conn = db_connect();
$result = $conn->query("select 1 from kayttajat where kayttajanimi = '$username'");
if (!$result) {
throw new Exception('Toimintoa ei pysty suorittaa');
}
if ($result->num_rows > ... | true |
4beac0016296128ef4bc738502cf06d9cb99e228 | PHP | optiguy/Playground | /globals.php | UTF-8 | 1,176 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
</head>
<body>
<h1>Super Globals</h1>
<h2>Alle Super globals er Multidimensionelle arrays</h2>
<pre>
<?php
print_r($GLOBALS); //Indholder alle Globals ... | true |
4d2af96885d847c773203ffac26a11dfc24d10e9 | PHP | bobthecow/psysh | /src/TabCompletion/Matcher/AbstractMatcher.php | UTF-8 | 4,910 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Psy Shell.
*
* (c) 2012-2023 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Psy\TabCompletion\Matcher;
/**
* Abstract tab completion Matcher.
*
* @author Marc Garcia <... | true |
c85d8b77601c06db2830e7fd66d6cd5222198cd6 | PHP | Kyoushu/Genny | /src/Kyoushu/Genny/Bundle/Console/Command/PageGeneratorCommand.php | UTF-8 | 1,584 | 2.59375 | 3 | [] | no_license | <?php
namespace Kyoushu\Genny\Bundle\Console\Command;
use Kyoushu\Genny\Bundle\Generator\PageGenerator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class P... | true |
7d50b327f9108925018719879ba6a9524e3c4ae5 | PHP | wererLinC/- | /shequ/Application/Admin/Model/AdminModel.class.php | UTF-8 | 1,187 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 伟林 陈
* Date: 2018/5/10
* Time: 23:37
*/
namespace Admin\Model;
use Think\Model;
class AdminModel extends Model{
private $_db = '';
public function __construct(){
$this->_db = M('admin');
}
/*
* 管理员信息的插入
*/
public function insertAdmin($data=array... | true |
37e68488866d60b88e57f7c4d945609788af625b | PHP | vaoyan/tmzbsi | /kwitansi/lib/lib-function.php | UTF-8 | 10,977 | 2.6875 | 3 | [] | no_license | <?php
/*
*Library untuk pemmbuatan aplikasi-aplikasi sederhana
*Oleh : Oyan Cresys
*www.facebook.com/oyancresys
*/
require('kwt-config.php');
Class Fungsi extends KwtConfig{
function Terbilang($satuan){
$huruf = array("","S A T U","D U A","T I G A","E M P A T","L I M A","E N A M","T U J U H","D E L A P A N","S ... | true |
77e66b32a4f931f5d6a331e5d8b26e8a3001b668 | PHP | biletnam/cms-m | /protected/modules/catalog/models/LoadpriceForm.php | UTF-8 | 954 | 2.859375 | 3 | [] | no_license | <?php
/**
* ContactForm class.
* ContactForm is the data structure for keeping
* contact form data. It is used by the 'contact' action of 'SiteController'.
*/
class LoadpriceForm extends CFormModel
{
public $pricetype;
public $filename;
/**
* Declares the validation rules.
*/
public function rules()
{
... | true |
ba7c3dd039d4e3037415ac05458af4a4a9a84991 | PHP | kohler/hotcrp | /lib/jwtparser.php | UTF-8 | 8,605 | 3.015625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"BSD-3-Clause"
] | permissive | <?php
// jwtparser.php -- HotCRP class for limited parsing of JSON Web Tokens
// Copyright (c) 2022 Eddie Kohler; see LICENSE.
class JWTParser extends MessageSet {
/** @var ?object */
public $jose;
/** @var ?object */
public $payload;
/** @var ?string */
public $verify_key;
/** @var bool */... | true |
e694175e1073dcc232f2e9450c701fbb414ba24f | PHP | corePHP/wp-for-joomla | /wp15/src/plugins/search/wordpress.php | UTF-8 | 5,736 | 2.546875 | 3 | [] | no_license | <?php
/**
* @package WordPress for Joomla!
* @copyright Copyright (C) 2010 'corePHP'. All rights reserved.
* @license GNU/GPL 2.0
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
class plgSearchWordpress extends JPlugin
{
public function __construct(& $subject, $config)
{
parent::__... | true |
3408fd138de5ba9b7a5e1b7d1200f35c04c6dce7 | PHP | Adamage8/probafeladat | /src/AppBundle/Entity/User.php | UTF-8 | 4,721 | 2.71875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="user")
* @ORM\Entity()
*/
class User implements Us... | true |
2a0d712b36c3106c3c5b2f7208a0885095b60afe | PHP | davidthorn/davidthorn.net | /content/ajax/controllers/ajax.controller.php | UTF-8 | 1,278 | 2.59375 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of tutorials
*
* @author david
*/
class AjaxControllerAjax extends Controller {
public function __construct() {
Logger::debug('Controller [ HomeControllerHome ... | true |
5204056e97b6c1b085b056236a929d3700482a40 | PHP | JackDragon/telebears_checker | /showall.php | UTF-8 | 3,004 | 2.890625 | 3 | [] | no_license | <html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<Title>Class Search Results - All</Title>
</head>
<body>
<h1>Course Info</h1>
<p>Here are the stats for all classes in database.</p>
<?php
include "dbinfo.php";
// DB connection info
//TODO: Update the values for $host, $user, $pwd, and ... | true |
8c8e578c3e75d06fbf3d65eecab761793385be95 | PHP | victorybiz/CodeNimbly | /system/core/language.class.php | UTF-8 | 2,565 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php defined('PATH_ACCESS') or exit("NO DICE! Don't Play Too Smart.");
/**
* Language Class
*
* Set and get Language $lang data items
*
* @package CodeNimbly
* @subpackage Libraries
* @category Core
* @since Version 1.0
*/
class Language {
protected $lang;
protected $lang_meta;
protec... | true |
528b9db74527c1265a3dafae3a8af07b4c9a57cc | PHP | Ocramius/zfr-oauth2-server | /src/ZfrOAuth2/Server/Service/ScopeService.php | UTF-8 | 2,294 | 2.625 | 3 | [] | no_license | <?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS B... | true |
051d266a7b46fb020b53eed6b027b05031afe12c | PHP | sinniger/test | /src/Sinniger/TestBundle/Entity/Profile.php | UTF-8 | 7,444 | 2.546875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Sinniger\TestBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* Profile
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Sinniger\TestB... | true |
b7b819debc3a7ac3ed4c06459ab396def09ef082 | PHP | kumar9vijay/Github-sample | /wp-content/plugins/astra-addon/classes/deprecated/deprecated-functions.php | UTF-8 | 25,449 | 2.828125 | 3 | [] | no_license | <?php
/**
* Deprecated Functions of Astra Addon.
*
* @package Astra
* @author Astra
* @copyright Copyright (c) 2020, Astra
* @link https://wpastra.com/
* @since Astra 1.6.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'astar' ) ) :
/**
* Get a specific proper... | true |
41cd8778fd61f5f9ac16eae2f3b5c0381feef9a5 | PHP | mhndev/trycatch | /app/Controllers/UserController.php | UTF-8 | 3,511 | 2.5625 | 3 | [] | no_license | <?php
namespace mhndev\trycatch\Controllers;
use mhndev\NanoFramework\Http\Response;
use mhndev\NanoFramework\Ioc\Interfaces\iContainer;
use mhndev\NanoFrameworkSkeleton\Controllers\BaseController;
use mhndev\trycatch\Models\User;
use mhndev\trycatch\Repository\csv\UserRepository;
use mhndev\trycatch\ValueObjects\Jso... | true |
4a15d412c8e04857b5dd378e5f2b9ad3eeb3d398 | PHP | xiaocaigua/base-server | /src/Server/Plugin/PluginInterfaceManager.php | UTF-8 | 5,653 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 白猫
* Date: 2019/4/18
* Time: 12:24
*/
namespace GoSwoole\BaseServer\Server\Plugin;
use GoSwoole\BaseServer\Coroutine\Channel;
use GoSwoole\BaseServer\Event\EventDispatcher;
use GoSwoole\BaseServer\Exception;
use GoSwoole\BaseServer\Server\Context;
use GoSwoole\BaseServer\... | true |
6312a127b884df9909e2d9b1e3a92be3d766bbd7 | PHP | robertcal/competitive_programming | /AtCoder/atcoder_beginners_selection/shift_only.php | UTF-8 | 286 | 3.5625 | 4 | [] | no_license | <?php
$n = fgets(STDIN);
$list = explode(' ', fgets(STDIN));
$result = [];
foreach ($list as $number) {
$number = (int)$number;
$count = 0;
while($number % 2 === 0) {
$count++;
$number = $number / 2;
}
$result[] = $count;
}
echo min($result); | true |
d7454cae119418a01bc9d1a85174e1ba667d74e1 | PHP | fongfo/CYA | /fishbowl-api-php/SDK/classes/sdk.class.php | UTF-8 | 19,187 | 3.140625 | 3 | [] | no_license | <?php
/**
* @package : FishbowlSDK
* @author : dnewsom <dave.newsom@fishbowlinventory.com>
* @author : kbatchelor <kevin.batchelor@fishbowlinventory.com>
* @version : 1.0
* @date : 2010-04-29
*
* Utility routines for Fishbowls SDK
*/
class FishbowlSDK {
public $result;
public $statusCode;
public $s... | true |
b3d211b4bef749073cda566e6dca7d58bbce0f85 | PHP | Nikkoz/yii2 | /core/forms/manage/coins/socials/SocialsForm.php | UTF-8 | 1,047 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace core\forms\manage\coins\socials;
use core\entities\coins\socials\Networks;
use yii\base\Model;
use yii\helpers\ArrayHelper;
/**
* Class SocialsForm
* @package core\forms\manage\coins\socials
*
* @property array $social
*/
class SocialsForm extends Model
{
public $social;
... | true |
e312d2e2d054966e42673161018d62278e61d478 | PHP | bifuteki/bugapp | /application/controllers/helpers/GetForm.php | UTF-8 | 1,200 | 2.5625 | 3 | [] | no_license | <?php
class Bugapp_Helper_GetForm extends Zend_Controller_Action_Helper_Abstract
{
/**
* @var array Form instances
*/
protected $_forms = array();
/**
* @var Zend_Loader_PluginLoader
*/
protected $_loader;
/**
* Initialize plugin loader for forms
*
* @return voi... | true |
74f68788428e0193c04d9c0726fd96fac53765a2 | PHP | alextrb/csport | /src/Model/Table/WorkoutsTable.php | UTF-8 | 7,700 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Model\Table;
use Cake\ORM\Table;
use Cake\Validation\Validator;
use Cake\I18n\Time;
class WorkoutsTable extends Table {
public function getAllWorkouts($id){
$work = $this
//->find()
->find('all', array('order' => array('Workouts.date' => 'asc')))
... | true |
26788212a3b71090db75f38bcade333c2d8767b9 | PHP | batuhan-kaya/PHP_Ogreniyorum | /index.php | UTF-8 | 1,094 | 2.609375 | 3 | [] | no_license | <?php
include("database.php");
@session_start();
if(isset($_POST["adisoyadi"])){ // dosyayı çalıştırdığımızda çıkan error message post edilme şartına bağlandı.
$PAROLA = ($_POST["parola"]);
$SQL = "SELECT
*
FROM
kullanicilar
WHERE
adisoyadi = '{$_POST["adisoyadi"]}' AND
... | true |
a20e58060686f9ab9cf35236c6e2dae2a8c1e541 | PHP | edu-ofernandes/Uc5 | /phpbasico/gamecontroler/exemplos/Game.php | UTF-8 | 296 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
require_once("ClasseBase.php");
class Game extends ClasseBase{
private $categoriaId;
public function Game(){
parent::ClasseBase();
}
public function getCategoriaId(){
return($this->categoriaId);
}
public function setCategiaId($value){
$this->categoriaId = $value;
}
}
?>
| true |
7c7831ff9fdc705787b6f35eb3752574113f42bc | PHP | Mahmoud-Shosha/php-for-beginners | /19-php web/3-setting_cookie.php | UTF-8 | 356 | 2.59375 | 3 | [] | no_license | <?php
$name = "my_cookie";
$value = 512;
$expiration = time() + (60*60*24*7);
$path = "/";
setcookie($name, $value, $expiration, $path);
// if the cookie already exist, it will update it (the expiration date)
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>">
<title>Setting cookie</title... | true |
161cdfe12d181fe6df310b19c026c2d847020a96 | PHP | idrpambudi/pams_market | /nextar.php | UTF-8 | 1,587 | 2.75 | 3 | [] | no_license | <?php
class NextarDisbursement {
private const NEXTAR_DISBURSEMENT_URL = "https://nextar.flip.id/disburse";
function get_header(){
$auth_str = getenv("SECRET_KEY") . ":";
return array(
sprintf("Authorization: Basic %s", base64_encode($auth_str)),
"Content-Type:... | true |
a5e83b6825ad7bee4a721e3166c823543931bd92 | PHP | i-shafran/lessons | /controllers/AController.php | UTF-8 | 431 | 2.828125 | 3 | [] | no_license | <?php
namespace lesson\controllers;
use lesson\models\NewsModel as NewsModel;
use lesson\classes\View as View;
abstract class AController
{
protected $model;
protected $view;
public function __construct()
{
$this->model = new NewsModel();
$this->view = new View();
}
public function action($name)
{
$a... | true |
3871035dd074ee80efe640495d13008507a967f9 | PHP | amenophis/CookAndCollect | /tests/Security/Func/Application/AVisitorWantsToCreateAnAccount/AVisitorWantsToCreateAnAccountTest.php | UTF-8 | 5,289 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Tests\App\Security\Func\Application\AVisitorWantsToCreateAnAccount;
use App\Shared\Infrastructure\PHPUnit\BaseTestCase;
use Tests\App\Security\FixturesConstants;
class AVisitorWantsToCreateAnAccountTest extends BaseTestCase
{
public function testFirstSignupSuccess(): voi... | true |
3152a2efd4312c749936639550431733e867e98b | PHP | stricard/demo-blog | /app/Http/Middleware/CheckAPIKey.php | UTF-8 | 652 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use App\Exceptions\Problems\InvalidAPIKeysException;
class CheckAPIKey
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
p... | true |
24c6e3630917e3d959c2c709ce479ae6cd6dc67b | PHP | pointdnd/yii2-modular | /base/Query.php | UTF-8 | 698 | 2.859375 | 3 | [] | no_license | <?php
namespace mii\base;
/**
* Wrhite less do more
*
* @author Gustavo Salgado <gsalgadotoledo@gmail.com>
* @since 1.0
*/
class Query
{
public $selector;
public function __get($name) {
$nameClass=$this->selector;
if($name==='class')
return $nameClass::className();
if(property_exists($nameClass,... | true |
94e1528d9aaa9e556fa704567a9a9f86d49a7e94 | PHP | rsantellan/my-symfony-crons-works | /plugins/mastodontePlugin/lib/xmlHandlers/mdBackendGroupsXMLHandler.class.php | UTF-8 | 2,292 | 2.671875 | 3 | [] | no_license | <?php
class mdBackendGroupsXMLHandler {
private $xml = null;
private $backendGroupList = null;
public function __construct() {
$this->load();
}
private function load() {
try {
if(!file_exists ( $this->getXMLPlaceAndName() ))
{
throw new Exc... | true |
44675de4050fabda57214479377a3e0a0f0453ee | PHP | Lendzin/1dv610 | /view/LoginView.php | UTF-8 | 4,666 | 2.90625 | 3 | [] | no_license | <?php
namespace view;
class LoginView {
private static $login = 'LoginView::Login';
private static $password = 'LoginView::Password';
private static $logout = 'LoginView::Logout';
private static $name = 'LoginView::UserName';
private static $keep = 'LoginView::KeepMeLoggedIn';
private static $messageId = 'Login... | true |
6d1dc78ebf3ee814a57dfdcc82426bc5364b7029 | PHP | SBERP/BACKEND | /app/Core/Settings/MeasurementUnits/Entities/EncodeAllData.php | UTF-8 | 2,066 | 2.6875 | 3 | [] | no_license | <?php
namespace ERP\Core\Settings\MeasurementUnits\Entities;
use ERP\Core\Settings\MeasurementUnits\Entities\Measurement;
use Carbon;
/**
*
* @author Farhan Shaikh<farhan.s@siliconbrain.in>
*/
class EncodeAllData
{
public function getEncodedAllData($status)
{
$convertedUpdatedDate = array();
$encodeAllData =... | true |
7d363c564933e651dbb3494f65cd815100a9df44 | PHP | conjoon/php-lib-conjoon | /src/Mail/Client/Attachment/FileAttachment.php | UTF-8 | 4,353 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* conjoon
* php-lib-conjoon
* Copyright (C) 2019-2022 Thorsten Suckow-Homberg https://github.com/conjoon/php-lib-conjoon
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wi... | true |