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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4f2eb9919050c98459c5548fbd6202172070211c | PHP | netpoe/matiox | /app/Entities/ProductSubcategory.php | UTF-8 | 3,445 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Entities;
use App\Model\{
Dictionary\DictProductSubcategoriesAdapter as DictProductSubcategories
};
class ProductSubcategory
{
protected $id;
protected $class;
protected $key;
protected $value;
protected $categoryId;
protected $dependencies;
public function _... | true |
42c76377d85b5d982e240c7a85cd1164cac3d02d | PHP | gerardparareda/PWBOX | /src/Model/EmailSender.php | UTF-8 | 1,726 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace PwBox\Model;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
require_once __DIR__ . '/../../vendor/autoload.php';
class EmailSender
{
protected $container;
// Create the Transport
protected... | true |
782f49c2889154fb906f3d48e5f94fb697d39de0 | PHP | FernandoLeivaBrenes/PHP-mvc | /models/Prestamo.php | UTF-8 | 634 | 2.5625 | 3 | [] | no_license | <?php
/**
* @author Fernando Leiva Brenes < Fernando.leiva.brenes@gmail.com >
*
* MODELO PRESTAMO - entidad prestamo en la BBDD
*
* @access public
* @category model
*/
require_once "core/Model.php";
class Prestamo extends Model
{
protected $id = 'prestamo'... | true |
06290ae6adb63349859c540d327b3b873b3debc1 | PHP | InterNations/SolrQueryComponent | /src/InterNations/Component/Solr/Expression/LocalParamsExpression.php | UTF-8 | 1,354 | 2.9375 | 3 | [] | no_license | <?php
namespace InterNations\Component\Solr\Expression;
use InterNations\Component\Solr\ExpressionInterface;
use InterNations\Component\Solr\Util;
class LocalParamsExpression extends Expression
{
/** @var ExpressionInterface|string */
private $type;
/** @var mixed[] */
private array $params;
/**... | true |
06c5655541c0cf65dafc077778663c7bbbb3f00c | PHP | TysonAndre/php-parser-to-php-ast | /convert_codestyle.php | UTF-8 | 1,772 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
function print_usage_and_exit(string $msg = '') {
global $argv;
fprintf(STDERR, "%sUsage: %s pathname.php\nConverts fooBar to foo_bar in variable names\n", $msg ? $msg . "\n" : '', $argv[0]);
exit(1);
}
function convert_codestyle() {
error_reporting(E_ALL);
global $argv;
if (count($argv)... | true |
77452bc33ff34abe401ffeed1b04276ee8fe5c47 | PHP | karlCobb/WebPractice | /gary/rating.php | UTF-8 | 1,178 | 2.6875 | 3 | [] | no_license | <?php
if(isset($_POST['rating']) && isset($_POST['id'])){
$conn = new mysqli('localhost', 'root', '', 'gary');
if(mysql_errno())
{
exit('Connection failed: ' . mysql_connect_error());
}
$rating = $_POST['rating'];
$id = $_POST['id'];
$get_rating_stats = "SELECT accum_rating, num_ratings FROM postings WHERE id=$id";
... | true |
a08d8012f255f213ae5c4dc221dc130a79163304 | PHP | arhikesha/patterns | /ApplicationController/woo/controller/command/command.php | UTF-8 | 845 | 2.90625 | 3 | [] | no_license | <?php
namespace AppController\woo\command;
abstract class Command{
private static $STATUS_STRINGS = array(
'CMD_DEFAULT'=>0,
'CMD_OK'=>1,
'CMD_ERROR'=>2,
'CMD_INSUFFICIENT'=>3
);
private $status = 0 ;
final function __construct(){}
function execute( \AppController\woo\controller\Request $request )... | true |
39d8f3d14b7011468623a1762f2e7ffcc2a1149f | PHP | Nipuna-Sankalpa/sasip_student_online_management_system | /symfony/src/Sasip/ClassUserBundle/Controller/ClassConfigurationController.php | UTF-8 | 4,247 | 2.703125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Sasip\ClassUserBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Ht... | true |
328d43c0ba3d673c98c296a4a275be0fc243348d | PHP | MateusAraujo9/laravel1 | /app/Http/Controllers/TarefasController.php | UTF-8 | 2,462 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Tarefa;
class TarefasController extends Controller
{
public function index()
{
$list = Tarefa::all();
$retorno = [
'list' => $list
];
return view('tarefa... | true |
941e42d5d77587e05ec4eee84279e7a01b62d4cc | PHP | kmarkcn/guoguoda | /Addons/GuoGuoUser/Model/GuoGuoUserModel.class.php | UTF-8 | 4,855 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Addons\GuoGuoUser\Model;
use Think\Model;
use Think\Template\Driver\Mobile;
use Addons\GuoGuoUser\Controller\GuoGuoUserController;
/**
* 后台模型
*/
class GuoGuoUserModel extends Model{
/*
* 2014-10-13 by terry
* 用户数据处理模型
*/
function gguser_handle($list_data){
foreach($list_d... | true |
7a79c702889be6abf58559b214d8b9d94e00c0e0 | PHP | lexus-ceh/cms | /src/Application.php | UTF-8 | 1,642 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
use Exception;
use Illuminate\Database\Capsule\Manager as Capsule;
class Application
{
private $router;
public function __construct(Router $router)
{
$this->router = $router;
$this->initialize();
}
public function initialize()
{
$capsule = new Cap... | true |
50ae3f77b5f842237570e2003a2baeb6a97314cc | PHP | rinchetra/upload_images_php | /index.php | UTF-8 | 1,874 | 3.25 | 3 | [] | no_license | <?php
$msg = "";
// connect to the database
$db=mysqli_connect("localhost","root","","photome_db");
if (!$db) {
die("Connection Error");
//}else{
//echo "Connection Successfully";
}
// if upload button is pressed
if (isset($_POST['upload'])) {
// the parth to store the upload image
$target = "image/".basename($_FIL... | true |
34283fa2368b5154a5b0c5ee701694429aa4f3e4 | PHP | Jachimowski-Pawel/Projekt-testowy | /index.php | UTF-8 | 1,175 | 2.71875 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<?php
echo("<h1>docker-działa</h2>");
echo("<h2>docker-zmiana");
require("connect.php");
$sql="SELECT*FROM pracownicy";
echo("<h2>Polecenie: Wszyscy pracownicy </h2>".$s... | true |
839750c9e3b8fa9f18c7770bd76cdc95f4917486 | PHP | jntd11/testbid | /gallery/gallery.php | UTF-8 | 1,208 | 2.5625 | 3 | [] | no_license | <?php
/**
* @package AuctionsFactory
* @version 1.5.7
* @copyright www.thefactory.ro
* @license: commercial
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
class auct_gallery{
/*@var $_db DBTable */
var $_db=null;
var $imagelist=array();
var $imagelist_ids=array();
function getG... | true |
a31c062a25affb01047f0ed80955a4306f501ae1 | PHP | vkoudela/Crash-Analytics | /application/library/Bootstrap/Input/AbstractElement.php | UTF-8 | 661 | 2.875 | 3 | [
"MIT"
] | permissive | <?php namespace Bootstrap\Input;
abstract class AbstractElement extends \Bootstrap\HtmlElement {
/**
* The name of element
* @var string
*/
protected $name = null;
/**
* Set the element's name
* @param string $name
* @return \Bootstrap\Input\AbstractElement
*/
public function name($name) {
$this-... | true |
7fd35e0909a8dac172f93966104ddf32cb37ccfc | PHP | jamesllewellyn/mybookcase | /app/ShelfBook.php | UTF-8 | 1,080 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ShelfBook extends Model
{
use SoftDeletes;
protected $dates = ['deleted_at'];
public $table = "shelf_books";
/**
* The attributes that are mass assignable.
*
* @var array
... | true |
28f12a8e599bf3b5f8ff48e80404f0948f8071b2 | PHP | tsn3/MVC | /mvc/views/catalog/index.php | UTF-8 | 655 | 2.65625 | 3 | [] | no_license | <?php require_once $_SERVER ['DOCUMENT_ROOT'] . '/views/header_second.php';?>
<?php
$data = File("products.csv");
echo "<b><i><h2><center>Прайс-лист</b></i></h2></center>";
echo "<center><table><tr>";
$dat_arr = explode(";", $data[0]);
for ($p=0;$p<count($dat_arr);$p++) {
echo "<td ><center><b><i>$dat_arr[$p]";
}
... | true |
313c3eb40a7288c9c1c02aa5d2b62869eac15e77 | PHP | akmcomau/openmvc | /core/classes/Pagination.php | UTF-8 | 6,908 | 2.8125 | 3 | [] | no_license | <?php
namespace core\classes;
class Pagination {
/**
* The configuration object
* @var Config $config
*/
protected $config;
/**
* The URL object
* @var URL $url
*/
protected $url;
/**
* The request object
* @var Request $request
*/
protected $request;
protected $ordering;
protected $dire... | true |
53387334659eef7ea778ba3137f1adb7eea3cec8 | PHP | luofei2011/calculater | /src/Calculater/Param.php | UTF-8 | 1,990 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
// +----------------------------------------------------------------------
// | Param.php [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2017 limingxinleo All rights reserved.
// +---------------------------------------------------... | true |
4098aa2130be2155f77250838ee0905901632c98 | PHP | zhxia/zhf | /system/classes/zhf/db/PDOStatement.php | UTF-8 | 1,255 | 2.71875 | 3 | [] | no_license | <?php
/**
*
* PDOStatement重写
* @author zhxia84
*
*/
class ZHF_DB_PDOStatement extends PDOStatement{
/**
*
* @var ZHF_Db_PDO
*/
private $pdo;
/**
*
* 此处不能使用public类型的构造方法
* @param $pdo
*/
protected function __construct($pdo){
$this->pdo=$pdo;
}
/**
... | true |
532e7096f82a628686f7b38e5658c6b861398036 | PHP | LeonardoDiPrimo/programacion-web-2 | /DAO/commentsDAO.php | UTF-8 | 1,545 | 2.6875 | 3 | [] | no_license | <?php
function daoCreateComment($data = array())
{
$comments = daoGetComments();
$comments[date('YmdHis')] = array(
"productId" => $data["productId"],
"email" => $data["email"],
"description" => $data["description"],
"qualification" => $data["qualification"],
"creationDa... | true |
cc55bfa53271b53fdb1dc4070dff09b9a2a2075d | PHP | roberthaydn/pjhsc-dirty-codes | /PHP/ooppractice/Class2.php | UTF-8 | 367 | 3.46875 | 3 | [] | no_license | <?php
require_once('Class1.php');
class Class2 {
private $_class1;
public function getData() {
return $this->_class1->getHello();
}
public function setData($data) {
$this->_class1->setHello($data);
}
public function __construct() {
$this->_class1 = new Class1();
}
}
$class = new Class2();
$class->s... | true |
130d376bc83f1af5f007f4309cbcf1d69c6c1913 | PHP | DreadLabs/app-migration-lock-ninjamutex | /src/TimeoutInterface.php | UTF-8 | 784 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the AppMigration\Lock\NinjaMutex package.
*
* (c) Thomas Juhnke <dev@van-tomas.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DreadLabs\AppMigration\Lock\NinjaMutex;
/**
* TimeoutI... | true |
d6d32e575e099d9e9c935059af2ec514d7fe7111 | PHP | EdouardQ/GSB-Symfony | /src/Controller/visitor/HomepageController.php | UTF-8 | 2,304 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controller\visitor;
use App\Repository\MedicationRepository;
use App\Repository\PractitionerRepository;
use App\Repository\UserRepository;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response... | true |
ff4a6d53e5e4b2fecc5ef1f99570f27d1448e6cc | PHP | Abug0/aabug.github.io | /php_class/FileManager.class.php | UTF-8 | 2,003 | 3.1875 | 3 | [] | no_license | <?php
/**
* 作者:
* 描述:FileManager类的声明与定义
* 创建日期:2017.10.2
* 修改日期:2017.10.26
*/
/**
* 对文件执行读写操作
*/
class FileManager
{
private $mFileName;
private $mFilePath;
private $mFileInner;
private $mRootPath = "../files";
public function __construct($fileName, $fileInner="")
{
$this->mFileName = $f... | true |
2e744748a9ed40b45d7668e6593abd2311a3b6d3 | PHP | Nex-Otaku/infinityweb-demo | /components/company_symbol_validator/CompanySymbolValidator.php | UTF-8 | 1,322 | 2.796875 | 3 | [] | no_license | <?php
namespace app\components\company_symbol_validator;
use yii\validators\Validator;
class CompanySymbolValidator extends Validator
{
private const COMPANY_NOT_FOUND = 'Не найдена компания.';
private $companySymbolStorage;
public function __construct(
CompanySymbolStorage $compan... | true |
ef7c5d5952eb7ad683a2bb0427be7c0539ff5d23 | PHP | kassko/data-mapper | /src/LazyLoader/LazyLoaderFactoryInterface.php | UTF-8 | 355 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Kassko\DataMapper\LazyLoader;
/**
* Abstraction for objet lazy loader factory.
*
* @author kko
*/
interface LazyLoaderFactoryInterface
{
/**
* Get the lazy loader of an entity.
*
* @param array $objectClass The entity class
*
* @return LazyLoader
*/
public fun... | true |
a750ea133b1cb66136860d7f2bb358b106dd1e2c | PHP | joekpe/mapit | /includes/mapdoc.php | UTF-8 | 410 | 2.71875 | 3 | [] | no_license | <?php
class MapDoc{
public static function new_map_doc($map_doc_id, $name, $institution_id, $created_by){
global $database;
$result = $database->query_db("INSERT INTO map_docs(map_doc_id, name, institution_id, created_by)VALUES('".$map_doc_id."', '".$name."', '".$institution_id."', '".$created_by."')");
... | true |
d13d22565edb3d01400d118db6ec3331c675d3ea | PHP | quyetdakmil/ahihi | /HungTNCLass/SQLObject.php | UTF-8 | 152 | 2.953125 | 3 | [] | no_license | <?php
Class SQLObject{
public $loc;
public $sql;
public function __construct($loc, $sql){
$this->$loc = $loc;
$this->$sql = $sql;
}
}
?> | true |
ff82b8b62d976e7cee062c199ed990cbeceeee8f | PHP | longfello/medical-agg-xr | /common/components/editors/EditorString.php | UTF-8 | 785 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: miloslawsky
* Date: 14.11.17
* Time: 13:59
*/
namespace common\components\editors;
/**
* Class EditorString
* @package common\components\editors
*/
class EditorString extends prototype
{
/**
* @return array
*/
public function rules()
{
$ru... | true |
cb14dd35b2c2e93f08c53f24f3cf1d2e5006d1b6 | PHP | ivab991/domaci-zadaci | /domaci04_IvaBoljevic/obradi_registraciju.php | UTF-8 | 1,528 | 2.65625 | 3 | [] | no_license | <?php
//var_dump($_POST);
if($_POST) {
$password = $_POST['password'];
$passwordAgain = $_POST['passwordAgain'];
if( $password != $passwordAgain) {
echo "Lozinka se ne poklapa!";
return false;
}
}
?>
<html>
<head>
<title>Registracija</t... | true |
f329f63796a65e3bc120ed35ff9cda5a91428d9d | PHP | taniacalderon/paula | /alumno.entidad.php | UTF-8 | 286 | 2.671875 | 3 | [] | no_license | <?php
class Alumno
{
private $identificacion;
private $Nombres;
private $Apellidos;
private $telefono;
private $direccion;
private $correomisena;
public function __GET($k){ return $this->$k; }
public function __SET($k, $v){ return $this->$k = $v; }
}
?> | true |
cf803b1f243ca54490c9b0122d7996b3c91f6d2d | PHP | pwFoo/storage | /tests/Fixtures/Album/AlbumHydrator.php | UTF-8 | 1,067 | 2.625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Igni\Tests\Fixtures\Album;
use Igni\Storage\Hydration\GenericHydrator;
use Igni\Storage\Hydration\ObjectHydrator;
use Igni\Tests\Fixtures\Track\TrackEntity;
use Igni\Tests\Fixtures\Track\TrackRepository;
class AlbumHydrator implements ObjectHydrator
{
private $baseHydrato... | true |
c02da1b66ba5feee4f85ea5f526aa3ed34891edc | PHP | sa1g0n1337/phpmvc | /index.php | UTF-8 | 1,172 | 2.671875 | 3 | [] | no_license | <?php
ob_start();
session_start();
include('library/autoload.php');
include('library/database.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>User manager</title>
</head>
<body>
<?php
if (isset($_SESSION['name'])) {
echo '<p>Welcome '.$_SESSION['name'].'</p>';
echo '<p><a href="index.php?c=user&a=lo... | true |
562fe4a36e16f6ae33273d261de56b7536dc409e | PHP | ivanov1dev/foundation | /class/Producer/ProducerInterface.php | UTF-8 | 1,869 | 2.703125 | 3 | [] | no_license | <?php
/**
* Интерфейс продюсера.
*/
interface ProducerInterface {
/**
* Сеттер сериализатора.
*
* @param SerializerInterface $serializer
* Объект сериализатора.
*
* @return self
* Текущий объект.
*/
public function setSerializer(SerializerInterface $serializer);
/**
* Сеттер дл... | true |
13c85a937668424c81ceaa0edef0acfefd3d2423 | PHP | MatusVrsansky/Nette-Blog | /app/forms/PostForm.php | UTF-8 | 1,752 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Forms;
use Nette\Application\UI\Form;
class PostForm
{
/**
* @var
*/
public $id;
/**
* @var \Nette\Database\Context
*/
public $database;
/**
* @var \Nette\Security\User
*/
public $user;
/**
* PostForm constructor.
*
* @pa... | true |
addc77690e5196d562b82da3067c839018ea46ab | PHP | mrizkir/simonev | /backend/database/migrations/2020_03_23_132400_create_menu_table.php | UTF-8 | 1,160 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMenuTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('menu', function (B... | true |
91819c36874e19c5b6c84f2f71c82bf2418b65df | PHP | kiezmor/piscine_php | /D01/ex10/do_op.php | UTF-8 | 414 | 3.265625 | 3 | [] | no_license | #!/usr/bin/php
<?php
if ($argc != 4)
exit("Invalid numbers of arguments!\n");
if (strpos($argv[2], "+"))
echo ($argv[1] + $argv[3])."\n";
elseif (strpos($argv[2], "-"))
echo ($argv[1] - $argv[3])."\n";
elseif (strpos($argv[2], "/"))
echo ($argv[1] / $argv[3])."\n";
elseif (strpos($argv[2], "%"))
echo ($a... | true |
84575d0d0556399c3e16f3d49d2086b33fd7c720 | PHP | woody2allen/woody2allen.github.io | /elisha-landing/mail.php | UTF-8 | 1,052 | 2.65625 | 3 | [] | no_license | <?php
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$born = trim($_POST['born']);
$phone = trim($_POST['phone']);
$country = trim($_POST['country']);
$title = trim($_POST['title']);
$text = trim($_POST['text']);
//Если ошибок нет, отправить email
$mail_header = "MIME-Version: 1.0\r\n";
$mail_header.=... | true |
01059d2bf097c340799920b175b57cfc64513a71 | PHP | y5f/Projects | /projet-aviaco/appli-aviaco/templates/modules/Colonnemenu.php | UTF-8 | 1,407 | 2.6875 | 3 | [] | no_license | <?php
class Colonnemenu extends Template{
function __construct() {
parent::__construct(new Aside());
$this->form->setAttribute('class', 'col-menu');
//--- On selection les menu qui constituent la colonne de gauche --//
$bloc_aside=new Hgroup();
$u... | true |
a56b22f0def7f979c36f664b1da0306b409c188a | PHP | jaytaph/spacetraders | /src/Api/Component/ContractDelivery.php | UTF-8 | 559 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Jaytaph\Spacetraders\Api\Component;
class ContractDelivery
{
public string $destination;
public string $tradeSymbol;
public int $unitsFulfilled;
public int $unitsRequired;
public static function fromJson(array $data): self
{
$result = new self();
$result->desti... | true |
3c20200c3ef3041d1b155c618b84da4f2931b438 | PHP | marquesfelipesilva/sgf | /view/excluirPedido.php | UTF-8 | 5,005 | 2.53125 | 3 | [] | no_license | <?php
#iniciar_sessao
session_start();
#função para resolver problema de header
ob_start();
#define codificação
header('Content-Type: text/html; charset=UTF-8');
#inclui o arquivo da classe de controle
include_once '../control/controlPedido.class.php';
#cria o objeto de controle
$cc = new ControlPedid... | true |
4d7795898312be45db0f0a9384137b37afdb3e22 | PHP | Noneslad/CRW-Sup2I | /controllers/mediaController.php | UTF-8 | 3,025 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: BaBar
* Date: 09/05/2016
* Time: 19:12
*/
namespace Noneslad\Controllers;
use Noneslad\Entity\Media;
use Noneslad\Entity\User;
use Noneslad\Tools\WebTools as WT;
use Noneslad\Tools\DB\model as DB;
class MediaController
{
public static function ro... | true |
e559dccc41f1c71ebec68ccf728ef4c516f08fe2 | PHP | viktorgreamer/agent1.pro | /models/ParsingSourceModels/Cian.php | UTF-8 | 5,617 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models\ParsingSourceModels;
use app\models\Parsing;
use app\models\Sale;
use yii\base\Model;
use phpQuery;
use app\models\ParsingExtractionMethods;
/**
* Created by PhpStorm.
* User: Admin
* Date: 20.12.2017
* Time: 21:17
*/
class Cian extends Sale
{
public function UnparsePage($pq, $ur... | true |
63fb194edb3b623a996b57abfaacf5e8b588de71 | PHP | kuznetsovsite/savetime-test | /FileEntity.php | UTF-8 | 2,665 | 3.109375 | 3 | [] | no_license | <?php
namespace FileUpload;
class FileEntity
{
protected $id;
protected $title;
/** @var string $fullPath - полный путь */
protected $fullPath;
protected $path;
protected $createdAt;
protected $fileSize;
protected $urlId;
protected $ext;
protected $mimeType;
public... | true |
f11828f8fb7d4c5eccebb87dadd0a2b27aa903b5 | PHP | tgglv/cache_practices | /store/src/Repository/CachedRepository.php | UTF-8 | 1,228 | 2.734375 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Repository;
use App\Service\RedisConnection;
class CachedRepository extends BookRepository
{
private const CACHE_HASH_BOOK = 'cache:hash:book';
private const CACHE_HASH_BOOK_COLLECTION = 'cache:hash:book_collection';
private const SINGLE_KEY = 'single';
... | true |
d33f7ff613710d7e2717d35952821e63f52a4209 | PHP | vehler/timesheet | /timesheet.insolpr.net/api/settings.php | UTF-8 | 984 | 2.84375 | 3 | [] | no_license | <?php
/**
* Description of settings
*
* @author vehler
*/
class settings {
public function __construct() {
}
public function get_all($raw = false, $return = false) {
global $db;
$where = ['autoload' => '1'];
if ($raw) {
$where['enabled'] = '1';
}... | true |
94794da406bd6d6f74807e8eb06e351daeed6eb9 | PHP | JRSaunders/ShardMatrix | /src/DB/Builder/Model.php | UTF-8 | 659 | 2.671875 | 3 | [] | no_license | <?php
namespace ShardMatrix\DB\Builder;
use ShardMatrix\DB\DataRow;
class Model extends DataRow {
public function save(): bool {
$uuid = $this->getUuid();
if ( isset( $this->row->modified ) ) {
$this->row->modified = ( new \DateTime() )->format( 'Y-m-d H:i:s' );
}
return (bool) DB::table( $uuid->getT... | true |
c3cefd0c401ec0f3c1b3876aa9321d99c3918981 | PHP | nmartinezPGC/acaculh | /symfony-copia/src/BackendBundle/Entity/TblTipoDocumento.php~ | UTF-8 | 1,847 | 2.5625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace BackendBundle\Entity;
/**
* TblTipoDocumento
*/
class TblTipoDocumento
{
/**
* @var integer
*/
private $idTipoDocumento;
/**
* @var string
*/
private $codTipoDocumento;
/**
* @var string
*/
private $descripcionTipoDocumento;
/**
* @va... | true |
ced4e6496e0df2d5b4fd051dc5482c293c4fb9f2 | PHP | zawiszaty/cart-api | /src/Module/Catalog/Application/ChangeProductPrice/ChangeProductPriceHandler.php | UTF-8 | 895 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Module\Catalog\Application\ChangeProductPrice;
use App\Infrastructure\CommandBus\CommandHandler;
use App\Module\Catalog\Domain\ProductId;
use App\Module\Catalog\Domain\ProductPrice;
use App\Module\Catalog\Domain\ProductRepositoryInterface;
final class ChangeProductPriceH... | true |
b9937e6e1372c240644e6426ae725377412e5f3f | PHP | let-algorithmic-group/leetcode | /w1_21/shangyi/合并两个有序链表.php | UTF-8 | 2,004 | 3.25 | 3 | [] | no_license | /**
* Definition for a singly-linked list.
* class ListNode {
* public $val = 0;
* public $next = null;
* function __construct($val) { $this->val = $val; }
* }
*/
class Solution {
/**
* @param ListNode $l1
* @param ListNode $l2
* @return ListNode
*/
function mergeTwoLists... | true |
51e67dc1d19ec2382ea0c17a20248d98857e853d | PHP | jknito/kTemplate | /protected/helpers/MailHelper.php | UTF-8 | 2,021 | 2.578125 | 3 | [] | no_license | <?php
class MailHelper {
public static function sendMail($mensaje) {
$tipo = pb("mail", "tipo");
//dd($tipo);
if($tipo->valor == "gmail"){
$config = array(
'ssl' => 'tls',
'port' => 587,
'auth' => 'login',
'username' => $tipo->referencia_1,
'password' => $tipo->referencia_2,
);
... | true |
d7eae0a8328bab3ab3c828e2d3ee59df033a337d | PHP | eodoxus/m.jaygordo.com | /application/classes/controller/account/logout.php | UTF-8 | 305 | 2.515625 | 3 | [] | no_license | <?php
/**
* Use this service to end a user's session and release the auth_token. You'll probably never need this, but just in case...
*/
class Controller_Account_Logout extends Controller_API {
/**
* Log the current user out.
*/
public function action_index() {
User::current()->logout();
}
} | true |
d4ed9266e908e081087c0dd61507fbbb4c3f6503 | PHP | tokenly/bitcoin-p2p-php | /src/Factory.php | UTF-8 | 1,681 | 2.8125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace BitWasp\Bitcoin\Networking;
use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Crypto\Random\Random;
use BitWasp\Bitcoin\Network\NetworkInterface;
use BitWasp\Bitcoin\Networking\Dns\Resolver;
use BitWasp\Bitcoin\Networking\Structure\NetworkAddressInterface;
use React\EventLoop\LoopInterface;
class Fact... | true |
c06415a64c657a1cf5d72347a114cf5f33b2464b | PHP | SKSteeve/Courses | /02.TechFunfamentals-php/02.ExercisesTech/19.Associative_Arrays-Lab-php/04.SumByTown.php | UTF-8 | 370 | 3.3125 | 3 | [] | no_license | <?php
$arr = explode(', ', readline());
$count = count($arr);
$results = [];
for($i = 0; $i < $count; $i++)
{
if($i % 2 == 0 && !key_exists($arr[$i], $results))
{
$results[$arr[$i]] = 0;
}
else if($i % 2 != 0)
{
$results[$arr[$i-1]] += $arr[$i];
}
}
foreach ($results as $key =... | true |
af587dc9963555900d4dbccab68160b99560923c | PHP | AndrienkoAlexander/cms-mvc | /models/model_car.php | UTF-8 | 6,590 | 3.34375 | 3 | [] | no_license | <?php
/**
* Класс для обработки товаров(машин)
*/
class Model_Car
{
// Свойства
/**
* @var int ID машин из базы данных
*/
public $id = null;
/**
* @var string Название машины
*/
public $name = null;
/**
* @var int Цена машины
*/
public $price = null;
/**
* @var int Серийный номер
... | true |
5d60c06a5e134d4c758250c88e1ef9166b55e30c | PHP | vipontes/quotes-api | /App/v1/Middlewares/JwtDateTimeMiddleware.php | UTF-8 | 1,578 | 2.8125 | 3 | [] | no_license | <?php
namespace App\v1\Middlewares;
use App\v1\DAO\UsuarioDispositivoDAO;
use Firebase\JWT\JWT;
use Psr\Http\Message\{
ServerRequestInterface as Request,
ResponseInterface as Response
};
final class JwtDateTimeMiddleware
{
public function __invoke(Request $request, Response $response, callable $next): Re... | true |
e6d8a2784153da15a214ec833b91803951c78f9f | PHP | FreeUKGen/FreeUKGenealogy | /craft/plugins/oauth/vendor/chrisnharvey/oauth/src/OAuth/Provider/Dropbox.php | UTF-8 | 1,267 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace OAuth\Provider;
use \OAuth\OAuth1\Request\Resource;
class Dropbox extends \OAuth\OAuth1\Provider
{
public $name = 'dropbox';
public function requestTokenUrl()
{
return 'https://api.dropbox.com/1/oauth/request_token';
}
public function authorizeUrl()
{
return ... | true |
c24adbcfd0af86fb5e3f9a4a2c835a9a1cf76fc4 | PHP | mbonneau/HHVMCraft | /src/HHVMCraft/Core/Networking/Packets/UpdateHealthPacket.php | UTF-8 | 435 | 2.90625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace HHVMCraft\Core\Networking\Packets;
use HHVMCraft\Core\Networking\StreamWrapper;
class UpdateHealthPacket {
const id = 0x08;
public $health;
public function __construct($health=0) {
$this->health = $health;
}
public function writePacket(StreamWrapper $StreamWrapper) {
$p = $StreamWrapper->w... | true |
22e857808f75812f390053db2fe6f4546cc4d717 | PHP | sb727/test9 | /application/controllers/AjaxProcess.php | UTF-8 | 742 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
include_once("../model/Model.php");
class Controller {
public $model;
public function __construct()
{
$this->model = new Model();
}
public function showAllHotels()
{
$Hotels = $this->model->getHotelList();
}
public functio... | true |
55dc7331a1ea4f3f877e836aa0e548c8aed76b5a | PHP | AliRamzan089/Quete-POO | /Bicycle.php | UTF-8 | 211 | 2.96875 | 3 | [] | no_license | <?php
require_once 'Vehicle.php';
class Bicycle extends Vehicle
{
public function switchOn(): bool
{
return true;
}
public function switchOff(): bool
{
return false;
}
} | true |
8174218741c186eaaf92e23261c24b3f39c69f5c | PHP | jlr2k8/gaseous | /app/libraries/Content/Menu.php | UTF-8 | 12,946 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Josh L. Rogers.
* Copyright (c) 2020 All Rights Reserved.
* 3/13/20
*
* Menu.php
*
* Menu administration and rendering class
*
**/
namespace Content;
use Content\Templator;
use Db\PdoMySql;
use Db\Query;
use Exception;
use Log;
use Settings;
class Menu
{
public $admin = false;
... | true |
1cb5984211c09798431d18eeeb3126eac4ff8047 | PHP | d-a-gerashenko/ru.cherezweb.hosting | /ru.cherezweb.hosting.dns/trunk/src/CherezWeb/Hosting/Dns/DnsRecord.php | UTF-8 | 7,162 | 2.796875 | 3 | [] | no_license | <?php
namespace CherezWeb\Hosting\Dns;
class DnsRecord
{
public static function createFromArray(array $params)
{
$keys = array('id', 'syncPos', 'updated', 'type', 'domainBaseName', 'host', 'value', 'priority', 'isDeleted');
$unfoundKeys = array_diff($keys, array_keys($params));
if (cou... | true |
71df1526926e2d30ea0ed80247c9dd2512625f26 | PHP | joaopedrosr/cqqev | /app/Models/Receita.php | UTF-8 | 816 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Receita extends Model
{
use HasFactory;
protected $guarded = ['id', 'create_at', 'updated_at'];
public function getRouteKeyName(){
return "slug";
}
//relac... | true |
4c8b8e3c1167e87b8db844a77e684a2b644e8e57 | PHP | Zuntechi/Zuntechi | /www/filehandling/file1.php | UTF-8 | 596 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | <?php
if (isset($_POST['name'])) {
$name = $_POST['name'];
if (!empty($name)) {
$handle = fopen('names.txt', 'a');
fwrite($handle, $name."\n");
fclose($handle);
echo 'Current names in file: ';
$count = 1;
$readin = file('names.txt');
$readin_count = count($readin);
foreach($readin as $fname) {
echo... | true |
3101875d07ee5e802520b2c153f76ed7f222e3fc | PHP | jakobbuis/stripey | /app/Locator/Locator.php | UTF-8 | 784 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Locator;
use App\Calendar\Calendar;
use App\Person;
use Carbon\CarbonImmutable;
class Locator
{
private $person;
public function __construct(Person $person)
{
$this->person = $person;
}
public function status(): Status
{
$calendar = new Calendar($this->pe... | true |
e1bc287c0ab977e063f7887acb165de6c3a60d50 | PHP | GiuseppeCannata/CouponLand | /application/forms/Admin/Azienda.php | UTF-8 | 4,466 | 2.546875 | 3 | [] | no_license | <?php
class Application_Form_Admin_Azienda extends App_Form_Abstract
{
protected $categorie_select;
/* public function __construct( $azienda = null ){
$this->categorie_select = new Zend_Form_Element_Select('Tipologia');
$this->categorie_select->setLabel('Tipologia: ');
... | true |
1713afe4299cdb88bc9925e3f646eb5fc96894f0 | PHP | Bilal77130/meero | /src/Services/ListOrder.php | UTF-8 | 559 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Services;
class ListOrder
{
private $linkApi;
public function __construct(string $linkApi)
{
$this->linkApi = $linkApi;
}
public function getOrders(): array
{
$orders = $this->convert(file_get_contents($this->linkApi));
return $orders['orders']['or... | true |
a2eeafae5f73df069a3506846b20d9901347ce9e | PHP | marieloujo/mms_api | /app/Services/ConversationService.php | UTF-8 | 934 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\ConversationRepository;
use App\Services\Contract\AbstractService;
use App\Services\Contract\ServiceInterface\ConversationServiceInterface;
use Illuminate\Http\Request;
class ConversationService extends AbstractService implements ConversationServiceInterface
{
... | true |
538864a70f31d5a5bf45398206cd88c0cf7e8346 | PHP | and85620/R-Cube_MRBS | /upgrade.inc | UTF-8 | 2,725 | 2.96875 | 3 | [] | no_license | <?php
namespace MRBS;
// Upgrade between database schema versions.
//
// Returns FALSE on error, TRUE is successful
function upgrade_echo($message)
{
echo $message;
// Flush the message, so that there's some progress information
// output to the browser even when the upgrade is taking a while
if (ob_get_leng... | true |
e1847161fb78ee353b68d93cf58f2840132f612b | PHP | justinphilipdev/learn-clean-code | /src/DesignPatterns/Bridge/Employee.php | UTF-8 | 1,096 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace LearnCleanCode\DesignPatterns\Bridge;
use LearnCleanCode\DesignPatterns\Bridge\Calculator\PaymentCalculator;
use LearnCleanCode\DesignPatterns\Bridge\Scheduler\PaymentScheduler;
/**
* Class Employee
* @package LearnCleanCode\DesignPatterns\Bridge
*/
class Employee
{
/**
* @v... | true |
7bd5b252236d65ad74b440461ed1d125e397070e | PHP | Jarvvski/R3-Web | /dist/inc/classes/View.php | UTF-8 | 668 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Simple model for displaying views
*
* @author Titan
**/
class View {
public static function Instance() {
static $inst = null;
if ($inst === null)
$inst = new View();
return $inst;
}
public function render($view, $viewData) {
... | true |
314311577865076ec0282ce95d5687b4be9c1350 | PHP | tahmina8765/Zf2auth_old | /module/Zf2auth/src/Zf2auth/Entity/Users.php | UTF-8 | 4,862 | 2.515625 | 3 | [] | no_license | <?php
namespace Zf2auth\Entity;
use Zend\InputFilter\Factory as InputFactory;
use Zend\InputFilter\InputFilter;
use Zend\InputFilter\InputFilterAwareInterface;
use Zend\InputFilter\InputFilterInterface;
use Zend\Validator\EmailAddress;
class Users
{
public $username;
public $email;
public... | true |
cd0f1b2c039a56e5a9c494687581ab7d69436665 | PHP | sni10/warpscan | /app/Console/Commands/ScanUser.php | UTF-8 | 949 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Http\Scanner\Scanner;
use Illuminate\Console\Command;
class ScanUser extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'scan {user}';
/**
* The console command descriptio... | true |
d0e39131820ceea417d55187435ccffa19d693e9 | PHP | RomanPanshyn/bintime | /models/Addresses.php | UTF-8 | 1,651 | 2.625 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "addresses".
*
* @property int $id
* @property int $user_id
* @property int $zip
* @property string $country
* @property string $city
* @property string $street
* @property string $house
* @property string $flat
*
* @property Us... | true |
67dc88de6b1dc29060af8a8ec0b4b3180e49ee69 | PHP | Sywooch/trash | /docdoc/diagnostica/public/protected/models/AreaMoscow.php | UTF-8 | 3,047 | 2.78125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "area_moscow".
*
* The followings are the available columns in table 'area_moscow':
* @property integer $id
* @property string $rerwite_name
* @property string $name
* @property string $full_name
*/
class AreaMoscow extends CActiveRecord
{
/**
* Returns the stat... | true |
434d820ca352dc33f2043938ef8bce3f06f9bdb7 | PHP | sultanyan/blogging-system | /search.php | UTF-8 | 2,945 | 2.578125 | 3 | [] | no_license | <?php require 'includes/db.php'; ?>
<?php include 'includes/header.php' ;?>
<?php include 'includes/navigation.php'; ?>
<!-- Page Content -->
<div class="container">
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-8">
... | true |
65af584aa59dfb337bfd250548c3a850ed7be240 | PHP | udayptl9/lmsProj | /calcu.php | UTF-8 | 876 | 2.828125 | 3 | [] | no_license | <html><head><title>Final</title></head>
<?php
$crlst = unserialize($_GET['crlst']);
function fina() {
$grlst = array('s'=>10,'a'=>9,'b'=>8,'c'=>7,'d'=>6,'e'=>5,'u'=>0);
$gra = array('s','a','b','c','d','e','u');
$i = 0;
$c = 0;
global $crlst, $_GET;
array_pop($_GET);
foreach($crlst as $sub=>$credit) {
foreach... | true |
f819f714870ef6156d08833596ab8abb7c473f5e | PHP | tato-rj/PianoLIT | /app/Services/PianoLIT/PianoLIT.php | UTF-8 | 348 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Services\PianoLIT;
class PianoLIT
{
public function email($type = 'general')
{
if (isset(config('app')['emails'][$type]))
return config('app')['emails'][$type];
return null;
}
public function appToWebapp($url)
{
$url = substr_replace($url, 'my.', 8, 0);
return str_rep... | true |
be3b34db6124234e7ba5abca3c46469d15f1c12c | PHP | Pyozer/TwitterRemake | /core/init.php | UTF-8 | 1,444 | 2.53125 | 3 | [] | no_license | <?php
/**
* Fichier Init, permet de lancer les autoloader
* Défini aussi les paramètres par défaut du site
*/
use Core\Config;
use App\AutoloaderApp;
session_start();
define('ROOT', dirname(__DIR__));
require ROOT . '/core/config.php';
require ROOT . '/app/AutoloaderApp.php';
require ROOT . '/app/vendor/functions.... | true |
693453b079395d2214bc785766b8972ec358b788 | PHP | junlz/PHP-DEMO | /Curlcontent.php | UTF-8 | 1,601 | 2.546875 | 3 | [] | no_license | <?php
//实现使用curl模拟百度蜘蛛进行采集
class Curlcontent{
protected function _GetContent( $url )
{
$this->ch = curl_init();
$this->ip = '220.181.108.'.rand(1,255); // 百度蜘蛛
$this->timeout = 15;
curl_setopt($this->ch,CURLOPT_URL,$url);
curl_setopt($this->ch,CURLOPT_TIMEOUT,0);
... | true |
c2982a68b4ed52b311caa1132ae95f093a6d389a | PHP | spereznetto/BotonAntipanico | /protected/extensions/rest-yii/RestController.php | UTF-8 | 3,985 | 2.59375 | 3 | [] | no_license | <?php
use Firebase\JWT\SignatureInvalidException;
use Firebase\JWT\ExpiredException;
/**
* @author Agustín Ronco
* @license http://mit-license.org/
*/
class RestController extends CController
{
protected function beforeAction($action)
{
if (Yii::app()->request->getRequestType() == 'OPTION... | true |
77803baa9962439fca23633ca765d4508b991679 | PHP | bauer01/webby | /app/Webby/System/LinkGenerator.php | UTF-8 | 912 | 2.75 | 3 | [] | no_license | <?php
namespace Webby\System;
use Nette\Application\IRouter;
use Nette\Http\Request;
use Webby\System\Pages\Route;
class LinkGenerator
{
private $router;
private $httpRequest;
public function __construct(IRouter $router, Request $httpRequest)
{
$this->router = $router;
$this->httpR... | true |
da0a508ee6cfc7937f0a75a894495bbef50bd60c | PHP | Zorox3/StarShadow | /include/classes/main/PageBuilder.class.php | UTF-8 | 2,307 | 2.703125 | 3 | [] | no_license | <?php
class PageBuilder{
private $_page;
public function __construct($page = null){
if($page !== null){
$this->_page = $page;
}
else
return false;
}
private static function saveCss($path, $tempFile){
$string= self::getPHPContent($path);
$f= fopen($tempFile, "wb");
fwrite($f,... | true |
bab4638cb59c4017d2cc156f535fbd878afa7193 | PHP | GSabadini/services | /order/src/Domain/ValueObject/Uuid.php | UTF-8 | 1,054 | 3.1875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Domain\ValueObject;
use Ramsey\Uuid\Uuid as RamseyUuid;
/**
* Class Uuid
*
* @package App\Domain\ValueObject
*/
final class Uuid
{
private string $value;
/**
* Uuid constructor.
*
* @param string $value
*/
public function __construct(s... | true |
1644e0be3fc14311da9bd35eff9fd0954b608eb0 | PHP | LeNguyenTanTai/chuyende | /cdptw_verson2/cdptw/database/migrations/2019_02_26_124456_create_flightdetails_table.php | UTF-8 | 1,191 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFlightdetailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('flightdet... | true |
ec9b9008b85a0f4bc7fc2e8348c8d4177273f595 | PHP | iampranavsethi/Online-REST-TTT | /config.php | UTF-8 | 1,165 | 2.546875 | 3 | [] | no_license | <?php
$host = "localhost";
$username = "root";
$password = "root";
$database = "ttt";
$conn = new mysqli($host, $username, $password, $database);
if ($conn -> connect_error)
die ("cannot connect!" . $conn->connect_error);
function error(){
echo json_encode(array('status' => "ERROR"), JSON_PRETTY_PRINT);
exit();
... | true |
575eb5d8b49d9d32ab400cea177f4af1cb273ae9 | PHP | ivan-uskov/emap | /src/View/SelectionGroupView.php | UTF-8 | 1,593 | 2.53125 | 3 | [] | no_license | <?php
namespace App\View;
use App\Module\Emap\Api\Output\SelectionOutput;
use App\Module\MusicXML\Api\Api as MusicXMLApi;
class SelectionGroupView
{
/** @var SelectionOutput[] */
private array $selections;
private array $yAxis = [];
private int $length = 0;
private bool $alreadySaved;
publi... | true |
6af3eb9eb295e8786603ccf53e407392abb0a4fc | PHP | ricardomga/nep-um-web | /api/objects/Domain.php | UTF-8 | 3,067 | 2.734375 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/../db/DbConn.php';
function addEditDomain($params){
$idDomain = $params['idDomain'];
$name = $params['name'];
$description = $params['description'];
$connection = dbConnect();
$response = array();
$query = "Select * From Domain Where name=... | true |
9a283dbb590cd2410f1e05977c34629d11002984 | PHP | StefanIsidorovic/manthano | /application/controllers/REST_activity_b.php | UTF-8 | 20,318 | 2.828125 | 3 | [] | no_license | <?php
class REST_activity_b extends MY_Controller {
private $supported_methods;
/* converting method name to lower letters for easier comapring */
private $method;
public function __construct(){
parent::__construct();
$this->load->helper('text');
... | true |
d851b6f6c24b17868a68867b3d3b1114567adbd7 | PHP | semyen/simple-search | /src/SimpleSearch/Cli/Command/UserSearchCommand.php | UTF-8 | 2,050 | 2.90625 | 3 | [] | no_license | <?php
namespace SimpleSearch\Cli\Command;
use SimpleSearch\Search\Handler\UserSearchHandler;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfo... | true |
2138ddc3f35a0885fa9fc37e8245069f19547595 | PHP | PacktPublishing/PHP-7-Programming-Cookbook | /Chapter 08/chap_08_formatting_currency.php | UTF-8 | 1,975 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
define('DB_CONFIG_FILE', __DIR__ . '/../config/db.config.php');
define('CURRENCY_CSV', __DIR__ . '/../data/files/iso_country_codes.csv');
// setup class autoloading
require __DIR__ . '/../Application/Autoload/Loader.php';
// add current directory to the path
Application\Autoload\Loader::init(__DIR__ . '/..');
... | true |
41c0475118f12bb71b4fff427eb829f31082084d | PHP | php-mq/protocol | /src/Types/PacketHeader.php | UTF-8 | 1,069 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* @author hollodotme
*/
namespace PHPMQ\Protocol\Types;
use PHPMQ\Protocol\Interfaces\DefinesPacket;
/**
* Class PacketHeader
* @package PHPMQ\Protocol\Types
*/
final class PacketHeader extends AbstractHeader implements DefinesPacket
{
private const PACKET_ID = 'P';
/** @va... | true |
0a75812785099cd1baf0437ca407a086973f816c | PHP | oscar2706/ArticulosCake | /src/Model/Entity/Articulo.php | UTF-8 | 1,034 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* Articulo Entity
*
* @property int $idArticulo
* @property string $slug
* @property string $titulo
* @property string $subtitulo
* @property string $contenido
* @property \Cake\I18n\FrozenDate $fechaCreacion
* @property string|resource $imagen
* @p... | true |
e0467c4fd94d658b76c89f9ebd19ffef03ee3617 | PHP | which1ispink/user-management | /src/AppBundle/Service/AbstractService.php | UTF-8 | 1,928 | 2.671875 | 3 | [] | no_license | <?php
namespace AppBundle\Service;
use AppBundle\Exception\EntityNotFoundException;
use AppBundle\ValueObject\Paging;
use Doctrine\Common\Persistence\ObjectManager;
/**
* Class AbstractService
*
* Contains the functionality common between all application services
*/
abstract class AbstractService implements Appli... | true |
3c96a381ef2d674e74607c4c3f99183f70827497 | PHP | Dzulmidnight/egconsultores | /scripts/submit.php | UTF-8 | 3,406 | 3.171875 | 3 | [] | no_license | <?php
$controller = new ContactController();
$controller->handleRequest();
exit();
class ContactController {
public function hasData() {
return isset($_POST['submit_contact']) == TRUE;
}
public function handleRequest() {
try {
if ($thi... | true |
4cca542066b415d7e5342435fee983ba4a0ec4b8 | PHP | max-dupont/workshop2 | /controllers/cSeConnecter.php | UTF-8 | 1,900 | 2.53125 | 3 | [] | no_license | <?php
if(!isset($_REQUEST['action']))
$action = 'connexion';
else
$action = $_REQUEST['action'];
// include("views/bandeau.php") ;
switch($action){
case 'connexion' :{
$table = null;
$login = null;
$password = null;
if (!empty($_POST['txtRole'])) {
$table = $_POST['txtRole'];
... | true |
94fa23ba49cdad8805381bb11a8f505771bbea88 | PHP | jiriferkl/dumbpass | /src/PassList.php | UTF-8 | 618 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace JiriFerkl\DumbPass;
/**
* Class PassList
*
* @package JiriFerkl\DumbPass
*/
final class PassList implements IPassList
{
/**
* Checks most common passwords.
* If ok -> returns TRUE.
*
* @param string $pass
*
* @return bool
*/
public function verify(string... | true |
8fe4572e1b22f230333a9cf0c2077860665c8c3e | PHP | FiftyNine/ScpperDB | /module/Application/src/Application/Utils/DbConsts/DbPages.php | UTF-8 | 843 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Application\Utils\DbConsts;
class DbPages
{
const TABLE = 'pages';
const __ID = '__Id';
const SITEID = 'SiteId';
const WIKIDOTID = 'WikidotId';
const TITLE = 'Title';
const NAME = 'Name';
const CATEGORYID = 'CategoryId';
const SOURCE = 'Source';
const ALTTITLE = 'Al... | true |
6d339759b543dfab18dffb2244af5aa6eff65863 | PHP | IraniaGalarzaluce/ProyectoSW | /Registrar.php | UTF-8 | 5,273 | 2.546875 | 3 | [] | no_license |
<?php
$link = mysqli_connect("localhost", "root", "", "quiz");
//$link = mysqli_connect("mysql.hostinger.es", "u531741362_root", "iratiania", "u531741362_quiz");
function validarExpresion($variable, $expresion){
$validar = array(
"options" => array("regexp"=>$expresion)
);
if(!filter_var($variable, FI... | true |