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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f72c301372dccb3cc8f5576e2e608b8c7c12f4a8 | PHP | mikemarquez11/lovetura_contact | /includes/validation.php | UTF-8 | 1,865 | 2.8125 | 3 | [] | no_license | <?php
namespace LoveturaContact\Validate;
/**
* Helper file for validation
*/
class LoveturaValidate {
protected $fields = array('name', 'email', 'edad', 'whatsapp', 'fechasesion', 'sesion', 'mensaje');
public function validate_data() {
check_ajax_referer( 'loveturaoutput', 'nonce' );
for... | true |
f72f86161c4b955274eb1708153ff9c3c8d7ac7e | PHP | IF65/promozioni | /src/Database/Tabelle/TNegozi.php | UTF-8 | 3,873 | 3.046875 | 3 | [] | no_license | <?php
namespace Database\Tabelle;
class TNegozi {
private $pdo = null;
private $schema ='';
public static $tableName = 'negozi';
public function __construct($pdo, $schema) {
$this->pdo = $pdo;
$this->schema = $schema;
self::creaTabella();
... | true |
1802a30a60f597ad5840a5760d62d0b1d65c83d3 | PHP | iamazhi/azhibox | /business/suntech/include/admin/urlrule.class.php | UTF-8 | 1,841 | 2.796875 | 3 | [] | no_license | <?php
class urlrule
{
var $db;
var $table;
var $pages;
function __construct()
{
global $db;
$this->db = &$db;
$this->table = DB_PRE.'urlrule';
}
function urlrule()
{
$this->__construct();
}
function listinfo($condition = null, $page = 1, $pagesize = 20)
{
$arg['where'] = $this-... | true |
4bb8c4b5c397ff5bfca55bd839448632e18e40a5 | PHP | dainst/wordpress-components | /plugins/wordpress-seo/admin/class-yoast-network-admin.php | UTF-8 | 9,438 | 2.53125 | 3 | [
"Apache-2.0",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-3.0-only",
"LicenseRef-scancode-other-copyleft"
] | permissive | <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Internals
*/
/**
* Multisite utility class for network admin functionality.
*/
class Yoast_Network_Admin implements WPSEO_WordPress_Integration, WPSEO_WordPress_AJAX_Integration {
/**
* Action identifier for updating plugin network options.
*
* @var strin... | true |
d80ef10a7dc16ab0576a3e7d181f5a7b666ceb03 | PHP | gomeznavarro/NuevoRepositorio | /vistapublica/MensajeController.php | UTF-8 | 12,138 | 2.625 | 3 | [] | no_license | <?php
/**
* Controla todo lo relativo a mensajes entre recruiters y candidatos
* @class MensajeController
* @brief Controla todo lo relativo a mensajes entre recruiters y candidatos
* @package application.controllers
*/
class MensajeController extends Controller {
public $defaultAction = '';
/**
*... | true |
4668d2ff3b57413e28d77f246d77e5ba3bc8ecfd | PHP | appsoluut/MiniThor-core | /library/Thor/Interface/PowerDNS.php | UTF-8 | 2,286 | 2.65625 | 3 | [] | no_license | <?php
class Thor_Interface_PowerDNS extends Thor_Interface {
/**
* Database driver
* @var Zend_Db
*/
protected $_db;
public function init() {
// Get database driver
if(Zend_Registry::isRegistered('pdns_db')) {
$this->_db = Zend_Registry::get('pdns_db');
} else {
$this->_db = Zend_Db::factory('Pdo... | true |
5bde8e84a4fc7323fae2313fe6efc4dc11a4bf77 | PHP | AngryRussianman/WSP_FeSo | /Laboration_PHP/PDO/resources/includes/model.php | UTF-8 | 777 | 2.703125 | 3 | [] | no_license | <?php
$host = 'localhost';
$dbname = 'blogg';
$user = 'Admin';
$password = 'Goodpassword';
$attr = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC);
$dsn = "mysql:host=$host;dbname=$dbname;charset=utf8mb4";
$pdo = new PDO($dsn, $user, $password, $attr);
$sql= 'SELECT p.ID, p.Slug, p.Headline, CONCAT(u.) AS... | true |
551da50ad0487fd85a83c0a13553bf9ee1597fcb | PHP | edwardsjohnmartin/3PIO | /pppio_dev/controllers/question_controller.php | UTF-8 | 9,123 | 2.75 | 3 | [] | no_license | <?php
//TODO: Clean up create and read occurrences actions
//TODO: Modify read_occurrences to allow for a ta to access it
require_once('controllers/base_controller.php');
class QuestionController extends BaseController{
public function index(){
$models = ($this->model_name)::get_pairs_for_owner($_SESSION['user']->g... | true |
3970fd45c7c4f2a6d84eaa6e76464e9fa0d0c5d6 | PHP | CivilianSergeant/sms-frontend | /application/models/Authenticate_model.php | UTF-8 | 3,751 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class Authenticate_model extends User_model
{
// Expire in seconds, value is equivalent to 30 minutes
const EXPIRE = "1800";
public function is_loggedin()
{
$loggedin = $this->session->get_userdata('login');
if(!empty($loggedin['login']))
return $loggedin['login'];
else
return false;
}
/**
* ... | true |
f9a049120bd6a0ba9af51f52e579e6e8530be5e5 | PHP | lazynerd-studios/Creditwolf-admin | /app/Http/Requests/RegisterRequest.php | UTF-8 | 1,007 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Models\Role;
use App\Rules\ValidPassword;
use Illuminate\Validation\Rule;
use Illuminate\Foundation\Http\FormRequest;
class RegisterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
... | true |
f5ce27ba7e39d39c4a1d2bc466297ddd25499112 | PHP | WilliamBranhQuispeTite/Proyecto-sistema-web-usando-laravel | /app/Http/Requests/EmpresaRequest.php | UTF-8 | 2,203 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use App\{Empresa,Usuario,Administrador};
class EmpresaRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
... | true |
f3c088de13b354ed57d98af447dd27a973c2b716 | PHP | coodesoft/social.radioalbum | /common/util/Requester.php | UTF-8 | 705 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\util;
class Requester{
public static function get($url, $params = null, $transfer = true){
if ($params != null){
$paramStr = "";
$keys = array_keys($params);
$last_key = array_pop($keys);
$last_param = array_pop($params);
foreach($params as $key => $value){
... | true |
7fef7539c88fb16885b889fa41e1370e808f387d | PHP | DGeorge-space/PHP-Course | /mySQL/Security.php | UTF-8 | 858 | 2.90625 | 3 | [] | no_license | <?php
/* SQL injection is a method used to sanitize data to stop
// users putting commands into files that SQL will interpret and can harm the site
We do this by using a command in our 'create' function:
mysqli_real_escape_string($connection,$password);
this escapes any punctuation characters which tidies up o... | true |
cae4015cd68c1ffccbd583800a5af0afc5695230 | PHP | rivomanana/presstify | /src/Wordpress/Query/QueryUser.php | UTF-8 | 6,712 | 2.796875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace tiFy\Wordpress\Query;
use tiFy\Contracts\User\RoleFactory;
use tiFy\Support\{ParamsBag, Proxy\Role};
use tiFy\Wordpress\Contracts\{Database\UserBuilder, QueryUser as QueryUserContract};
use tiFy\Wordpress\Database\Model\User as Model;
use WP_Site;
use WP_User;
class QueryUser... | true |
accd9a0fcf8eae2070e17a26a71266bb1a8d8083 | PHP | Articus/PathHandler | /src/Articus/PathHandler/PhpAttribute/Attribute.php | UTF-8 | 712 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Articus\PathHandler\PhpAttribute;
/**
* PHP attribute for adding attribute service to handler
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class Attribute
{
public function __construct(
/**
* Name that should be pas... | true |
5aace924f85ba5aaf51964a379925106f30677ef | PHP | teratai3/thin | /autoLoader.php | UTF-8 | 940 | 2.84375 | 3 | [] | no_license | <?php
class autoLoader
{
private $system_root;
public function __construct($root)
{
// ルートディレクトリの設定
$this->system_root = $root;
}
public function register()
{
spl_autoload_register(array($this, 'myLoader'));
}
public function myLoader($class)
{
// 最... | true |
a26bdee4769864370994b1033d5dbb5009205767 | PHP | googleapis/google-api-php-client-services | /src/ManagedServiceforMicrosoftActiveDirectoryConsumerAPI/Resource/ProjectsLocationsManagedidentitiesGlobalDomainsSqlIntegrations.php | UTF-8 | 3,629 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | true |
e466d45e31c70b968e23b713955cdd89150e3507 | PHP | brBart/project-999 | /999_pos/tags/Test_999_pos_0_2/commands/get_product_by_supplier.php | UTF-8 | 2,028 | 2.765625 | 3 | [] | no_license | <?php
/**
* Library containing the GetProductBySupplierCommand class.
* @package Command
* @author Roberto Oliveros
*/
/**
* Base class.
*/
require_once('commands/get_product.php');
/**
* Defines functionality for obtaining a product object or displaying failure.
* @package Command
* @author Roberto Oliveros... | true |
b0efce463bbb42bbbbb2aa103ece09aad1e1292b | PHP | tankist/yii-qs | /lib/web/controllers/QsControllerBehaviorAdminDataModelContext.php | UTF-8 | 8,281 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* QsControllerBehaviorAdminDataModelContext class file.
*
* @author Paul Klimov <pklimov@quartsoft.com>
* @link http://www.quartsoft.com/
* @copyright Copyright © 2010-2013 QuartSoft ltd.
* @license http://www.quartsoft.com/license/
*/
Yii::import('qs.web.controllers.QsControllerBehaviorAdminData... | true |
89591a85f8cc58487e439f0efc06a8328fdc6fc1 | PHP | DevTeamSpace/dentamatch-php | /app/Console/Commands/CertificateExpiryCommand.php | UTF-8 | 1,296 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Models\Configs;
use App\Utils\NotificationUtils;
use Illuminate\Console\Command;
use App\Models\JobseekerCertificates;
class CertificateExpiryCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
pro... | true |
0d8b221414a947e03d63567948544c282dea02c0 | PHP | pankaj-php/Hypleystaging | /wp-content/plugins/seo-by-rank-math/includes/modules/seo-analysis/class-result.php | UTF-8 | 7,920 | 2.734375 | 3 | [
"GPL-2.0-or-later",
"GPL-2.0-only",
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* The SEO Analysis Result
*
* @since 1.0.24
* @package RankMath
* @subpackage RankMath\SEO_Analysis
* @author Rank Math <support@rankmath.com>
*/
namespace RankMath\SEO_Analysis;
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Result class.
*/
class Result {
/**
* Result ... | true |
d9465d9a923c9333c61698b22bd4c695e4cef6a8 | PHP | PeeHaa/MicroFramework | /Example/ExampleProject/www.example.com/routes.php | UTF-8 | 686 | 2.734375 | 3 | [] | no_license | <?php
/*
* Routes are defined as array elements in the following format:
*
* Array key is route name (must be unique)
* First element is the url to route (use a colon for variable parts e.g. /some/url/:variable)
* Second element is the controller/action to route the request to
* Third element are the default val... | true |
9d0cea404e278ac6246470f274dfcad34b0174a6 | PHP | rummykhan/catalog-yii | /common/forms/AddCalendar.php | UTF-8 | 1,936 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: rummykhan
* Date: 6/8/18
* Time: 4:29 PM
*/
namespace common\forms;
use common\models\Calendar;
use common\models\GlobalAvailabilityException;
use common\models\GlobalAvailabilityRule;
use common\models\Provider;
use RummyKhan\Collection\Arr;
use Yii;
use yii\base\Model;... | true |
d76b644d0aca8d028fcc05adbe0b8d580e91c196 | PHP | Mohit501/PHP | /if_else_php.php | UTF-8 | 408 | 3.890625 | 4 | [] | no_license | <?php
echo "if else conditionals in php <br>";
$a = 25;
$b = 30;
$c = $a+$b;
if($a == 25)
{
echo "a is 25<br>";
}
else
{
echo "a is not 25<br>";
}
if($b == 10)
{
echo "This is wrong value of b<br>";
}
else
{
echo "In previous if the value of b was incorect so the real value of b i printed i... | true |
37da3aec9fc4fc2b34c48048e493b5da3b43eeae | PHP | laymix/git-test | /vendor/willdurand/hateoas/src/Hateoas/Factory/LinksFactory.php | UTF-8 | 1,519 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Hateoas\Factory;
use Hateoas\Configuration\RelationsRepository;
use Hateoas\Model\Link;
use Hateoas\Serializer\ExclusionManager;
use JMS\Serializer\SerializationContext;
/**
* @author Adrien Brault <adrien.brault@gmail.com>
*/
class LinksFactory
{
/**
* @var RelationsRepository
*/
... | true |
c31347cbf35928961598ff00aad9147a6150f40e | PHP | baskuis/werock | /public/modules/Experimentation/objects/ExperimentationVariantEntryObject.class.php | UTF-8 | 1,935 | 2.875 | 3 | [] | no_license | <?php
class ExperimentationVariantEntryObject {
public $id;
public $visitorId;
public $entryId;
public $value;
public $count;
public $dateAdded;
public $lastModified;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @pa... | true |
71d459054cd68b2525c20e391b94beff82ce5547 | PHP | MichaelYagi/michaelyagi.ca | /application/models/Recipe.php | UTF-8 | 17,045 | 2.671875 | 3 | [] | no_license | <?php
class Application_Model_Recipe extends Zend_Db_Table_Abstract {
private $user;
private $pass;
private $api_url;
private $api_version;
public function Application_Model_Recipe($user=null,$pass=null) {
$this->user = $user;
$this->pass = $pass;
$this->api_version = 1;
if ($this->a... | true |
475f2a10a07394aa916496c0b742de625fdfb76d | PHP | glezzz/MySql-challenge | /Controller/LoginController.php | UTF-8 | 774 | 2.703125 | 3 | [] | no_license | <?php
class LoginController
{
public function logIn()
{
if (!empty($_POST['email'])) {
$loader = new StudentLoader();
$students = $loader->getStudents();
$counter = 0;
$error = "";
foreach ($students as $student) {
$counter++;
... | true |
6639d9f8fbe592ce539dd945de373b100d180ee6 | PHP | Shishifoxy/orleans-0219-php-wildbazar5 | /form_kitchen.php | UTF-8 | 8,988 | 2.65625 | 3 | [] | no_license | <?php
if($_POST)
{
$errors = array() ;
if(empty($_POST['prodTitle'])) {
$errors['prodTitle1'] = "The prodTtile can't be empty.";
}
if(strlen($_POST['prodTitle']) < 2 ) {
$errors['prodTitle2'] = "The prodTitle must be at least 2 characters long.";
}
if(empty($_POST['prodPrice'])... | true |
05a5750b527b361ba089dd84b98f08f2fafdb990 | PHP | lucasfs16/php | /1bim/A2-Contador-Calc/Aula3.php | UTF-8 | 681 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
class Teste{
public function testar(){
$r = new Revolver($_POST["municao"],$_POST["maxima"]);
$r->atirar();
$r->atira... | true |
327039844076a3c84700651870d2dad2c1b36488 | PHP | symphonists/symphony_tests | /lib/class.symphonytestreporter.php | UTF-8 | 5,694 | 3.09375 | 3 | [] | no_license | <?php
/**
* @package lib
*/
/**
* The SymphonyTestReporter class extends SimpleReporter to build a test case
* report using XMLElements instead of string concatenation.
*/
class SymphonyTestReporter extends SimpleReporter {
/**
* The report parent element.
*/
protected $fieldset;
/**
* Th... | true |
1e57cfcdfd8dc045b16861d3936450a00fcf1670 | PHP | guyt101z/foodie | /application/libraries/MY_Form_validation.php | UTF-8 | 1,780 | 2.796875 | 3 | [] | no_license | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation {
public function is_decimal($value)
{
$CI = & get_instance();
$regx = '/^[-+]?[0-9]*\.?[0-9]*$/';
if (preg_match($regx, $value)) {
return true... | true |
cd1b06c41b1816254920e3a28c76a7a2173dfd98 | PHP | matthewfleming/snippets | /php/TrimAll.php | UTF-8 | 2,682 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
namespace MatthewFleming\PHP;
DEFINE('TRIM_LEFT', 0);
DEFINE('TRIM_RIGHT', 1);
DEFINE('TRIM_BOTH', 2);
/**
* Trim all whitespace from the beginning and/or end of a string:
* - UTF multibyte spaces (e.g. \xC2\xA0)
* - Unicode whitespace \p{Z}
* - ASCII whitespace \s
* @param mixed $string The string to ... | true |
f2e3ac237a48bb83e418651e51fe1ad5260a0b98 | PHP | faithcomesbyhearing/dbp | /app/Console/Commands/SyncPlaylistDuration.php | UTF-8 | 4,358 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Models\Playlist\PlaylistItems;
use App\Models\Plan\Plan;
use Illuminate\Console\Command;
use Carbon\Carbon;
class SyncPlaylistDuration extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signatu... | true |
c717d7b3b94c5a1eee98600fdc312225854017f9 | PHP | booster085/softuni | /PHP/Homeworks/Loops/p-1_SquareRootSum/squareRootSum.php | UTF-8 | 464 | 3.453125 | 3 | [] | no_license | <table border="1">
<thead>
<tr>
<th>Number</th>
<th>Square</th>
</tr>
</thead>
<tbody>
<?php
$total = 0;
for ($i = 0; $i <= 100; $i += 2) {
$sqroot = round(sqrt($i), 2);
echo '<tr><td>' . $i . '</td><td>' . $sqroot . '</td></tr>';
$total += $sqroot... | true |
961581b6ed627610cf4011e5f7a3c720ae8e483e | PHP | modamania/Bus-Hub | /classes/seat.php | UTF-8 | 3,034 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Seat
{
public static function getCoor($type,$seatNum)
{
if($type == 1)
{
switch($seatNum)
{
case 1:
return "1_1";
break;
case 2:
return "1_2";
break;
case 3:
return "1_3";
break;
case 4:
return "2_1";
break;
case... | true |
346b9b6959095f155036dff443e9641ee559d38a | PHP | gebob19/class-website | /htdocs/submit-feedback.php | UTF-8 | 607 | 2.59375 | 3 | [] | no_license | <?php
require_once 'config.php';
switch ($_SERVER['REQUEST_METHOD']) {
case 'POST':
$instructor_username = $_POST['instructor_name'];
$question_answered = $_POST['question_answered'];
$question_answer = $_POST['question_answer'];
$feedback_message = "<strong>" . htmlspecialchars($question_answered) ... | true |
c5359332cf08a6a7762ae3b98ed20134eb8e6003 | PHP | gogus/hackathon2018 | /src/Action/GetPassengers.php | UTF-8 | 840 | 2.5625 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Gtw\Action;
use Illuminate\Database\Capsule\Manager;
use Illuminate\Database\Query\Builder;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Container;
use Slim\Http\Response;
class GetPassengers
{
/**
* @var Builder
*/
protected $passeng... | true |
6725b01bf2b14c2ff5f5ae317c201db071f43024 | PHP | frenchguych/lf2fb | /tests/HealthKit/ParserTest.php | UTF-8 | 669 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Frenchguy\Tests\HealthKit;
use PHPUnit\Framework\TestCase;
use Frenchguy\HealthKit\Parser;
final class ParserTest extends TestCase
{
public function testCannotBeCreatedFromNonExistingFile() : void
{
$this->expectException(\InvalidArgumentException::class);
Parser::from... | true |
0e3b7ddf98ee625c9221975fc74480a2b3ce7532 | PHP | Daniel-Monroy/tesvg-tutorias-backend | /ajax/subactividades.ajax.php | UTF-8 | 1,627 | 2.578125 | 3 | [] | no_license | <?php
require_once "../controladores/subactividades.controlador.php";
require_once "../modelos/subactividades.modelo.php";
/**
* Ajax SubActividades
*/
class AjaxSubActividades
{
# ========================================
# = VALIDAR ACTIVIDAD REPEDITiDA =
# ========================================
... | true |
bc7898dc0844bf4d4a0035f1d383660828d27d5b | PHP | GerardMA95/gocoche | /app/Http/Requests/Web/Search/SearchCriteriaRequest.php | UTF-8 | 1,256 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Web\Search;
use Illuminate\Foundation\Http\FormRequest;
class SearchCriteriaRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
... | true |
831bbc3c48df0ee3acd6c435b69f2a868b931d25 | PHP | marscore/hhvm | /hphp/test/slow/object_magic_method/747.php | UTF-8 | 261 | 2.9375 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
class A {
private $foo, $bar;
function __construct() {
$this->foo = 1;
$this->bar = 2;
}
public function __sleep() {
$this->foo = 3;
return array('foo');
}
}
<<__EntryPoint>>
function main_747() {
$a = new A();
var_dump(serialize($a));
}
| true |
f1b938e424aad47ecacbe1b7e8e264ebb1c2ef92 | PHP | artviks/Registry-2 | /app/Services/PersonServices/PersonService.php | UTF-8 | 945 | 2.875 | 3 | [] | no_license | <?php
namespace App\Services\PersonServices;
use App\Models\Person;
use App\Models\PersonCollection;
use App\Repositories\PersonRepository;
class PersonService
{
private PersonRepository $storage;
public function __construct(PersonRepository $storage)
{
$this->storage = $storage;
}
publ... | true |
a2df911e58d0b772d2a9939ec5b2195c1d41d397 | PHP | ryolambert/nm-outdoors-wip | /public_html/api/review/index.php | UTF-8 | 6,579 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
require_once dirname(__DIR__, 3) . "/vendor/autoload.php";
require_once dirname(__DIR__, 3) . "/php/classes/autoload.php";
require_once("/etc/apache2/capstone-mysql/encrypted-config.php");
require_once dirname(__DIR__, 3) . "/php/lib/xsrf.php";
require_once dirname(__DIR__, 3) . "/php/lib/jwt.php";
require_once d... | true |
0e23d599e763c5db9fd7b70d7fab8db1a01b502b | PHP | mykytadenysenkov/trading_signal_service | /Date.php | UTF-8 | 733 | 3.359375 | 3 | [] | no_license | <?php
class Date {
public static function getValidDate($string) {
$date = explode(" ", $string)[0];
$parts = explode("-", $date);
foreach ($parts as &$part) {
if ($part < 10) {
$part = "0" . $part;
}
}
return implode("-", $parts);
... | true |
f19c42e893a6432b881e54c23f8815000a9dea85 | PHP | msanand3/Job-Portal | /displaytable.php | UTF-8 | 1,264 | 3 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<title> </title>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
</head>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "session";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check con... | true |
6e0080ce282e801e8456352294281eb6b99ed028 | PHP | ReneX13/Server-Side-PHP | /login.php | UTF-8 | 1,966 | 2.78125 | 3 | [] | no_license | <?php
require_once 'sample-data.php';
$admin = new User("admin", 1234);
$admin->setPinAndAdmin(5555, true);
$user = new User("user", 0000);
$default_user = new User("tmp", 4789);
$flag = false;
$captcha_flag = false;
session_start();
if($_SESSION){
header("Location: index.php");
}
else if($_POST){
$captc... | true |
e6d22ba61c91e490aa3838822f85739e6c2ca5f8 | PHP | iDoLaravel/blender | /database/seeds/BackUserSeeder.php | UTF-8 | 1,412 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use App\Services\Auth\Back\Enums\UserRole;
use App\Services\Auth\Back\Enums\UserStatus;
use App\Services\Auth\Back\User;
class BackUserSeeder extends DatabaseSeeder
{
public function run()
{
$this->truncate((new User())->getTable());
collect([
['Freek', 'Van der Herten'],
... | true |
69970c84a82dd58ac24b0242c922f8180ca4b9e2 | PHP | pew-rivza/learning | /Patterns/Chapters/Chapter_3/Condiments/Marshmallow.php | UTF-8 | 425 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Katrin
* Date: 28.10.2019
* Time: 22:14
*/
include_once __DIR__ . "/../Decorator.php";
class Marshmallow extends Decorator
{
public function cost(): float
{
return 50 + $this->beverage->cost();
}
public function get_description(... | true |
24733516b07c18d56aee90cf6ec106bae3b885de | PHP | esmcrezosis/esmc_php | /mcnp/application/models/EuAlerteMapper.php | UTF-8 | 4,312 | 2.53125 | 3 | [] | no_license | <?php
class Application_Model_EuAlerteMapper {
//put your code here
protected $_dbTable;
public function setDbTable($dbTable) {
if (is_string($dbTable)) {
$dbTable = new $dbTable();
}
if (!$dbTable instanceof Zend_Db_Table_Abstract) {
throw new Exception('Inval... | true |
847b692b66d696fc49b2167912e083b250c35ee0 | PHP | javi-ms/ejerciciosClase | /nb/ant/html/EjerciciosBasicos/basicos/bisiesto.php | UTF-8 | 300 | 2.6875 | 3 | [] | no_license | <?php
/**
*saber si un año es bisiesto
*
*/
$anio=2004;
/*$comprobar=$anio/4;*/
if((!($anio%4) && ($anio%100)) || !($anio%400)){
echo 'el año es bisiesto';
}else{
echo 'el año no es bisiesto';
}
echo "<br/><a href=\"vercodigo.php?src=bisiesto.php\">ver codigo</a>"
?> | true |
3c907b6b6a8fbe4946ae7d805213e4a153c1be7a | PHP | kpatel7262/assign2-KrishnaPatel-xml-ticket-application | /assignment2-KrishnaPatel-XML/index.php | UTF-8 | 2,255 | 2.765625 | 3 | [] | no_license | <?php
//login will depend on if it is a user or admin
$username="";
$password="";
$error="";
if(isset($_POST['login']))
{
$xml = simplexml_load_file("xml/user_details.xml");
$username = $_POST['uname'];
$password = $_POST['pwd'];
foreach($xml->user as $user){
if($user->user_id == $username &... | true |
c15c1125c09137e408fc109386aa1d9fbdf4917c | PHP | Ludovicg56/ProjetWebLudovic | /pages/catalogue.php | UTF-8 | 3,816 | 2.59375 | 3 | [] | no_license | <!--on a besoin des classes Type_gateauDB et Type_gateau-->
<?php
$types = new Type_gateauDB($cnx);
$tabTypes = $types->getType_gateau();
$nbrTypes = count($tabTypes);
//traitement du formulaire de choix du type
if (isset($_GET['choix_type'])) {
$cake = new Vue_GateauxDB($cnx);
$liste = $cake->getVue_gateauxTy... | true |
7a9ac4fee8f939a15ad8718b91f2e56eecbb6c8f | PHP | Usmon/crm-api | /app/Observers/TrackingObserver.php | UTF-8 | 1,443 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Observers;
use App\Models\Tracking;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
final class TrackingObserver
{
/**
* @param Tracking $tracking
*
* @return void
*/
public function creating(Tracking $tracking): void
{
$this->defaultP... | true |
134d3caf4d0a49439ef4f945e0e11ff67fb63073 | PHP | vora1993/mcroy | /module/Application/src/Application/Mapper/MenuGroupInterface.php | UTF-8 | 247 | 2.546875 | 3 | [] | no_license | <?php
namespace Application\Mapper;
interface MenuGroupInterface
{
public function fetchAll($condition);
public function fetchRow($condition);
public function insert($menu_group);
public function update($menu_group);
} | true |
9b784668a8fd27dfac75cd062120ca975070d548 | PHP | W7851167/tianyantou | /app/Models/ImageModel.php | UTF-8 | 1,688 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Request;
class ImageModel extends BaseModel
{
use SoftDeletes;
public $table = 'images';
protected $primaryKey = 'id';
public function item()
{
return $this->morphTo();
}
... | true |
4ad2a242b2490ca4970ae935c2ebba3d63f46408 | PHP | FloKnapp/hardkode | /src/Service/EntityManagerAwareTrait.php | UTF-8 | 510 | 2.515625 | 3 | [] | no_license | <?php
namespace Hardkode\Service;
/**
* Trait EntityManagerAwareTrait
* @package Hardkode\Service
*/
trait EntityManagerAwareTrait
{
/** @var EntityManager */
private $entityManager;
/**
* @return mixed
*/
public function getEntityManager(): EntityManager
{
return $this->ent... | true |
ba5a9b09cd4a102bf8c6f91d0176ce76ae4412eb | PHP | MicheleMarson/php-form | /update.php | UTF-8 | 1,058 | 3.078125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "admin";
$dbname = "mywebsite";
// create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// check connection
if($conn->connect_error){
die("Connection failed".$conn->connect_error);
}
$id = $_GET["id"];
$sql = "SELECT ... | true |
300cdba3ef6789ca0e228d5c554983f53f8c0951 | PHP | Sajib32/ftfl_php_javascript_training | /allprograms/php_randomprograms/calculator.php | UTF-8 | 1,863 | 3.5625 | 4 | [] | no_license |
<?php
if($_POST['operand1']=="")
{
echo "First field is empty.";
die();
}
else{
$number1=trim($_POST['operand1']);
}
if($_POST['operator']=="")
{
echo "Second field is empty.";
die();
}
else
{
$operator=trim($_POST['operator']);
... | true |
14a9b15570b4d028e00c30f0569227c193ed8429 | PHP | laravel24/employment_bank | /database/seeds/StateTable.php | UTF-8 | 375 | 2.65625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use employment_bank\Models\State;
class StateTable extends Seeder{
public function run(){
State::create(['name' => 'Andaman and Nicobar (AN)']);
State::create(['name' => 'Andhra Pradesh (AP)']);
State::create(['name' => 'Arunachal Pradesh (AR)']);
... | true |
7cc8483cb8889dd88357ceb45078f84877569d6e | PHP | cocolait/api-send | /src/sdk/utils/Container.php | UTF-8 | 5,870 | 2.828125 | 3 | [] | no_license | <?php
namespace apiProcess\sdk\utils;
use apiProcess\sdk\exception\ClassNotFoundException;
class Container
{
/**
* 容器对象实例
* @var Container
*/
protected static $instance;
/**
* 容器中的对象实例
* @var array
*/
protected $instances = [];
/**
* 容器标识别名
* @var array
... | true |
8db14ba79676b760f7ca2fa39553012cd657dc31 | PHP | zone47/Artworks | /index.php | UTF-8 | 10,932 | 2.625 | 3 | [] | no_license | <?php
/* / */
//error_reporting(E_ALL ^ E_NOTICE);
error_reporting(0);
ini_set("display_errors", 0);
set_time_limit(120);
$l="fr"; // Langue par défaut
$nb=20; // Nombre de résultats par défaut
$p=1; // numéro de page par défaut
if (isset($_GET['l']))
$l=$_GET['l'];
if (isset($_GET['nb']))
$nb=$_GET['nb'];
if (is... | true |
06f7efd786f73ffef92371072e5990df83b1c42b | PHP | discipolo/dashpit_library | /src/Link.php | UTF-8 | 447 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: buddy
* Date: 10/06/16
* Time: 18:17
*/
namespace dashpit;
class Link
{
/* Link variables */
var $url;
var $title;
/* Link functions */
function setUrl($url){
$this->url = $url;
}
function getUrl(){
echo $this->url;
}
... | true |
64d0c77bb6b5a5a3cdb04c75461c45e23e4e45af | PHP | BruceGitHub/RDMyFrameworkProject | /rdmyframework/pk_tagcomponent/clsTagForm.php | UTF-8 | 2,140 | 2.609375 | 3 | [] | no_license | <?
/*
rdMyFramework - The framework for development webapplication interface
Copyright (C) 2006-2007 Diana Roberto
Version Alpha 0.0.0.10
For further information visit:
http://sourceforge.net/projects/rdmyframework/
*/
require_once(dirname(__FILE__) . '/clsTag.php');
/**
* rdFramework
* class clsTa... | true |
74428135f9e36e2d60b7c1d84ce5cd01b0987024 | PHP | YUMIE422/10_11_customer | /10_11_KITAJIMA/todo_update_cus.php | UTF-8 | 2,507 | 2.765625 | 3 | [] | no_license | <?php
// 送信データのチェック
// var_dump($_POST);
// exit();
// 関数ファイルの読み込み
include("functions.php");
// 送信データ受け取り
$id = $_POST["id"];
// var_dump($id);
$namae = $_POST["namae"];
$date = $_POST["date"];
$bloodtype = $_POST["bloodtype"];
$age = $_POST["age"];
$seibetu = $_POST["seibetu"];
$tel = $_POST["tel"];
$jyusho = $_PO... | true |
6497807e3f35c671c3b884d7426c5eae2c939b56 | PHP | AshMorrow/beejee | /Lib/DB.php | UTF-8 | 948 | 3.1875 | 3 | [] | no_license | <?php
namespace Lib;
use PDO;
/**
* Class DB using for work with DataBase
* implementing singleton pattern
* @package Lib
*/
class DB
{
private static $instance = null;
private $pdo = null;
private function __construct()
{
$this->pdo = new PDO("mysql:host=". DB_HOST . ";dbname=".DB_NAME, ... | true |
9d366b2c134c174df9243053ad9aa3d081842d99 | PHP | bpeter97/gbr | /RemoveWhenDone/Reference/gbr_OLD/model/getcontainerinfo.php | UTF-8 | 8,620 | 2.53125 | 3 | [] | no_license | <?php
// Create URL to CFG/SETTINGS.PHP file.
$cfgurl = $_SERVER['DOCUMENT_ROOT'];
$cfgurl .= "/cfg/settings.php";
//Variable Constants
include($cfgurl);
include(BASEURL.CFG.'/database.php');
if($_POST['containernumber']) {
$id = $_POST['containernumber']; //escape string
$db = n... | true |
63dd2af7a33d89ee8458f1ecc73e4acc7bd5bcc7 | PHP | kimz95/Pet-Shop | /register.php | UTF-8 | 2,037 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?
session_start();
if($_SERVER['REQUEST_METHOD'] =='POST'){
$email = test_input($_POST['email']);
$pass = test_input($_POST['pass']);
$cnfpass = test_input($_POST['cnfpass']);
$name = test_input($_POST['name']);
$address = test_input($_POST['adr']);
if(test_ema... | true |
4db65968e632cbc3285a6177b5702db0337958bd | PHP | buiphong/sanglocsosinh | /Library/Db/Adapter.php | UTF-8 | 1,884 | 2.8125 | 3 | [] | no_license | <?php
class Db_Adapter
{
/**
* Server
* @var string
*/
public $server;
/**
* Port
* @var int
*/
public $port;
/**
* Tên CSDL
* @var string
*/
public $dbname;
/**
* Tên user truy cập CSDL
* @var string
*/
public $username;
/**
* Mật khẩu user truy cập CSDL
* @var string
*/
public ... | true |
a30bbf8eeec8ad5487459ed4805610c5663c2f19 | PHP | hmontoyal/monitor | /modules/dashboard/models/Notas.php | UTF-8 | 1,262 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\dashboard\models;
use Yii;
/**
* This is the model class for table "notas".
*
* @property int $id
* @property string $titulo
* @property string $nota
* @property int $user_id
* @property string $fecha_creacion
*/
class Notas extends \yii\db\ActiveRecord
{
/**
* {@inheritd... | true |
63e541bf523620a7d483a8a7d77720d8606609c8 | PHP | kavi-127/D5_Batch | /Source Code/XAMPP File/VenueRecommender/test.php | UTF-8 | 349 | 3.03125 | 3 | [] | no_license | <?php
$latitude = '10.05456 10.0979 20.9679';
$longitude = '8.567 80.9867 81.7584';
$lat = array();
$lng = array();
$data = array();
$lat = explode(" ",$latitude);
$lng= explode(" ",$longitude);
for ($x = 0; $x<= sizeof($lat)-1; $x++) {
array_push($data,array((double)$lat[$x],(double)$lng[$x]));
}
e... | true |
834368a15c64ab72cd06c4e93eeb0a0fdfbcdd06 | PHP | h4d/leveret | /src/Http/Request.php | UTF-8 | 10,213 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace H4D\Leveret\Http;
use H4D\Leveret\Filter\FilterInterface;
use H4D\Leveret\Filter\Filters\DefaultFilter;
class Request
{
const METHOD_DELETE = 'DELETE';
const METHOD_GET = 'GET';
const METHOD_PATCH = 'PATCH';
const METHOD_POST = 'POST';
const METHOD_PUT = 'PUT';
/**
... | true |
5af13f99440719e5a93f058552eca0ee0bc9f621 | PHP | xuhyx/myblog | /xuhyx/qita/MyBlog/Admin/Controller/IndexController.class.php | UTF-8 | 1,147 | 2.625 | 3 | [] | no_license | <?php
class IndexController extends Controller{
//加载默认添加界面
public function add(){
echo "加载默认添加界面";
}
//执行默认添加动作
public function insert(){
echo "执行默认添加动作";
}
//查询默认的列表信息
public function index(){
//判断用户是否登录
if(!isset($_SESSION['nickname'])){
$this->error('用户没有登录,请确认!!','3',"./index.... | true |
845e8b8ca014f8685cd582d725f520b33deb8233 | PHP | yannickbiheul/blog_v1 | /models/entities/User.php | UTF-8 | 1,299 | 3.015625 | 3 | [] | no_license | <?php
class User {
private $_firstname;
private $_lastname;
private $_pseudo;
private $_email;
private $_password;
private $_signup_date;
public function getFirstname() : String {
return $this->_firstname;
}
public function setFirstname($firstname) : User {
$this-... | true |
b3c438141637be08f1d21c90c7a2f8d4d966bb1a | PHP | tharinduEranga/tharinduEranga.github.io | /api/business/impl/ReservationBOimpl.php | UTF-8 | 3,128 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: Tharindu
* Date: 11/24/2018
* Time: 9:26 PM
*/
require_once __DIR__."/../ReservationBO.php";
require_once __DIR__."/../../dto/ReservationDTO.php";
require_once __DIR__."/../../dbconnection/DBConnection.php";
require_once __DIR__."/../../repository/impl/ReservationRepo... | true |
9c58d9d20e7fb30520b44cc2d9fbda3ad0c0d0a8 | PHP | ProJobless/nyus | /nyusocial/expressionengine/libraries/EE_Upload.php | UTF-8 | 2,641 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author EllisLab Dev Team
* @copyright Copyright (c) 2003 - 2012, EllisLab, Inc.
* @license http://ellislab.com/expressionengine/user-guide/license.html
* @l... | true |
e229ad2e4efa36fa300a2bf381c27824b1791766 | PHP | josephldaigle/academic-summary | /view/CoreAreaCourseView.php | UTF-8 | 3,488 | 2.890625 | 3 | [] | no_license | <?php
/**
* CoreAreaLookupView.
*
* @author Joseph Daigle
*/
class CoreAreaCourseView extends View
{
private $areaList;
private $selectedArea;
private $courseList;
public function __construct() {
parent::__construct();
}
/**
*
* @param type $areaList
... | true |
ca26100178da05b25c51b83de24fa693364e308e | PHP | Vagmacker/micro-videos | /app/Models/User.php | UTF-8 | 1,195 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Exception;
use Illuminate\Contracts\Auth\Authenticatable;
/**
* Class User
* @package App\Models
*/
class User implements Authenticatable
{
/**
* User constructor.
* @param string $id
* @param string $name
* @param string $email
* @param string $token
... | true |
7591d53a769558ef6fd00cf47236ac0122eee7c9 | PHP | MartaTino157/chic_and_shine | /admin/modelAdmin/modelAdminReviews.php | UTF-8 | 961 | 2.75 | 3 | [] | no_license | <?php
class modelAdminReviews{
public static function getReviews() {
$query = "SELECT * FROM commentators WHERE flag = 0 ORDER BY id DESC";
$db = new Database();
$arr = $db->getAll($query);
return $arr;
}
public static function getReviewDetail($id) {
$query = "SELECT * FROM commentators WHERE id=".$id;
... | true |
02e22d47746f763924d46302419b4e7cfd967a55 | PHP | LutheranWorldRelief/monitoreo_lac | /models/base/SqlUsuario.php | UTF-8 | 1,445 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models\base;
use app\components\ActiveRecord;
use yii;
/**
* This is the model class for table "sql_usuario".
* Please do not add custom code to this file, as it is supposed to be overriden
* by the gii model generator. Custom code belongs to app\models\SqlUsuario.
*
* @property int $id
... | true |
9e0a56fa3c6b0d62d1cdd5c55940f4ab77b35971 | PHP | ctcit/ctcjoomlachanges | /plugins/content/CTCDocs/CTCDocs.php | UTF-8 | 12,454 | 2.578125 | 3 | [] | no_license | <?php
/**
* plugin to generate a set of download links to documents
* in a directory tree.
*
* Usage: {mosctcdocs docTreeRoot}
* Builds the list of links to documents in the given directory
* and subdirectories (only two levels). If the user is a normal
* non-committee member, the links are restricted to showin... | true |
08363be07299e4fdd682178f3b324c15b2e1bb55 | PHP | yzbbj/php_learn | /algorithm/leetcode/[35]search-insert-position.php | UTF-8 | 1,526 | 3.828125 | 4 | [] | no_license | <?php
//给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。
//
// 你可以假设数组中无重复元素。
//
// 示例 1:
//
// 输入: [1,3,5,6], 5
//输出: 2
//
//
// 示例 2:
//
// 输入: [1,3,5,6], 2
//输出: 1
//
//
// 示例 3:
//
// 输入: [1,3,5,6], 7
//输出: 4
//
//
// 示例 4:
//
// 输入: [1,3,5,6], 0
//输出: 0
//
// Related Topics 数组 二分查找
// 👍 85... | true |
c946bf468940b498fbfaea9e6a2290b3f22a2832 | PHP | austinBurn/Project_MURR | /tests/AppBundle/Controller/RouteControllerTest.php | UTF-8 | 13,783 | 2.546875 | 3 | [] | no_license | <?php
namespace Tests\AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use AppBundle\Entity\Route;
use AppBundle\Entity\Container;
use AppBundle\Entity\RoutePickup;
use AppBundle\DataFixtures\ORM\LoadUserData;
use Tests\AppBundle\DatabasePrimer;
/**
* RouteControllerTest short summ... | true |
8f8301a1693fadc6deca9b1c05930ab69c9608c7 | PHP | GarfieldLeChat/LucidCMS | /classes/media.php | UTF-8 | 11,890 | 3.078125 | 3 | [] | no_license | <?php
/**
* Class to handle media
*/
class Media
{
// Properties
/**
* @var int The media ID from the database
* @var int When the media is to be / was first published
* @var int The media category ID
* @var string Full mediaTitle of the media
* @var string A short mediaSummary of the media
* @v... | true |
90725c1db86dec2db9393d72ce9f0e7d480499dd | PHP | Lobozel/DWESE | /ejercicios/composer1/public/Usuario/crear.php | UTF-8 | 3,655 | 2.875 | 3 | [] | no_license | <?php
session_start();
require "../../src/Conexion.php";
require "../../src/Usuarios.php";
require "../../vendor/autoload.php";
use Src\{Conexion,Usuarios};
$con=new Conexion();
$llave = $con->getConector();
function error($txt){
if(gettype($txt)=='array'){
$error="<ul>";
... | true |
523f626a168b009429719fa48a717c69ade6c97e | PHP | Kender2/swc-squadranking | /app/CommandResponse.php | UTF-8 | 918 | 2.984375 | 3 | [] | no_license | <?php
namespace App;
class CommandResponse
{
public $requestId;
public $messages;
public $status;
public $result;
protected $data;
/**
* CommandResponse constructor.
* @param \stdClass $data
*/
public function __construct($data)
{
$this->requestId = $data->requ... | true |
2c86d4454e646f445600df63eb20067f4568b27b | PHP | xiebao/tp3-shop | /Application/Admin/Model/.svn/text-base/CategoryModel.class.php.svn-base | UTF-8 | 6,950 | 2.625 | 3 | [] | no_license | <?php
namespace Admin\Model;
use Think\Model;
class CategoryModel extends Model
{
protected $insertFields = array('cate_name', 'pid', 'is_floor');
protected $updateFields = array('id', 'cate_name', 'pid', 'is_floor');
protected $_validate = array(
array('cate_name', 'require', '分类名称不能为空!', 1, 're... | true |
04e8063fd3b80a4cea98e6e095f343c27214bfc0 | PHP | wbteve/jieba-php | /src/Jieba/Data/Words.php | UTF-8 | 1,130 | 3.546875 | 4 | [
"MIT"
] | permissive | <?php
namespace Jieba\Data;
/**
* Class Words
*
* @package Jieba
*/
class Words implements ArrayableInterface
{
/**
* @var Word[]
*/
protected $words;
/**
* Words constructor.
*
* @param array $words
*/
public function __construct(array $words = [])
{
$th... | true |
e7e389f548abaca7f8c2a9fed7c95a2cd227354a | PHP | Lan2010/GitLib | /mining/wakuang-app/code/app-api_php/App/Common/Common/InvalidCode.class.php | UTF-8 | 3,230 | 3.171875 | 3 | [] | no_license | <?php
namespace Common\Common;
/**
* 用户邀请码
*
* Class InvalidCode
* @package Common\Common
*/
class InvalidCode
{
/**
* 验证码长度
*/
const LEN = 6;
/**
* 邀请码元素集
*/
const STUFFS = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', ... | true |
8a7d7ef31064fc7997d7def89f2feb4942b56e34 | PHP | lukebrandonfarrell/software-patterns | /Creational Patterns/Singleton.php | UTF-8 | 736 | 3.59375 | 4 | [
"MIT"
] | permissive | <?php
/**
* Singleton pattern. Although this could
* be considered to be an anti-pattern.
*/
class Database {
private static $instance;
protected function __construct(){} // Private construct
protected function __clone(){} // Not cloneable
public static function getInstance() : Database {
if (! isset(... | true |
b6b19bf56b7c654497f2ad413943fc85aada7a17 | PHP | schdaniel20/CT | /src/UOradea/Exec/Program.php | UTF-8 | 1,354 | 2.78125 | 3 | [] | no_license | <?php
namespace UOradea\Exec;
use Exception;
class Program {
protected $vars;
protected $start;
protected $map = [];
public function __construct(array $registry, array $config) {
$this->map = $registry;
$this->vars = new Variables();
$this->setVars($config['vars']);
... | true |
1a6f948e79628ba6d5ea4c11f4ae3d11f986eafa | PHP | i4n-v/WEB-IFPE | /web-1/CRUD(CSV)/logado.php | UTF-8 | 2,107 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/crud.css">
<title>CRUD</title>
</head>
<?php
//Função php que inicia uma sessão e seta um cookie php para o client que serve como identi... | true |
aec48ec39d97446b368da637535bdfab039e9cde | PHP | claudio27/proyectos-htdocs | /wda/ch04/example.4-2.php | UTF-8 | 894 | 3.1875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Using UnitCounter</title>
</head>
<body>
<?php
require "UnitCounter.inc";
// Create a ... | true |
7d2919be2b2d886470cc4fbd71b2e523b67cb3a3 | PHP | swharden/SWHLabPHP | /python/php/jsonLogTight.php | UTF-8 | 795 | 2.8125 | 3 | [] | no_license | <?php
$string = file_get_contents("C:\\Users\\scott\\Documents\\GitHub\\SWHLabPHP\\python\\COMMAND_LOG.json");
$string = str_replace("\r","",$string );
$string = str_replace("\n}\n\n{",",\n",$string );
$json = json_decode($string,true);
foreach ($json as $entry => $entryJson){
$color="#b2e8c4";
if ($entryJson["return... | true |
69f16cec7f490c531ae2f748970116cd076dc604 | PHP | ervinne13/Inventory | /app/Models/Inventory/InventoryStock.php | UTF-8 | 5,815 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models\Inventory;
use App\Exceptions\OutOfStockException;
use App\Models\BelongsToAnItem;
use App\Models\CompositeKeys;
use App\Models\MasterFiles\Inventory\Item;
use App\Models\MasterFiles\Inventory\UOM;
use App\Models\MasterFiles\Location;
use Illuminate\Database\Eloquent\Model;
class Inventory... | true |
4732f1a5522602fd6fbc88522535c7e4083e8fd2 | PHP | xsyk/recruit | /database/migrations/2017_06_28_071731_create_people_table.php | UTF-8 | 1,023 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePeopleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('people', function (Blueprint $table) {
$tab... | true |
1255cd93e21041e18d2086fe9c8a968f71cb2093 | PHP | onlylonely1986/1dv610L3 | /view/LoginView.php | UTF-8 | 4,423 | 3.109375 | 3 | [] | no_license | <?php
namespace view;
require_once("Messages.php");
class LoginView {
private static $login = 'LoginView::Login';
private static $logout = 'LoginView::Logout';
private static $name = 'LoginView::UserName';
private static $password = 'LoginView::Password';
private static $cookieName = 'LoginView::CookieName';
p... | true |
b9879128cd7a5cd38cf383869eb226a4b9dc069a | PHP | theperfectcoder/carcas-backend-laravel | /app/Api/Http/Middleware/ApiProperties.php | UTF-8 | 1,101 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Api\Http\Middleware;
use Api\Repositories\UserRepository;
use Closure;
use Illuminate\Http\Request;
/**
* Class ApiProperties
* @package Api\Http\Middleware
*/
class ApiProperties
{
/**
* @var UserRepository
*/
protected $userRepository;
/**
* ApiProperties constructor.... | true |
b0d61e1ed5f3fc4e1f4048d953a50b60ddb8db90 | PHP | vgrankin/symfony_4_customer_service_rest_api | /src/Entity/User.php | UTF-8 | 1,354 | 2.59375 | 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;
/**
* @ORM\Entity
* @UniqueEntity("email")
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
* @ORM\Table(name="user")
*/
cla... | true |
0adb6c936fcef8d9c60cb1bac2972709f26b305c | PHP | fred0r/cbftp-ui | /tests/ByteArrayTest.php | UTF-8 | 2,957 | 3.046875 | 3 | [
"Unlicense"
] | permissive | <?php declare(strict_types=1);
require_once __DIR__.'/../vendor/autoload.php';
use PHPUnit\Framework\TestCase;
use TRD\Utility\ByteArray;
final class ByteArrayTest extends TestCase
{
public function testAppendFromEmpty(): void
{
$bytes = new ByteArray(null);
$bytes->append("IRC message\n");
... | true |