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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d1296840f96c50c2488997d3dab47d1a950850cb | PHP | davidgrigorianc/php_bot | /search.php | UTF-8 | 3,691 | 2.578125 | 3 | [] | no_license | <?php
require 'classes/Model/Page.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
... | true |
d902f498277639a4cc60801ef1bd35ee541afb9a | PHP | doaaMohmmed/hr | /module/Position/src/Position/Model/Position.php | UTF-8 | 2,165 | 2.90625 | 3 | [] | no_license | <?php
namespace Position\Model;
use Payment\Model\EntityInterface;
class Position implements EntityInterface {
private $id;
private $positionName;
private $organisationLevel;
private $positionLocation;
private $jobGradeId;
private $shortDescription;
private $section;
private $reportingPos... | true |
d3fafd13d930b05b6e72e581c4608caa91baff10 | PHP | backbone87/backboneit_solr | /TL_ROOT/system/modules/backboneit_solr/SolrSourceManager.php | UTF-8 | 1,727 | 2.796875 | 3 | [] | no_license | <?php
final class SolrSourceManager extends SolrAbstractSourceFactory {
public static function findSource($strName) {
return self::getInstance()->getSource($strName);
}
protected $arrFactories = array();
public function add(SolrSourceFactory $objFactory) {
$this->arrFactories[spl_object_hash($... | true |
ff43515f55fa433a9956abbfb606dfa2471cffa8 | PHP | jennponton1/jennponton1.github.io | /php/meshpage/page.class.php | UTF-8 | 9,314 | 2.953125 | 3 | [] | no_license | <?php
/*
PHP-Mesh - A page meshing framework for PHP.
Copyright (C) 2003-2009 Trejkaz
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License... | true |
638b1e7d8f0271d98cc4bb4168c23b12513526cf | PHP | insomynwa/avator-widget-pack | /modules/post-grid/skins/skin-filter.php | UTF-8 | 5,082 | 2.515625 | 3 | [] | no_license | <?php
namespace WidgetPack\Modules\PostGrid\Skins;
use Elementor\Skin_Base as Elementor_Skin_Base;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class Skin_Filter extends Elementor_Skin_Base {
public function get_id() {
return 'avt-filter';
}
public function get_title() {
return __( 'Filt... | true |
96a5116093538241d09cf4560baa4cd974050393 | PHP | ngitimfoyo/Nyari-AppPHP | /Source/vendor/jeremeamia/SuperClosure/src/hash_equals.php | UTF-8 | 1,454 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
if (! function_exists ( 'hash_equals' )) {
/**
* An implementation for the `hash_equals()` function.
*
* This exists to support PHP versions prior to 5.6 and is meant to work the
* same as PHP's function. The original code was written by Rouven Weßling.
*
* @param string $knownString
* Calc... | true |
4cc8161dddde0738f8dabda7fcebbdd8c5de3ad1 | PHP | asharilabs/learn-pintar-cs | /pakeformatstandarjson.php | UTF-8 | 1,642 | 3.328125 | 3 | [] | no_license | <?php
// ambil nilai-nilai variable di koneksi.php
include('koneksi.php');
// membuat koneksi ke database MYSQL
$connection = mysqli_connect($server, $username, $password, $database);
// membuat variable untuk JSON
$result = false;
$code = "000";
$message = "";
// cek apakah koneksi error, jika error mak... | true |
de4de587306685c955904f703573f2ef66d4f346 | PHP | RoccoChiarella/php-snacks-blocco-1 | /Snack3/index.php | UTF-8 | 2,399 | 2.609375 | 3 | [] | no_license | <?php
$posts = [
'10/01/2019' => [
[
'title' => 'Post 1',
'author' => 'Michele Papagni',
'text' => 'Testo post 1'
],
[
'title' => 'Post 2',
'author' => 'Michele Papagni',
'text' => 'Testo post 2'
... | true |
82e3e791d91241b9f097ca0c8c6eb0ecbea20b8e | PHP | guilhermefontans/algorithms-and-data-structure | /tests/DataStructure/Trie/TrieNodeTest.php | UTF-8 | 1,552 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\DataStructure\Trie;
use Algorithms\DataStructure\Trie\TrieNode;
use PHPUnit\Framework\TestCase;
/**
* Class TrieNodeTest
* @package Tests\DataStructure\Trie
*/
class TrieNodeTest extends TestCase
{
/**
* @var TrieNode
*/
private $trieNode;
pub... | true |
fa9a167c65191d66a939dbd2d26e993085db74e1 | PHP | KoalatyCode/projectRena | /src/Task/Resque/updatePrices.php | UTF-8 | 7,343 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace ProjectRena\Task\Resque;
use ProjectRena\RenaApp;
/**
* Fetches the data for the price table from EVE Central
*/
class updatePrices
{
/**
* The Slim Application
*/
private $app;
/**
* Performs the task, can access all $this->crap setup in setUp)
*/
public functio... | true |
8d0f4925dd5f05bc000a9c3931cbd1d8ba5e2638 | PHP | havocesp/BigNetWallet | /public_html/src/Lib/Csv.php | UTF-8 | 1,421 | 3.25 | 3 | [] | no_license | <?php
namespace App\Lib;
class Csv
{
/**
* Читает csv файл и возвращает массив
*
* @param $csv_fl
* @param string $delimiter
* @param bool $skip_empty_lines
* @param bool $trim_fields
* @return array
*/
public function parseCsv($csv_fl, $delimiter = ",", $skip_empty_lines = true, $trim_fields = true... | true |
b8a5d91e96f51a3b37a8cece9779ca70c4777242 | PHP | santosluciano/TPEWEB2 | /model/ImagenesModel.php | UTF-8 | 1,511 | 2.921875 | 3 | [] | no_license | <?php
/**
*
*/
class ImagenesModel extends Model
{
function storeImagenes($id_celular,$imagenes){
$rutas = $this->subirImagenes($imagenes);
$sentencia_imagenes = $this->db->prepare('INSERT INTO imagen(fk_id_celular,ruta) VALUES(?,?)');
foreach ($rutas as $ruta) {
$sentencia_imagenes->execute([$id_... | true |
ae0d4296a1afc89d1eeddd91c938956c626b8ea2 | PHP | mdeclosey/IFB299 | /development_files/install.php | UTF-8 | 9,281 | 2.859375 | 3 | [] | no_license | <?php
if(file_exists('config.php')) {
include('config.php');
} else {
echo 'Please create the <b>config.php</b> file. Copy and paste the following into it.';
echo '<br><br><span style="color:red">';
echo '<?php $DB_SERVER = "localhost"; $DB_USER = "root"; $DB_PASS = ""; $DB_NAME = &... | true |
8c22446b6e6592ca12be9925a90dc4870f7cf0d7 | PHP | dykyi-roman/centrifugo-service | /code/src/Client/Response/ResponseException.php | UTF-8 | 786 | 3.15625 | 3 | [] | no_license | <?php
namespace Dykyi\Client\Response;
/**
* Class ResponseException
*/
final class ResponseException implements ResponseInterface
{
/**
* Variable
*
* @var int |
*/
private $code;
/**
* Variable
*
* @var string |
*/
private $message;
/**
* Centrifug... | true |
1d54ce9594d018aa32b99dfe8057164af0ad744d | PHP | karinabond1/php_task13 | /libs/CalculTest.php | UTF-8 | 2,603 | 2.921875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: karin
* Date: 02.05.2019
* Time: 22:54
*/
include 'Calcul.php';
use PHPUnit\Framework\TestCase;
class CalculTest extends TestCase {
public function testSetFirst()
{
$calcObj = new Calcul();
$calcObj->setFirst(10);
$this->assertEquals(10, $cal... | true |
99c28f0d8ad946b1d569e7cd480354ef6c14a0f1 | PHP | khaled301/eloquent-orm-without-laravel | /app/controllers/answers.php | UTF-8 | 516 | 2.734375 | 3 | [] | no_license | <?php
namespace Controllers;
use Models\Answer;
class Answers {
public static function add_answer($answer, $user_id, $question_id) {
$answer = Answer::create(['answer'=>$answer, 'user_id'=>$user_id, 'question_id'=> $question_id]);
return $answer;
}
public static function update_answer($... | true |
e3bd82445da5dd792965e0d493ba77d8f1435b67 | PHP | hallowelt/mediawiki-lib-wikitext | /tests/phpunit/TemplateTest.php | UTF-8 | 1,006 | 2.796875 | 3 | [] | no_license | <?php
namespace HalloWelt\MediaWiki\Lib\WikiText\Tests;
use HalloWelt\MediaWiki\Lib\WikiText\Template;
use PHPUnit\Framework\TestCase;
class TemplateTest extends TestCase {
/**
* @covers HalloWelt\MediaWiki\Lib\WikiText\Template::render
* @return void
*/
public function testRender() {
$template = new Temp... | true |
e8a05146f0ca29871ae1826c1b7b13e3b3d87956 | PHP | BenKucenski/QuickDRY | /httpdocs/QuickDRY/utilities/SimpleExcel_Reader.php | UTF-8 | 3,217 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use PhpOffice\PhpSpreadsheet\Spreadsheet;
/**
* Class SimpleExcel_Reader
*/
class SimpleExcel_Reader extends SafeClass
{
/**
* @param $file
* @param bool $process_cells
* @param bool $debug
* @param null $row_limit
* @return array
*/
public static function FromFilename($fi... | true |
27c327ebac0d53f194599d08949325adbd420943 | PHP | phase2/behat-drupal-extension | /src/Phase2/Behat/DrupalExtension/Listener/DrupalRootListener.php | UTF-8 | 3,169 | 2.8125 | 3 | [] | no_license | <?php
namespace Phase2\Behat\DrupalExtension\Listener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Behat\Behat\Event\ScenarioEvent,
Behat\Behat\Event\OutlineEvent;
/**
* This class does 2 important things.
* 1. chdir into the DRUPAL_ROOT before each scenario.
* 2. chdir back to the pr... | true |
c81710c2dc6f233944e9f948afba9409e8d69c8c | PHP | gerlovsky/test-task-hotel | /src/Repository/RoomRepository.php | UTF-8 | 1,052 | 3.125 | 3 | [] | no_license | <?php
namespace Hotel\Repository;
use Hotel\Model\Room;
use Hotel\Storage\Persistence;
class RoomRepository
{
/**
* @var \Hotel\Storage\Persistence
*/
private $persistence;
/**
* RoomDetailRepository constructor.
*
* @param \Hotel\Storage\Persistence $persistence
*/
pu... | true |
c0c09ab8fa7a1215da3cca5ff97957098a3e28b3 | PHP | D4ker/smartweather | /src/php/db/cron/import/importYesterdayWeatherRecord.php | UTF-8 | 1,037 | 2.578125 | 3 | [] | no_license | <?php
// Импорт осуществляется каждый час
require_once(__DIR__ . '/../../ApiDB.php');
require_once(getcwd() . '/src/php/grabber/WeatherData.php');
$cityName = 'Saint Petersburg'; // Пока что только Санкт-Петербург
$connection = ApiDB::connectTo('grabber_db');
$cityInfo = ApiDB::getCityInfo($connection, $cityName);
... | true |
03103f965ebc6c9ea04805eac4b3a2a60ac12639 | PHP | phpwax/wildfire.events | /lib/model/Calendar.php | UTF-8 | 3,703 | 3.0625 | 3 | [] | no_license | <?
class Calendar{
public $now;
public $current_month;
public $current_year;
public $current_month_name;
public $current_date;
public $current_day;
public $this_month;
public $temp_month;
public $total_days;
public function __construct($month=false, $year=fase){
if(!$month) $month = date("m");
... | true |
50c374b2e13af5e6147055d6b56478e89aad81b7 | PHP | kartikagarwal777/Knowledge-Sharing-Platform | /comments.php | UTF-8 | 2,138 | 2.671875 | 3 | [] | no_license | <?php
if(isset($_POST['signup'])){
include('db.php');
// Fetching values from form
$sql="insert into author(username,password,name,age,experience,institution,phone,email_id,subject_domain)
VALUES('$_POST[uname]','$_POST[pwd]','$_POST[aname]',$_POST[age],$_POST[exp],'$_POST[insti]',$_POST[phone],'$_POST[email]','... | true |
0d3eeb459182cce3dc8b32cda8a737cc1330abe2 | PHP | Audentio/sportsdataio-php | /src/CFB/Model/BettingEvent.php | UTF-8 | 10,789 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Sportsdata\API\CFB\Model;
class BettingEvent
{
/**
*
*
* @var int
*/
protected $bettingEventID;
/**
*
*
* @var string|null
*/
protected $name;
/**
*
*
* @var int|null
*/
protected $season;
/**
*
*
... | true |
92c0b42bd227e4209da8543a370fa40f9fa59132 | PHP | blogscripthere/ShareLinksOnSocialMedia | /Share_Link_On_Social_Media.php | UTF-8 | 3,954 | 2.65625 | 3 | [] | no_license | <?php
/**
* @package Share_Link_On_Social_Media
* @version 1.0
*/
/*
Plugin Name: ScriptHere's Share Links On Social Media with Rich Snippets.
Plugin URI: https://github.com/blogscripthere/ShareLinksOnSocialMedia
Description: Simple Open Graph Tags and Twitter Cards to WordPress posts and pages.
Author: Narendra Pad... | true |
a9742e5075d90dfd6324b457d155e5439b08bfb5 | PHP | daib17/ramverk1-proj | /view/daib17/user/view.php | UTF-8 | 3,146 | 2.671875 | 3 | [] | no_license | <?php
namespace Anax\View;
/**
* Render view user.
*/
// Show all incoming variables/functions
//var_dump(get_defined_functions());
//echo showEnvironment(get_defined_vars());
// Get questions, answers and comments for userid
$questionArr = $question->findAllWhere("userid = ?", $user->id);
$answerArr = $answer->find... | true |
891686f9e1f05dd2b089ae1ce881ad0d17e443de | PHP | surgemedia/videodash | /video_views/reset_loop_time3.php | UTF-8 | 199 | 2.53125 | 3 | [] | no_license | <?php
header("content-type: text/javascript");
$obj->name = $_GET['name'];
$obj->message = "HI " . $obj->name;
echo $_GET['callback']. '(' . json_encode($obj) . ');';
?> | true |
7572d448be969bddd237313516b9e169a39b34b4 | PHP | gtko/rapidePhp | /libs/php/object/choix.php | UTF-8 | 2,808 | 3.546875 | 4 | [] | no_license | <?php
/**Caracterise un Choix
*
* @author Ohanessian grégoire <gtux.prog@gmail.com>
* @version 10.11
*
*/
class Choix extends Object{
private $valeur = null;
private $choix = null;
Public function __construct($position = null)
{
parent::__construct($position);
}
Public function ... | true |
ee5fa3b6e8eade53b01e2adf4978cf7341f056f6 | PHP | mhmmd-iqbal/project-dekorasi | /app/Controllers/Admin/AdminController.php | UTF-8 | 4,333 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers\Admin;
use App\Controllers\BaseController;
use App\Models\ModelAdmin;
use CodeIgniter\API\ResponseTrait;
class AdminController extends BaseController
{
use ResponseTrait;
protected $session;
function __construct()
{
$this->session = \Config\Services::session();... | true |
7bd28fc273b69143f9c1c2891d236a4791fe799e | PHP | kzlecha/rebbit | /php/register_with_icon.php | UTF-8 | 12,251 | 2.9375 | 3 | [] | no_license | <?php
// Configuration file
require_once "include/config.php";
//$user_name = $_POST['user_name'] ?? ''; $username_err = $_POST['username_err'] ?? '';
//$password = $_POST['password'] ?? ''; $password_err = $_POST['password_err'] ?? '';
//$confirm_password = $_POST['confirm_password'] ?? ''; $confirm_password_err =... | true |
39397f7eaeba5e9c37122f1883e87d67c21e2ec6 | PHP | tonyxiao/Survey-Droid | /web-app/cake/app/models/call.php | UTF-8 | 617 | 2.59375 | 3 | [
"DOC"
] | permissive | <?php
/*---------------------------------------------------------------------------*
* models/call.php *
* *
* Model for texts and phone calls made by/recieved by a subject. ... | true |
95129699cbc63dbdad7cae81aba4c07a97ae3d4a | PHP | gromniki/zernov-course-modx | /source_data/lesson-54/lebitrixcrm.class.php | UTF-8 | 2,114 | 2.734375 | 3 | [] | no_license | <?php
/**
* Class leBitrixCrm
* Класс для работы с CRM Bitrix24
*/
class leBitrixCrm
{
/** @var modX */
public $modx;
public $config;
/**
* leBitrixCrm constructor.
* @param modX $modx
* @param array $config
*/
public function __construct(&$modx, $config = [])
{
... | true |
6e02b18b0f7342b27ad1c6cb08419efdfb542198 | PHP | lesilent/Yau | /library/ActionMVC/Request.php | UTF-8 | 3,548 | 3.1875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/**
* Utility Framework
*
* @author John Yau
* @category Yau
* @package Yau_ActionMVC
* @version 2007-12-12
*/
namespace Yau\ActionMVC;
use Yau\AccessObject\AccessObject;
/**
* A class used to hold request values that are passed via GET or POST
*
* Example
* <code>
* use Yau\ActionMVC\Request;
*
* $reques... | true |
963c5b293c4f275e0daf639ec00acfcf269aa40d | PHP | satrain/tattoo | /classes/images.class.php | UTF-8 | 1,410 | 3.046875 | 3 | [] | no_license | <?php
class Images extends Dbh {
protected function setImage($category, $path, $date) {
$sql = "INSERT INTO images(image_category, image_path, image_date) VALUES(?, ?, ?)";
$stmt = $this->connect()->prepare($sql);
$result = $stmt->execute([$category, $path, $date]);
if($r... | true |
1483d86d866662a3e0bf2af24e455a4461c61024 | PHP | matthieugauthier/speedselfie | /src/AppBundle/Service/ShuffleService.php | UTF-8 | 1,756 | 2.8125 | 3 | [] | no_license | <?php
namespace AppBundle\Service;
use AppBundle\Entity\Post;
use AppBundle\Entity\User;
class ShuffleService
{
protected $nbTry = 0;
public function isUsersInPosts($users, $posts)
{
/** @var Post $post */
foreach ($posts as $post) {
if (count($users) === count($post->getUser... | true |
6ddfdfca8cc89572f77ab33cb26d46b58bbd6ee3 | PHP | canaydogan/DesignPatterns | /Singleton/Foo.php | UTF-8 | 269 | 2.890625 | 3 | [] | no_license | <?php
namespace Singleton;
require_once 'User.php';
class Foo
{
public function __construct()
{
$user = \Singleton\User::getInstance();
//Kullanıcının ad ve soyad bilgilerini ekrana yaziyoruz.
echo $user->getFullName();
}
}
| true |
d41aa54e4edd3dbc2882ed2b02bb4de6d68f39b0 | PHP | HamAndRock/Toaster | /app/Models/Menu/IRestaurant.php | UTF-8 | 826 | 2.703125 | 3 | [] | no_license | <?php
/**
* @author Jiří Svěcený <sveceny@sitole.cz>
* @copyright 2019 Jiří Svěcený
* @version 07.01.2019
*/
declare(strict_types=1);
namespace App\Models\Menu;
use App\Models\Database\ORM\Menu\Food;
use DateTimeImmutable;
use Nextras\Orm\Collection\ICollection;
interface IRestaurant
{
/**
* Get restaurant... | true |
13c7348ae3ccdab5ae756bbe4f3f198698fb9ec9 | PHP | sinoxx93/siteweb | /payment-history.php | UTF-8 | 1,116 | 2.734375 | 3 | [] | no_license | <?php
require_once '_include/authenticate-user.php';
// Si il existe une demande de lecture du code.
if (isset($_GET['function_id'])) {
// Chargement du code de la fonction...
$sql = 'SELECT *
FROM `functions`
WHERE id = ?';
$r = $db->prepare($sql);
$r->execute(array($_GET['function_id']... | true |
e07b998f732edd25311f9b4dcf78134fbc3692eb | PHP | BoHeTeachnology/boheyayi | /lumen_online/app/Rop/request/HfiveWeixinTemplateCreateRequest.php | UTF-8 | 1,982 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class HfiveWeixinTemplateCreateRequest
{
private $apiParas = array();
private $template_name;
public function getTemplateName()
{
return $this->$template_name;
}
public function setTemplateName($template_name)
{
$this->template_name = $template_name;
... | true |
a0a1506cbe5e64eee84cb1ad89751352d1c660c2 | PHP | TimmGit/weshuo | /site/libraries/attachmentLib.php | UTF-8 | 302 | 2.71875 | 3 | [] | no_license | <?php
class attachmentLib
{
/**
*
* @var attachmentMod
*/
private $mod;
function __construct()
{
$this->mod=new attachmentMod();
}
public function getAttachementList($where,$limit=8,$order='attId desc')
{
return $this->mod->getAttachment($where,$limit,$order);
}
} | true |
1a3ea12f6a1ab53d62d4b821873179161e587e41 | PHP | egycan27/PHP-Moozx | /src/WellCommerce/Bundle/RoutingBundle/Manager/Admin/RoutingManager.php | UTF-8 | 2,628 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/*
* WellCommerce Open-Source E-Commerce Platform
*
* This file is part of the WellCommerce package.
*
* (c) Adam Piotrowski <adam@wellcommerce.org>
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
*/
namespace WellCommerce\Bu... | true |
88ac25a07c875c4eaeb31e1dd78235030f1b1e65 | PHP | lanrucn/lanruadmin | /application/common/model/User.php | UTF-8 | 3,149 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* LRCODE
* ============================================================================
* 版权所有 2016-2030 江苏蓝儒网络科技有限公司,并保留所有权利。
* 网站地址: http://www.lanru.cn
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
* 不允许对程序代码以任何形式任何目的的再发布。
... | true |
e15a8efc0298545155886ef1c754f9b9d0335076 | PHP | mcguirej3/Final-Project | /Final CSC-301/classes/class.user.php | UTF-8 | 522 | 3.046875 | 3 | [] | no_license | <?php
class user {
protected $userID;
protected $userName;
protected $database;
function __construct($userID, $database) {
$sql = file_get_contents('sql/getUser.sql');
$params = array(
'userid' => $_SESSION["userid"]
);
$statement = $database->prepare($s... | true |
8e3e023d70d91ca3c15f6a3f3fbe35c25339d874 | PHP | mdariol/shop.thebeerway.it | /app/Mail/UserVerifyEmail.php | UTF-8 | 1,343 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\URL;
class UserVerifyEmail extends Mailable
... | true |
a51eaada7d2e4641590c1cb8fa8f9563676a5640 | PHP | mchristie/Bones-CMS | /src/Christie/Bones/Models/Image.php | UTF-8 | 2,359 | 2.78125 | 3 | [] | no_license | <?php
namespace Christie\Bones\Models;
use \Eloquent;
use \File;
use Gregwar\Image\Image as Manipulate;
class Image extends Eloquent {
use BonesModel;
protected $fillable = array('title', 'filename', 'album_id', 'site_id', 'status');
public function album() {
return $this->belongsTo('\Christi... | true |
b8f7705e0fdd7fe8ff5b3749705337afd11135eb | PHP | olofekelund/laravel | /app/Http/Controllers/UserController.php | UTF-8 | 1,070 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class UserController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \... | true |
aef6d2fa2ac9593cb564629349290ea18340e7df | PHP | snehasish27/Allfest | /feedback.php | UTF-8 | 807 | 2.515625 | 3 | [] | no_license | <?php
$conn = mysqli_connect('localhost','root','','allfest');
if(! $conn )
{
die('Could not connect: ' . mysqli_error($conn));
}
$name = $_POST['name'];
$c... | true |
2592c48b9bdc57c94d06708459ebb10d3eafac90 | PHP | salyus2/curso-php | /else.php | UTF-8 | 154 | 2.625 | 3 | [] | no_license | <?php
$mes = "Diciembre";
if($mes == "Diciembre"){
echo "<h1> Feliz Navidad </h1>";
} else if ($mes == "Enero"){
echo "Feliz Año Nuevo";
}
?> | true |
6b273bc446c1166d391aa844333ffda6cea62212 | PHP | agussetiadi/gonam | /application/libraries/Page.php | UTF-8 | 1,994 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Page extends CI_model
{
function __construct(){
parent::__construct();
$this->load->library('pagination');
}
public function get_paging($num,$perpage,$site_url){
if ($num > $perpage) {
$perpage = $num/$perpage;
$perpage = ceil($perpage);
}
$config['base_url'] = $site_url;
$config['tot... | true |
4064e0fa48207f77fd1ed9264e9bbda05365eaac | PHP | banxuelai/happy | /tuner/RequestCLI.php | UTF-8 | 1,764 | 2.9375 | 3 | [] | no_license | <?php
// Copyright 2016 The PHP Tuner Authors. All rights reserved.
// Use of this source code is governed by a GPL-3.0
// license that can be found in the LICENSE file.
// CLI 请求
class RequestCLI {
private $fake_get = array();
private $fake_post = array();
//构造
public function __construct() {
$argv = $_SERVE... | true |
2792078f8a33dfb85b65ccf5f6fdbfc47357df22 | PHP | milevsky76/tasksphp | /task1.6.php | UTF-8 | 708 | 3.71875 | 4 | [] | no_license | <?php //6. Получить все четырехзначные числа, в записи которых встречаются только цифры 0,2,3,7.
function getSpecificNumbers(): array
{
$specificNumbers = [];
for ($i = 1000; $i <= 9999 ; $i++) {
if(isSpecific($i)) {
$specificNumbers[] = $i;
}
}
return $specific... | true |
c89f34e8304a10d7c2f8eaf4ef19c0fc5a6f4a79 | PHP | pandorz/srj | /src/AppBundle/Repository/CourReportRepository.php | UTF-8 | 909 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Repository;
use AppBundle\Entity\Cour;
/**
* Class CourReportRepository
* @package AppBundle\Repository
*/
class CourReportRepository extends \Doctrine\ORM\EntityRepository
{
/**
* @param Cour $cour
* @param \DateTime $startDate
* @param \DateTime $endDate
* @retu... | true |
9ec7a013310b0b573a4d6d824f2962004496fd26 | PHP | RevelPHP/Client | /src/Client.php | UTF-8 | 952 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace RevelPHP;
use Illuminate\Support\Collection;
use RevelPHP\Reports\ReportInterface;
use RevelPHP\Services\CustomerService;
use RevelPHP\Services\EstablishmentService;
use RevelPHP\Support\Response;
final class Client
{
public readonly CustomerService $customers;
public readonly EstablishmentSe... | true |
d9a82c2907362031cb6cd95ac8f9d2f2da46db79 | PHP | kazhon/developers_training_public | /sample/src/oop/Human.php | UTF-8 | 1,971 | 4.21875 | 4 | [] | no_license | <?php
class Human
{
private $height = null;
private $weight = null;
private $age = null;
private $sex = null;
public function __construct($height, $weight, $age, $sex)
{
$this->height = $height;
$this->weight = $weight;
$this->age = $age;
$this->sex =... | true |
7c81987a7284a09fc052ce9a8eb80632eae98d28 | PHP | ftk1907/clinic2 | /module/Clinic/src/Clinic/Form/UserDetailsFieldset.php | UTF-8 | 3,961 | 2.546875 | 3 | [] | no_license | <?php
namespace Clinic\Form;
use Zend\Form\Fieldset;
use Zend\InputFilter\InputFilterProviderInterface;
class UserDetailsFieldset extends Fieldset implements InputFilterProviderInterface
{
public function __construct()
{
parent::__construct('User Details');
$this->add(array(
'name'... | true |
e536d2126933a23fe575396dc4f8c43a21c1db7c | PHP | FransUrbo/phpQLAdmin | /tables/user_details-status.inc | UTF-8 | 2,994 | 2.578125 | 3 | [] | no_license | <?php
// Retreive 'days from Jan 1, 1970'
$tmp = $_pql->get_attribute($_GET["user"], pql_get_define("PQL_ATTR_EXPIRATION"));
if($tmp) {
$tmp++;
// Convert to UNIX timestamp
$seconds = $tmp * (60 * 60 * 24);
// Convert to human readable
$time_expiration = date("D M j h:i Y", $seconds);
} else {
$time_expiration... | true |
77de6cb7a3a66d20cc7ee0d3fc63a03063a1bdaa | PHP | artulloss/FilterX | /src/ARTulloss/FilterX/Session/SessionHandler.php | UTF-8 | 4,343 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Adam
* Date: 7/10/2019
* Time: 11:08 PM
*/
declare(strict_types=1);
namespace ARTulloss\FilterX\Session;
use ARTulloss\FilterX\Main;
use ARTulloss\FilterX\Queries\Queries;
use ARTulloss\FilterX\Utils;
use pocketmine\Player;
use pocketmine\utils\Utils as PMUtils;
use Closu... | true |
255178a9409153843630bb083da01f45f7cf67a3 | PHP | silinternational/addressbook | /application/simplesamlphp/lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php | UTF-8 | 4,210 | 2.890625 | 3 | [
"BSD-3-Clause",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* This file defines a flat file metadata source.
* Instantiation of session handler objects should be done through
* the class method getMetadataHandler().
*
* @author Andreas �kre Solberg, UNINETT AS. <andreas.solberg@uninett.no>
* @package simpleSAMLphp
*/
class SimpleSAML_Metadata_MetaDataStorageHa... | true |
87f7b81e97510e4b5923776997ac3934b3f7288f | PHP | nellka/numiz-new | /helpers/functions_h.php | UTF-8 | 4,140 | 2.609375 | 3 | [] | no_license | <?php
function escapeJavaScriptText($string){
return str_replace("\n", '\n', str_replace('"', '\"', addcslashes(str_replace("\r", '', (string)$string), "\0..\37'\\")));
}
function checked_radio($value,$val){
if($value == $val){
return "checked='checked'";
}
}
function checked_box($value){
if($value){
retu... | true |
5e7c34197f37c7df8661919aacf3c86637865827 | PHP | kotopheiop/bitrix-core | /modules/rest/lib/engine/actionfilter/base.php | UTF-8 | 983 | 2.546875 | 3 | [] | no_license | <?php
namespace Bitrix\Rest\Engine\ActionFilter;
use Bitrix\Main\Engine;
use Bitrix\Main\Engine\Controller;
/**
* Class Base
* @package Bitrix\Rest\Engine\ActionFilter
*/
abstract class Base extends Engine\ActionFilter\Base
{
/**
* List allowed values of scopes where the filter should work.
* @retur... | true |
f012fe3fac8daa9eee58af2f101782916aadd61a | PHP | PoulaHelmy/toursim-dashboard-laravel | /app/Http/Controllers/Dashboard/Controllers/RoleController.php | UTF-8 | 2,558 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Dashboard\Controllers;
use App\Http\Controllers\Controller;
use App\Models\Role;
use Illuminate\Http\Request;
class RoleController extends Controller
{
public function __construct()
{
//create read update delete
$this->middleware(['permission:read_roles'])... | true |
f347df9d538849006930c6f48251b4a55009c75d | PHP | Vicimus/Gicimus | /tests/TestGoogleAPI.php | UTF-8 | 1,742 | 2.578125 | 3 | [] | no_license | <?php
include_once 'vendor/autoload.php';
use Vicimus\Gicimus\GoogleAPI;
use Vicimus\Gicimus\Place;
use Vicimus\Gicimus\PlaceDetails;
use Vicimus\Gicimus\Review;
class TestGoogleAPI extends PHPUnit_Framework_TestCase
{
/**
* Set this value to a valid key to enable the tests
*
* @var string $key
*/
private... | true |
e2a6d73adfdb63a536811473778e31a45186f273 | PHP | ArchieSultangazy/topgeneration | /app/Achievement/Strategies/UploadPhotoAchievementStrategy.php | UTF-8 | 1,034 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Achievement\Strategies;
use App\Achievement\Exceptions\AchievementExistsException;
use App\Contracts\AchievementStrategyInterface;
use App\Entities\Achievement;
use App\Models\UserAchievement;
use App\User;
class UploadPhotoAchievementStrategy implements AchievementStrategyInterface
{
priva... | true |
ec357a76cb98a22f970b61927e9776ebec0c0c4a | PHP | mgkimsal/zcphpexp | /day7/class5.php | UTF-8 | 147 | 3.328125 | 3 | [] | no_license | <?php
class user {
public $name = "mike";
function __construct($param) {
$this->name = $param;
}
}
$u = new user("sam");
echo $u->name;
| true |
fba59d6e4673adbcaafa64d247328babfde261c8 | PHP | aregowe/Jaden-Cased | /Jaden-Cased.php | UTF-8 | 792 | 3.5625 | 4 | [
"MIT"
] | permissive | <?php
/*
Jaden Smith, the son of Will Smith, is the star of films such as The Karate Kid (2010) and After Earth (2013). Jaden is also known for some of his philosophy that he delivers via Twitter. When writing on Twitter, he is known for almost always capitalizing every word.
Your task is to convert strings to ... | true |
618a9a7966ed8def32541319ba49c1e86d3ef939 | PHP | JeongSangDeok/2012120151DB | /sql_adminjoin.php | UTF-8 | 1,096 | 2.625 | 3 | [] | no_license | <?php
include "sql_connect.php";
$query = "select * from User NATURAL JOIN Book_reservation"; //sql문
$result = $db->query($query); //query날림. 실행결과 데이터 묶음 리턴됨.
$i = 0;
echo '<table border = "1" >';
echo '<tr>';
echo '<td> user_id </td> ';
echo '<td> user_pw </td> ';
echo '<td> user_name </td> ';
echo '<td> user_gender ... | true |
c3d0e303b15dc71ed6d3b461ee9efe974a128585 | PHP | ProyectoRecaudo/RecaudoBackend | /src/ModeloBundle/Entity/Trecaudovehiculo.php | UTF-8 | 2,440 | 2.515625 | 3 | [] | no_license | <?php
namespace ModeloBundle\Entity;
/**
* Trecaudovehiculo
*/
class Trecaudovehiculo
{
/**
* @var boolean
*/
private $recaudopuestopagado = '';
/**
* @var \DateTime
*/
private $creacionrecaudo = 'now()';
/**
* @var \DateTime
*/
private $modificacionrecaudo = ... | true |
7122cc966aa5dbfe9bf2fc60c391cd8172cc3be5 | PHP | RazeSoldier/MWOpsTool | /src/Command/BatchDeletePageByPattern.php | UTF-8 | 5,177 | 2.640625 | 3 | [] | no_license | <?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will... | true |
5b7ead79e0473245098644a6f0df926d7a165ce7 | PHP | bares43/bachelor-thesis-survey | /app/filter/results/Subquestions.php | UTF-8 | 4,052 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Filter\Results;
use App\Base\Filter;
/**
* Created by PhpStorm.
* User: janba_000
* Date: 18. 12. 2015
* Time: 15:59
*/
class Subquestions extends Filter{
const ID_RESPONDENTS = "idrespondents";
const SECONDS = "seconds";
const DATETIMES = "datetimes";
const IDS = "IDS";
... | true |
784084f91926e94bd1bee8c9e004398625387b57 | PHP | yujiah-github/learning-php-by-book | /210919 Set Develop Settings and Learn Chapter2-4/chapter3/Conditional/man_age.php | UTF-8 | 609 | 3.765625 | 4 | [] | no_license | <?php
/* 출생한 연, 월, 일에 따라 만 나이 계산하기*/
$now_year = 2019;
$now_month = 3;
$now_day = 10;
$birth_year = 1990;
$birth_month = 3;
$birth_day = 30;
if($birth_month < $now_month)
$age = $now_year - $birth_year;
elseif ($birth_month == $now_month)
{
if ($birth_day <= $now_day)
$age = $now_year - $birth_year;
else
$ag... | true |
7673c215b1563b6e5d78d73d274caee6aa30683b | PHP | DomantasMakreckas/Jum-Pzda | /core/functions/form/core.php | UTF-8 | 2,753 | 2.84375 | 3 | [] | no_license | <?php
/**
* funkcija validuojanti laukus
* (sukuria errorus fieldams/formai)
* @param $form
* @param $safe_input isfiltruotas POST mastyvas
* @return bool
*/
function validate_form(array &$form, array $safe_input): bool
{
$success = true;
foreach ($form['fields'] as $field_index => &$field) {
$f... | true |
c395af9dffff4612962a20a7a8bd423bfcb7382c | PHP | RiverSideHostel/Library | /bookRegister_creat.php | UTF-8 | 3,241 | 2.65625 | 3 | [] | no_license | <?php
session_start();
include("functions.php");
// var_dump($_POST);
// exit();
if (
!isset($_POST['name']) || $_POST['name'] == '' ||
!isset($_POST['author']) || $_POST['author'] == '' ||
// !isset($_POST['published']) || $_POST['published'] == '' || //出版だけフィルタあえてかけない
!isset($_POST['price']) || $_PO... | true |
7083b5c68764641357a363626dd26de6d5c54114 | PHP | PHP-DI/PHP-DI | /src/Definition/StringDefinition.php | UTF-8 | 2,237 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DI\Definition;
use DI\DependencyException;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Definition of a string composed of other strings.
*
* @since 5.0
* @author Matthieu Napoli <matthieu@mnapoli.fr>
*/
class StringDefinitio... | true |
c4a1c72042447684e2929c17e41c0fcaadec9c2b | PHP | alex-cory/fasthacks | /notes/JavaScript/nodejs/nodeJS examples/routes/clever.php | UTF-8 | 1,923 | 2.953125 | 3 | [] | no_license | <?php
function getDistricts()
{
return exec("curl -H 'Authorization: Bearer DEMO_TOKEN' -X GET https://api.clever.com/v1.1/districts");
}
// Retrieves a list of all students in the section.
function getAllStudentsFromSection($demoToken)
{
return exec("curl -H 'Authorization: Bearer DEMO_TOKEN' -X GET https://api.cl... | true |
cba285b0464a33edec872e390fb049643f678d4f | PHP | devmohamedamr/mvc-reload | /app/core/app.php | UTF-8 | 930 | 2.765625 | 3 | [] | no_license | <?php
class app{
public $controller = "home";
public $method = "index";
public $parm = [];
public function __construct()
{
$url = $this->url();
if(file_exists("app/controller/".$url[0].".php")){
$this->controller = $url[0];
unset($url[0]);
... | true |
5445457961e41505c795cecef4a878f1551c429f | PHP | ngocphuocha/basic_algorithm | /loop.php | UTF-8 | 1,991 | 4.3125 | 4 | [] | no_license | <?php
//* How to find the max and min element of 10 random element;
//! Solution 1
//$count = 0;
//$max = -INF; // to get the max number with INF
//$min = INF; // to get the min number with INF of
//
//do {
// $number = mt_rand(0, 10);
// $max = max($max, $number); // get the larger of the two argument
// $mi... | true |
bbbcf9f169458343c70c0e5286159d074caa70cb | PHP | dpwit/csnotepad | /public_html/form-to-email_orig.php | UTF-8 | 1,633 | 2.8125 | 3 | [] | no_license | <?php
session_start();
$accountName = $_GET['accountName'];
if(!isset($_POST['submit']))
{
//This page should not be accessed directly. Need to submit the form.
echo "error; you need to submit the form!";
}
$accountName = $_POST['accountName'];
$telephone = $_POST['telephone'];
$service = $_POST['service'];
$confEmai... | true |
b90e38c39b87c0a3e12f7a557feb9c761743ab92 | PHP | michelkaporin/eth-netsec-2016 | /html/search.php | UTF-8 | 2,844 | 2.609375 | 3 | [] | no_license | <?php
include_once("db.php");
if (isset($_COOKIE['username']) && isset($_COOKIE['password']))
{
$username = $_COOKIE['username'];
$pw = $_COOKIE['password'];
$sql = "SELECT id, username, password FROM users WHERE username='$username' AND password = '$pw' LIMIT 1";
$query = mysqli_query($db_conf, $sql);
$ro... | true |
abd2989fd0d8429eed8e84a8933438f74e5bc152 | PHP | frosty8/Sklep | /Views/produkty.php | UTF-8 | 3,866 | 2.828125 | 3 | [] | no_license | <?php
require_once '../Controllers/SessionController.php';
require_once '../Controllers/DatabaseManager.php';
require_once '../Controllers/ViewController.php';
////////////////////////////////// Session timer //////////////////////////////////
session_start();
if(isset($_SESSION['login'])){
$sessionController = new S... | true |
576d5ba060abb11b5df76a298de07d4106f3b9b2 | PHP | wp-plugins/listpipe | /listpipe.php | UTF-8 | 4,959 | 2.59375 | 3 | [] | no_license | <?php
/*
Plugin Name: ListPipe Content Generator
Plugin URI: http://www.listpipe.com/plugins.php
Description: The ListPipe Pugin for WordPress pulls Powerful Custom Content from your ListPipe account and inserts it into your posts.
Version: 2.6
Author: Square Compass, Inc.
Author URI: http://www.squarecompass.c... | true |
c21703a63cca7f7a09ddf74a6a2352b74158c350 | PHP | silenc3502/PHPExamples | /5/example5-11.php | UTF-8 | 282 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
$object = new User;
print_r($object); echo "<br />";
$object->name = "Joe";
$object->password = "mypass";
print_r($object); echo "<br />";
$object->save_user();
class User
{
public $name, $password;
function save_user()
{
echo "Save User code goes here";
}
}
?>
| true |
2e8b04340e3a0b0d19dc738ab0749d7bc0c0fb6c | PHP | abetterstory/abetter-wordpress | /plugins/sitepress-multilingual-cms/classes/templates/class-wpml-twig-template.php | UTF-8 | 421 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"GPL-3.0-only"
] | permissive | <?php
use WPML\Core\Twig_Environment;
/**
* @author OnTheGo Systems
*/
class WPML_Twig_Template implements IWPML_Template_Service {
private $twig;
/**
* WPML_Twig_Template constructor.
*
* @param Twig_Environment $twig
*/
public function __construct( Twig_Environment $twig ) {
$this->twig = $twig;
}
... | true |
8598abbe14df21fac06b418dffe54661d23ffb8e | PHP | Falsafiy/Exo-login-PHP | /Models/User.php | UTF-8 | 1,669 | 3 | 3 | [
"MIT"
] | permissive | <?php
class User
{
private $bdd;
function init($bdd)
{
if (isset($bdd))
{
$this->bdd = $bdd;
}
else
{
throw new Exception('Paramètre BDD manquant');
return false;
}
}
function getUser($pseudo)
{
$this->bdd = $this->connexion();
$req= $this->bdd->prepare('select password from users whe... | true |
7f1ebb60f930d922b3018d1908e69ba83a9d103a | PHP | songyichao/php-learn | /Algorithm/ShellSort.php | UTF-8 | 926 | 3.09375 | 3 | [] | no_license | <?php
/**
* description
*
* @category Learn
* @package PSR
* @subpackage Documentation\API
* @author yichaosong <songyichao@gmail.com>
* @license GPL https://songyichao.com
* @link https://songyichao.com
*/
namespace Algorithm;
class ShellSort
{
public static function shellSort($arr)
... | true |
36f15cddbb0aae3202de6c17ce682c746f4ba388 | PHP | shouhei/CakeAsRails | /All.php | UTF-8 | 438 | 2.84375 | 3 | [] | no_license | <?php
class All extends Model {
static function rebuild($result) {
$data = array();
$counter = 0;
foreach ($result as $value) {
$data[$counter] = array();
foreach ($value as $val) {
foreach ($val as $record => $str) {
$data[$count... | true |
2a6f4079d3e9b78d0257ccb720d9aca7b54bd02e | PHP | asbamboo/database | /command/OrmGenerateEntitiesCommand.php | UTF-8 | 3,514 | 2.640625 | 3 | [] | permissive | <?php
namespace asbamboo\database\command;
/**
* 同 doctrine orm:generate-entities
*
* @author 李春寅 <licy2013@aliyun.com>
* @since 2018年11月22日
*/
class OrmGenerateEntitiesCommand extends CommandAbstract
{
/**
* Construct.
*/
public function __construct()
{
parent::__construct();
... | true |
7e20777308247d1ab2e282658b15fc4828059f40 | PHP | vvk2001github/leetcodetrain | /php/210-findOrder.php | UTF-8 | 3,841 | 3.453125 | 3 | [] | no_license | <?php
// 210
// There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1.
// You are given an array prerequisites where prerequisites[i] = [ai, bi]
// indicates that you must take course bi first if you want to take course ai.
// For example, the pair [0, 1], indicates that to... | true |
df7597eaa1449ca701e6fa29c3848efaa2c6e402 | PHP | jaredballou/insurgency-tools-old | /working/demo/read-dem-file.php | UTF-8 | 6,588 | 2.828125 | 3 | [] | no_license | <?php
// Read demo file and parse out header and frames/packets/commands.
// Use this as a guide:
// https://github.com/mikeemoo/jsgo/blob/master/lib/jsgo.js
// Main loop
if (is_file($argv[1])) {
// echo $argv[1];
$demo = new DemoFile($argv[1]);
var_dump($demo);
}
class DemoHeader {
// Header fields
var $filesta... | true |
21e9163154f7b95864f5b86ce990e3e82b77e1f8 | PHP | LaurenAlmeida/Sistema-de-Matriculas | /AppTrabalho/pdo/ConexaoPDO.php | UTF-8 | 975 | 2.921875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of ConexaoPDO
*
* @author laurengoncalves
*/
final class ConexaoPDO {
private static $conn = null... | true |
ab10ebd238ad1ad4f72cf47b3b9cfce9f69becea | PHP | tchemineau/kohana-assets | /classes/Kohana/Assets.php | UTF-8 | 5,745 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Compilers and other helper functions.
*
* @package Kohana/Assets
* @author Alex Little
*/
class Kohana_Assets {
public static $config;
public static function compiler($type)
{
$class = 'Assets_Compiler_'.ucwords($type);
return ... | true |
98e2d15bc7ddbb76a2ad874caddbab3763a8c4e7 | PHP | Samson1964/contao-ergebnisdienst-bundle | /src/ContentElements/Ergebnisdienst.php | UTF-8 | 10,870 | 2.671875 | 3 | [] | no_license | <?php
namespace Schachbulle\ContaoErgebnisdienstBundle\ContentElements;
class Ergebnisdienst extends \ContentElement
{
/**
* Template
* @var string
*/
protected $strTemplate = 'ce_ergebnisdienst_default';
/**
* Generate the module
*/
protected function compile()
{
$api_id = $GLOBALS['TL_CONFIG'][... | true |
18965aa3b6fa34c17b755abddc43853f4d121d6a | PHP | yussefparcianello/phpbuilder | /BuilderForm.php | UTF-8 | 2,770 | 3.171875 | 3 | [] | no_license | <?php
class BuilderForm {
protected $tabela;
protected $listaColunas;
public function __construct($tabela, $listaColunas) {
$this->tabela = ucfirst($tabela);
$this->listaColunas = $listaColunas;
}
public function build() {
$buf = $this->build_trecho_... | true |
cb1cd61d3fcecc2c77131bd391e41ee0f3738890 | PHP | Alekers/telegram_bot | /src/entities/inputMedia/InputMediaVideo.php | UTF-8 | 785 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created date 5/6/2019 7:50 PM
* @author Tsvetkov Alexander <ac@goldcarrot.ru>
*/
namespace tsvetkov\telegram_bot\entities\inputMedia;
use tsvetkov\telegram_bot\entities\BaseObject;
/**
* Class InputMediaVideo
* @package tsvetkov\telegram_bot\entities\message
*
* OfficialDocs: https://core.telegra... | true |
082e749f81b333954ea06e0c9a2a7af3e6567ca7 | PHP | Kofacts/ASPES | /app/Models/FCV.php | UTF-8 | 1,001 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Project: ASPES.msc
* Author: Chukwuemeka Nwobodo (jcnwobodo@gmail.com)
* Date: 9/11/2016
* Time: 9:33 PM
**/
namespace App\Models;
use App\Models\DataTypes\FuzzyNumber;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class FCV
*
* @package App\Mo... | true |
a3c043092466516742f683879b774fbb5cc04773 | PHP | agrinceac/life-kofe.ru | /core/modules/images/ImageObject.php | UTF-8 | 2,378 | 2.5625 | 3 | [] | no_license | <?php
namespace core\modules\images;
class ImageObject extends \core\modules\base\ModuleObject
{
const FOCUS = true;
protected $configClass = '\core\modules\images\ImageConfig';
function __construct($objectId, $configObject)
{
parent::__construct($objectId, new $this->configClass($configObject));
}
public fu... | true |
c8e76cd2c328aa6d7b4c435db1466cce6a3cafb4 | PHP | calabresem/tekar-producto | /classes/Model/Core/Producto/Foto.php | UTF-8 | 978 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Modelo de relacion Producto-Foto
*
* @package tekar-producto
* @author Marcos Calabrese <marcosc@tekar.net>
* @license http://openzula.org/license-bsd-3c BSD 3-Clause License
*/
abstract class Model_Core_Producto_Foto extends ORM {
protecte... | true |
ba2810cc178159c202d4f2d90e6b8c7fd393d464 | PHP | mortie/absence | /public/scripts/admin_updateRoles.php | UTF-8 | 809 | 2.703125 | 3 | [] | no_license | <?php
requirePassword("admin");
$queries = [];
$newEntry = ["empty"=>true];
foreach ($_POST as $rRoleID=>$rVal) {
$sRoleID = $env['mysqli']->real_escape_string($rRoleID);
$sVal = $env['mysqli']->real_escape_string($rVal);
$ID = substr($sRoleID, 1);
if (strpos($sRoleID, "new") !== false) {
$newEntry[$... | true |
95b8e427a162efeb881186590bbf0be22a36fca1 | PHP | chesney/rabbitmq-examples | /publisher/publisher.php | UTF-8 | 1,765 | 3.15625 | 3 | [] | no_license | <?php
/**
* Simple message sender to an AMQP server
*
* @author Osman Yuksel < yuxel |ET | sonsuzdongu |DOT| com >
*/
//path to your amqp-php library
require_once('../amqp.inc');
class sendMailToQueue {
//set configs
function __construct() {
$this->rabbitMQConf = array("host"=>"localhost",
... | true |
291f1016c8b0b8be5471b824765e546ad6682866 | PHP | DimitrisChristodoulouDev/PeoplesUnited-BS-Design | /api/app/Contact.php | UTF-8 | 970 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use App\ContactsCategories;
use Illuminate\Database\Eloquent\SoftDeletes;
class Contact extends Model
{
use SoftDeletes;
protected $table = 'contacts';
protected $dates = ['deleted_at'];
/* use SoftDeletes;
protec... | true |
d767758fb2e4c3bfc2301ea4a1e9fef95ce9ab2e | PHP | altoshi1/ruche | /authentification/espaceUtilisateur/infosPerso.php | UTF-8 | 9,641 | 2.640625 | 3 | [] | no_license | <?php
require_once 'functions.php';
securisation();
if(!empty($_POST)){
require_once '../connexionBDD.php'; // Connexion à la bdd
$user_id = $_SESSION['auth']->idapiculteurs;
//Mis à jours du nom
if (empty($_POST[... | true |