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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6da7c8c8595f505fca4832b95be3ec51aef89702 | PHP | msm-code/coyote | /database/migrations/2015_12_12_162937_create_posts_table.php | UTF-8 | 1,589 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table... | true |
d59c4a6ed45276ded33bf68cabe982930b69b5b0 | PHP | DanielNamro/ejerciciciosphp | /ejercicios/17.php/app.php | UTF-8 | 800 | 2.953125 | 3 | [] | no_license | <?php
class app{
public function __construct()
{
}
public function run()
{
if (isset($_GET['method'])) {
$method = $_GET['method'];
} else {
$method = 'index';
}
$this->$method();
}
public function potenciados(){
$potencias = [];
... | true |
6148da36591c8f9e77a124026afc632d1d4536b2 | PHP | messaouda83/Nemcine | /Admin/Models/AdminArtist.php | UTF-8 | 2,960 | 3.328125 | 3 | [] | no_license | <?php
class AdminArtist extends Artist
{
/**
* Insert data into artist table
* @param $lastname
* @param $firstname
* @param $birthDate
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure
*/
public function insertArtist($lastname, $firstname, $birthDate)
{
... | true |
8fe8d59418d5262101ffea30bbc91b88d41eacd6 | PHP | leminhviett/im4717_project | /pages/book_seats.php | UTF-8 | 2,790 | 2.75 | 3 | [] | no_license |
<!DOCTYPE html>
<html lang="en">
<?php
require 'shared/head.php';
?>
<link rel="stylesheet" href="../css/home.css" />
<body>
<?php
require 'shared/nav_bar.php';
?>
<div class="center">
<div>
<?php
if (!isset( $... | true |
49694c88662ddbdd8c92449359cfc114438092a2 | PHP | link2arslan/travelport | /src/Util/Credentials.php | UTF-8 | 613 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace FilippoToso\Travelport\Util;
class Credentials
{
/**
* @var anonymous25 $UserId
*/
public $UserId = null;
/**
* @param anonymous25 $UserId
*/
public function __construct($UserId = null)
{
$this->UserId = $UserId;
}
/**
* @return anonymous25... | true |
c4dca689f53ee2a0f7bee49ea5e445b1ec2ed780 | PHP | ckrzysieck/php | /archiwum/kalkulator_rozbudowany.php | UTF-8 | 1,239 | 3.0625 | 3 | [] | no_license | <?php
// Kalkulator liczący operacje arytmetyczne: sumowanie, odejmowanie, mnożenie, dzielenie, pierwiastkowanie
$nazwaProgramu = $argv[0];
$a = $argv[1];
$akcja = $argv[2];
$b = $argv[3];
$suma = ['+','plus','suma','dodawanie','dodaj'];
$roznica = ['-','minus','roznica','różnica','odejmowanie','odejmij'];
$iloczyn =... | true |
465ef3975d440ffa77e9d8c565d2144bd2c34664 | PHP | alexeysolomka/test_project | /app/Repositories/BranchRepository.php | UTF-8 | 740 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Branch;
use App\Interfaces\ICoreRepository;
class BranchRepository implements ICoreRepository
{
public function getAll()
{
$columns = ['id', 'metro_id', 'name'];
$branches = Branch::with('metro')
->select($columns)
->orderBy('i... | true |
610cc01388ab5750568a792769aede5560b90ac3 | PHP | 42medien/spreadly | /lib/mongo/Repositories/DomainSettingsRepository.php | UTF-8 | 619 | 2.71875 | 3 | [] | no_license | <?php
namespace Repositories;
use Doctrine\ODM\MongoDB\DocumentRepository,
\MongoDate;
class DomainSettingsRepository extends DocumentRepository {
/**
* get the latest entries
*
* @param int $limit
* @param int $offset
*/
public function findOrdered($limit = 10, $search = null) {
$results = $thi... | true |
781e66df9d5916e522179761b76b0f416668874a | PHP | dnicosia10/cmdeso | /Home/signup/sample.php | UTF-8 | 167 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
echo substr_replace("639435325862","******",5); // 0 will start replacing at the first character in the string
?>
</body>
</html> | true |
0edd5909c0ea3d30e24cac96fa764352e5910be5 | PHP | ePrescription/patientportal | /app/Http/ViewModels/PatientScanViewModel.php | UTF-8 | 3,546 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: admin
* Date: 31/07/2017
* Time: 9:55 PM
*/
namespace App\Http\ViewModels;
class PatientScanViewModel
{
private $patientId;
private $doctorId;
private $hospitalId;
private $labId;
private $examinationDate;
private $examinationTime;
private $... | true |
8f8cb4c8c11cf0157b191826582c1cd0abda1667 | PHP | KhalidAdlan/tirhal-qa | /app/Http/Controllers/CallController.php | UTF-8 | 4,161 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Call;
use Illuminate\Http\Request;
class CallController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public fun... | true |
5c4751118b0f2410a7a93eda1280b0fbee716a15 | PHP | goetas-webservices/salesforce-enterprise-client | /src/Sobject/FeedPollChoiceType.php | UTF-8 | 4,449 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace GoetasWebservices\Client\SalesforceEnterprise\Sobject;
/**
* Class representing FeedPollChoiceType
*
*
* XSD Type: FeedPollChoice
*/
class FeedPollChoiceType extends SObjectType
{
/**
* @property string $choiceBody
*/
private $choiceBody = null;
/**
* @property \Goeta... | true |
49018904f50a8aba811151da71dba2568bc83af7 | PHP | disilveira/symfony-user-api | /src/Controller/GetUserAction.php | UTF-8 | 955 | 2.625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\SerializerInterface;
class GetUserAction
{ ... | true |
95d55ca4e7afb2e771da0581d84d80c55d6a33d6 | PHP | thewebhatesme/opm_server | /src/Phm/Component/Metrics/MetricInterface.php | UTF-8 | 504 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Declares the MetricInterface class.
*
* @author Mike Lohmann <mike.lohmann@phmlabs.de>
*/
namespace Phm\Component\Metrics;
interface MetricInterface extends \Serializable
{
/**
* @const string
*/
const NAMEXMLNODEATTRIBUTE = "name";
/**
* @const string
*/
cons... | true |
0a0a3149871220d4e857991056af6c73b6115fc6 | PHP | anwelblue/weibo | /src/Core/AbstractApi.php | UTF-8 | 2,592 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/***
* 微博api基类,自动传递access_token参数
*/
namespace Anwelblue\Weibo\Core;
abstract class AbstractApi
{
/***
* The http client
* @var \Anwelblue\Weibo\Core\Http
*/
protected $http;
/**
* The request token.
*
* @var \Anwelblue\Weibo\Core\AccessToken
*/
protected $accessToken;
... | true |
054da97c5357b308a2af2db6bf1ad832cbf9ba10 | PHP | UnknownError42/cms-project-system | /code/Core/View.php | UTF-8 | 4,727 | 2.84375 | 3 | [] | no_license | <?php
/**
* Copyright (c) 2018. MyArtSide
*/
namespace Core;
/**
* Class View
* @package Core
*/
class View {
/**
* holds view params
*
* @var array
*/
public $params = array();
/**
* holds view file
*
* @var string
*/
public $file;
/**
* hol... | true |
9a57c380753a9b960206a521df51ed1a269e35a4 | PHP | eduardor2k/php-assignment-code-restaurant | /app/routes.php | UTF-8 | 380 | 2.546875 | 3 | [] | no_license | <?php
// we set all the available routes
$route = new \Framework\Router\Route();
// \/(?P<controller>[a-z]+)?\/?(?P<action>[a-z]+)?\/?(?P<id>[0-9]+)?\/?
// This regular expression wil match anything like
// /
// /adress
// /adress/delete/5
// /adress/add/7
$route->setRoute("/\\/(?P<controller>[a-z]+)\\/?(?P<action>[a-z... | true |
88b1097dd62c2e833a57242807c3ba981c7855fd | PHP | verysuper/wda_php_train | /books/php7example/Ch12/Contact/contacts.php | UTF-8 | 2,161 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>contacts.php</title>
</head>
<body text="blue">
<center>
<?php
session_start(); // 啟動交談期
$records_per_page = 3; // 每一頁顯示的記錄筆數
// 取得URL參數的頁數
if (isset($_GET["Pages"])) $pages = $_GET["Pages"];
else $pages = 1;
require_once("mycontacts_... | true |
815ac32727bb7d30777787b176d32db83f1c6f19 | PHP | exgamer/yii2-user-module | /src/services/UserCredentialService.php | UTF-8 | 11,238 | 2.75 | 3 | [] | no_license | <?php
namespace concepture\yii2user\services;
use concepture\yii2logic\services\traits\StatusTrait;
use yii\db\ActiveQuery;
use concepture\yii2user\enum\UserCredentialStatusEnum;
use concepture\yii2user\enum\UserCredentialTypeEnum;
use concepture\yii2user\forms\UserCredentialForm;
use concepture\yii2user\forms\UserEma... | true |
3d489ac745e24cc0f674797cf5f36ec7d106eb8a | PHP | geekforbrains/caffeine | /core/html/html_img.php | UTF-8 | 1,653 | 3.15625 | 3 | [] | no_license | <?php
class Html_Img {
/**
* Used for creating an image tag either from a url, or from and ID from the Media module.
*
* Example using URL:
* Html::img('path/to/image.jpg', array('alt' => 'My Image'));
*
* Example using Media ID:
* Html::img($mediaId, 0, 250, 250);
... | true |
745157f7a208ca659879028200a5928a0ed8f9ce | PHP | tarsupin/system | /plugins_core/Search/Search.config.php | UTF-8 | 1,461 | 2.65625 | 3 | [] | no_license | <?php if(!defined("CONF_PATH")) { die("No direct script access allowed."); }
class Search_config {
/****** Plugin Variables ******/
public $pluginType = "standard";
public $pluginName = "Search";
public $title = "Search System";
public $version = 1.0;
public $author = "Brint Paris";
public $license = "UniFac... | true |
decfceeecbeaa489ba270f9e28627fcf4603a2df | PHP | elimc/jumpstart | /lib/inc/CPT/CustomPost.php | UTF-8 | 2,927 | 2.953125 | 3 | [] | no_license | <?php
namespace jumpstart;
/**
* Automagically create a Custom Post Type (CPT).
*
* @link https://gist.github.com/dobbyloo/6188322 Original class that this class is based on.
* @link https://www.youtube.com/channel/UC-l9uYZ3Os52NBiwi7Y_Yzg Video instructions on using this class.
*/
class CustomPost {
protec... | true |
c39a74e3403d37ce769f1d5110ac17d74a20dfd3 | PHP | vitalypanait/collection | /tests/SliceTest.php | UTF-8 | 1,202 | 2.859375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Tests\Collection;
use Collection\Collection;
/**
* Class SliceTest
*/
class SliceTest extends \PHPUnit_Framework_TestCase {
public function sliceProvider() {
$data = [];
for ($i = 10; $i <= 12; ++$i) {
$model = new \stdClass();
$model->user_id = $i;
$model->name = "Name$i";
... | true |
5659f3c369bf7f543425941581f16a4543a071eb | PHP | stefan-dimitrovski/BookmarkManager | /database.php | UTF-8 | 437 | 2.84375 | 3 | [] | no_license | <?php
include_once("db.php");
$dbo = NULL;
// Try to connect to the database using PDO
try {
$dbo = new PDO("{$DB_TYPE}:host={$DB_HOST};dbname={$DB_NAME}",$DB_USER, $DB_PASS);
//echo "{$DB_TYPE}:host={$DB_HOST};dbname={$DB_NAME}";
}
catch (PDOException $pEx){
print ("Error:" . $pEx->getMessage() . '<br />... | true |
bc528df50b304e17430f81855ddf52e5425e4ef4 | PHP | loginovma/tree_view | /Reader.php | UTF-8 | 915 | 3.265625 | 3 | [] | no_license | <?php
include_once __DIR__ . '/User.php';
include_once __DIR__ . '/UsersCollection.php';
class Reader
{
public function getAllUsers() : UsersCollection
{
$users = new UsersCollection;
//Reading file line by line. Creating and adding users to collection
$handle = @fopen(__DIR__ . '/use... | true |
bbc3b35545602fa7fff1ecd9b4b2179a9ab728f6 | PHP | okhachiai/ApplProject | /classes/Evaluateur.php | UTF-8 | 4,291 | 2.703125 | 3 | [] | no_license | <?php
class Evaluateur extends Personne
{
private $id_personne;
private $discipline;
private $domainerecherche;
private $etablissementrattache;
private $cv;
private $evaluateurInfos;
/**
* Evaluateur constructor.
*/
public function __construct()
{
parent::__constr... | true |
6b466a9e15abf26748177dc43858b99593647660 | PHP | weiyalin/SignUp | /app/Http/Controllers/student/StudentController.php | UTF-8 | 3,774 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\student;
use App\Http\Controllers\Controller;
use App\Model\StudentDatabase;
use Illuminate\Http\Request;
class StudentController extends Controller
{
/**
* @param Request $request
* @return string
*/
//学生报名,把信息放入数据库
public function sign(Request $request)... | true |
a84455a6e83375deeabaa1b0e75b8c635feff232 | PHP | TakeMeWithU/Ebillet | /admin/index.php | UTF-8 | 1,356 | 2.515625 | 3 | [] | no_license | <?php
session_start();
include("includes/db_connexion.php");
if(isset($_POST['admin_login']))//this will tell us what to do if some data has been post through form with button.
{
$admin_email=$_POST['admin_email'];
$admin_password=hash('sha256',$_POST['admin_password']);
$admin_query="sel... | true |
bfcfad8c9592b4cd3c1aee70e8a5256c6cc6499c | PHP | maciek1651g/wisielec | /index.php | UTF-8 | 4,584 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
header('Content-Type: text/html; charset=utf-8');
//$conn = new mysqli('localhost', 'root', '', 'wisielec');
$conn = new mysqli('sql110.epizy.com', 'epiz_26118058', '78CK2yz4EJpZ', 'epiz_26118058_wisielec');
$conn -> set_charset("utf8");
if ($conn->connect_error)
{
die("Connection failed: " . $... | true |
12106cf67cb723038c025874e61b857e40f58850 | PHP | ncgamers/qikbb | /src/RootNode.php | UTF-8 | 1,104 | 3.109375 | 3 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace qikbb;
/**
* Class RootNode
*
* The top node of the tree.
*
* @package qikbb
*/
class RootNode extends ParentNode {
/** @var TextNode $curText */
public $curText;
/**
* Prepare a TextNode as the first child so that text can be added.
*/
public function __construct() {
... | true |
a15be14fbea10fe1f706633b4615d818ff7dd4b0 | PHP | incudata-loghy/Loghy-PHP | /tests/helpers/HttpClientMock.php | UTF-8 | 744 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Make JSON response.
*
* @param array $json
* @param int $status
*
* @return \GuzzleHttp\Psr7\Response
*/
function makeJsonResponse(array $json = [], int $status = 200): \GuzzleHttp\Psr7\Response
{
return new \GuzzleHttp\Psr7\Response(
$status,
['Content-Type' => 'application/json... | true |
66721fd88ec0571ac576e1266ca49d5dc4485943 | PHP | JaerenTredway/art-haus | /php/classes/Gallery.php | UTF-8 | 13,379 | 3.25 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace jtredway\ArtLocale;
// use my local autoload I made:
require_once("autoload.php");
// use autoload via composer (PHP's package manager):
require_once(dirname(__DIR__, 2) . "/vendor/autoload.php");
use Ramsey\Uuid\Uuid;
/**
* Capstone project for Art-Locale team, Deepdive cohort 23, Spring 2019
*
*... | true |
f523f97c9695c933aee201ca3527967336a8f04b | PHP | jhderojasUVa/ipa | /application/models/estadisticas_model.php | UTF-8 | 3,497 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?
/*
Modelo para Barrios
*/
class Estadisticas_model extends CI_Model {
function __construct() {
// Call the Model constructor
parent::__construct();
// Cargamos la base de datos
$this -> load -> database();
}
function cantidad_pisos($fechainicio, $fechafin) {
// Funcion que devue... | true |
7d67fe136c5f644ba1da2a261e39d955e12f4bc0 | PHP | pongwaritboon/ELMS | /API/approve.php | UTF-8 | 1,134 | 2.78125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "room";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$transactionID = $_GET["transa... | true |
cd49ce03399fcd13a5558aad4a095b6db3137852 | PHP | acidmonster/SimpleFramework | /engine/components/CatalogAdmin/classes/CCatalog.php | UTF-8 | 10,000 | 3.03125 | 3 | [] | no_license | <?php
include_once filter_input(INPUT_SERVER, 'DOCUMENT_ROOT') . '/engine/classes/CConnection.php';
include_once filter_input(INPUT_SERVER, 'DOCUMENT_ROOT') . '/engine/classes/CLogger.php';
//include_once 'CCatalogGroup.php';
class CCatalog {
const GROUP_TABLE_NAME = "sf_catalogs_groups";
const СATALOG_TAB... | true |
1c7037ddf5b71398a2c6302a55dc22f344134253 | PHP | cndaley1985/SimplePHPProject | /authenticate.php | UTF-8 | 1,594 | 2.640625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
session_name("Courtney" . sha1($_SERVER['REMOTE_ADDR']));
session_start();
if (isset($_POST['submit'])){
$_SESSION['username'] = $_POST['username'];
$_SESSION['password'] = $_POST['passw... | true |
e18fd1d87e623c987037a72f23d46689e6d27b04 | PHP | mxs-dev/angular4ChatPhpBackend | /modules/chat/records/DialogRecord.php | UTF-8 | 1,272 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: MXS34
* Date: 15.01.2017
* Time: 14:42
*/
namespace app\modules\chat\records;
use yii\db\ActiveRecord;
use yii\behaviors\{
BlameableBehavior, TimestampBehavior
};
/**
* @property Integer $id
* @property String $title
* @property Integer $createdAt
* @propert... | true |
e4191057d75966193095ef0c3b19a03a16defd39 | PHP | tomasz78285/laboratoriumPwI | /40.php | UTF-8 | 990 | 2.515625 | 3 | [] | no_license | <!DOCTYPE HTML>
<html lang="pl">
<head>
<meta charset="utf-8" />
</head>
<body>
<?php
$mysql_host = 'localhost';
$username = 'root';
$password = '';
$database = 'uczelnia';
$dbh = new PDO('mysql:host=' . $mysql_host . ';dbname=' . $database , $username, $password );
$insert = $dbh->exec("I... | true |
04de7ff9c9ede813ffecaec8f885d5e5b7a87202 | PHP | broat-sarah/cs313-php | /web/knitting/model/needledb.php | UTF-8 | 2,030 | 2.765625 | 3 | [] | no_license | <?php
function get_needle() {
global $db;
$query = 'SELECT * FROM needle
ORDER BY needleid';
$statement = $db->prepare($query);
$statement->execute();
$needles = $statement->fetchAll();
$statement->closeCursor();
return $needles;
}
function get_a_needle($needleid) {
... | true |
526117883a28700094e2ea495ba3bcd9e557fe14 | PHP | dungtran9/oop-ptbac2 | /class.php | UTF-8 | 882 | 3.875 | 4 | [] | no_license | <?php
class QuadraticEquation {
private $a;
private $b;
private $c;
public function __construct($a,$b,$c)
{
$this->a =$a;
$this->b =$b;
$this->c =$c;
}
public function delta(){
return $this->b*$this->b-4*$this->a*$this->c;
}
public function getRoot(){
... | true |
536d0dcd0b745766e7985edbea97f9faa993a803 | PHP | LoraMS/TechModule | /RegularExpressionsLab/StarEnigma.php | UTF-8 | 1,448 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
$num = intval(readline());
$pattern = '/([^@\-!:>]*)@(?<planet>[A-Za-z]+)([^@\-!:>]*):(?<population>\d+)([^@\-!:>]*)!(?<attackType>[A|D])!([^@\-!:>]*)\->(?<soldier>\d+)([^@\-!:>]*)/';
$attackedPlanets = [];
$destroyedPlanets = [];
for($i = 0; $i < $num; $i++){
$line = readline();
$count = 0;
for($j = ... | true |
732934b37d554335337fe0c651e7abb22c9ad477 | PHP | LayCraft/ticketgrape | /public_html/php/database.php | UTF-8 | 1,004 | 3.046875 | 3 | [] | no_license | <?php
//functionality for querying the database.
// return 2D array of values for multi-column results
// return 1D array of values for single column results
$accesspath = explode("public_html", dirname(__FILE__));
require $accesspath[0]."access.php";
if ($mysqli->connect_errno) {
echo "MySQL connection failure: ", ... | true |
9a5b5869b0ac81922f7783f7e9c64da370a63ffc | PHP | edwinp-catalyst-eu/show-quizzes-containing-qt3-cli | /show-quizzes-containing-qt3-cli.php | UTF-8 | 2,016 | 2.546875 | 3 | [] | no_license | <?php
/*
* Command line script to show all quizzes
* which contain any question of type QT3 (turtipskupon)
*/
// CLI script
define('CLI_SCRIPT', 1);
// Visibility status - 1: Show, 0: Hide
define('CURRENT_VISIBILITY_STATUS', 0);
define('NEW_VISIBILITY_STATUS', 1);
// Run from /admin/cli dir
require_once(dirname... | true |
c034bbe7ba40fcebfa4fc91be82e4ca502b61fd7 | PHP | juthugasai/php-gaming-website | /src/Common/Port/Adapter/Bus/SymfonyValidatorBus.php | UTF-8 | 2,550 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Gaming\Common\Port\Adapter\Bus;
use Gaming\Common\Bus\Bus;
use Gaming\Common\Bus\Exception\ApplicationException;
use Gaming\Common\Bus\Violation;
use Gaming\Common\Bus\ViolationParameter;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\V... | true |
68f7925e4572db7651e320ca489cd25f9414b7e6 | PHP | amano-k/laravel_sample | /app/Http/Controllers/ItemController.php | UTF-8 | 2,562 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Exception;
use HttpQueryString;
use App\Http\Requests\Item\ItemListRequest;
use App\Http\Requests\Item\ItemAddRequest;
use App\Http\Requests\Item\ItemDeleteRequest;
use App\Services\ItemService;
class ItemController extends Controller
{
private $itemService;
/**
... | true |
c825be37c92483c53cbc626769a6dc234916ff8a | PHP | bartlewis/bartlewis.me | /contact.php | UTF-8 | 2,176 | 2.875 | 3 | [] | no_license | <?php
require_once('common.php');
// Redirect?
if (count($_POST)==0){
header('Location: index.php');
}
$response = array(
'is_success' => false,
'message' => 'Email sent. Thanks!'
);
$to = 'bartlewis+starme@gmail.com';
$isAjax = array_key_exists('is-ajax', $_POST);
$isCaptcha = (array_key_exists('captcha', $_POST)... | true |
a38f62e63990e1d32b344471045f24b9c456f406 | PHP | luisa-m/DBP | /view/Registrieren.php | UTF-8 | 2,858 | 2.984375 | 3 | [] | no_license | <?php
require_once('../fach/Benutzer.php');
require_once('../fach/Kontext.php');
// Wenn Formular abgesendet, versuchen, zu registrieren
if(isset($_REQUEST["registrieren"]))
{
if(strcmp($_POST["password1"],$_POST["password2"]) == 0)
{
try
{
Benutzer::registrieren($_REQUEST["nickname"],$_REQUEST["... | true |
230b7c1e094266d8ef0b661ce15f65f66fbdf499 | PHP | lezhnev74/events-pattern-matcher | /tests/Sequence/SequenceGroupTest.php | UTF-8 | 2,982 | 2.546875 | 3 | [] | no_license | <?php
namespace Lezhnev74\EventsPatternMatcher\Tests\Pattern;
use Carbon\Carbon;
use Lezhnev74\EventsPatternMatcher\Data\Sequence\Sequence;
use Lezhnev74\EventsPatternMatcher\Data\Sequence\SequenceGroup;
class SequenceGroupTest extends \PHPUnit_Framework_TestCase
{
function test_group_can_split_itself_to_subgroup... | true |
422a942f37a0f78459f61252477d5c05322e10e8 | PHP | Albinamkh21/todo | /app/Services/Cache/CacheKeyManager.php | UTF-8 | 2,369 | 2.78125 | 3 | [] | no_license | <?php
/**
* Description of CacheKeyManagerhp
* @copyright Copyright (c) MISTER.AM, LLC
* @author Egor Gerasimchuk <egor@mister.am>
*/
namespace App\Services\Cache;
use Illuminate\Http\Request;
class CacheKeyManager
{
/**
* @param Request $request
* @return string
*/
public function ge... | true |
7aa080dfdaf9860695e9b65f915d30fcb753ab0f | PHP | FuriosoJack/behtadarman | /wp-content/plugins/et-core-plugin/app/models/widgets/menu.php | UTF-8 | 3,851 | 2.609375 | 3 | [] | no_license | <?php
namespace ETC\App\Models\Widgets;
use ETC\App\Models\Widgets;
use ETC\App\Controllers\Shortcodes\Menu as Menu_Shortcode;
/**
* Menu widget.
*
* @since 1.4.4
* @package ETC
* @subpackage ETC/Models/Widgets
*/
class Menu extends Widgets {
function __construct() {
$widget_ops = array('cl... | true |
e4f47b4acdbe51b6ef372d98f432cd27c15ffd59 | PHP | bochamsua/vac_e_co_t_c | /scripts/get-full-info.php | UTF-8 | 4,627 | 2.625 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head>
<style>
.error {color: #FF0000;}
table thead {
background-color: #ccc;
}
table tr td {
padding: 3px;
}
</style>
<title>Get all info from VAECO IDs!</title>
<meta charset="utf-8" />
</head>
<body>
<h2>Get all ... | true |
2564589d81e40a6f7c33134b2e9cb683230d9a92 | PHP | labor-digital/typo3-better-api | /Classes/Tool/Tca/ContentType/Domain/ExtensionRowRepository.php | UTF-8 | 6,405 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2021 LABOR.digital
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | true |
99ac782f972a79b9c988e7ad780a7e7a243245c1 | PHP | sumi12345/codes | /2016_Q_2.php | UTF-8 | 1,526 | 3.09375 | 3 | [] | no_license | <?php
class Pancake {
public function solve($P) {
$R = [];
$len = strlen($P);
$prev = '.';
for($i = 0; $i < $len; $i ++) {
if ($P[$i] != $prev) {
$R[] = $P[$i];
$prev = $P[$i];
}
}
return $R[count($R... | true |
b4830085a43bd713c82ebf214ef591948366aa42 | PHP | Srivat97/assignment_3_cs3319 | /display_single_doctor.php | UTF-8 | 2,026 | 2.734375 | 3 | [] | no_license | <?php
/* In this file, all the information regarding a single doctor is displayed.
This file is called by the display_doctors.php, where the user chose a single doctor.*/
require_once './config/config.php';
require_once ROOT_PATH . '/a3paranji/dbconnection.php';
session_start();
?>
<!DOCTYPE html>
<html>
<head>... | true |
d89551d7aa081a4349d042336552fc5edd112844 | PHP | wernerwa/pat-template | /examples/example_realworld_img.php | UTF-8 | 993 | 2.546875 | 3 | [] | no_license | <?php
/**
* Example that shows the use of variable modifiers
*
* This is an example of a variable modifier that is used to create HTML
* image tags and automatically includes the width and height of the
* specified image.
*
* @author Stephan Schmidt <schst@php-tools.net>
* @package patTemplate
* @subp... | true |
32863b6c37bf42697a7994da8123feef99bd7b52 | PHP | juniorppp/deleta-diretorios | /DelPasta.php | UTF-8 | 349 | 3 | 3 | [] | no_license | //Com este comando vc consegue deletar um diretorio sem precisar deletar os subdiretorios
function DeletaDir($pasta){
$DirDel = system("rm -r $pasta");
if($DirDel){
echo "Pasta deletada com sucesso!";
}else{
echo "Erro ao deletar esta pasta";
}
}
//Fazendo a chamada da função DeletarDir
Del... | true |
0afd950f0590be76ab1bd371f89eaa1734f13908 | PHP | pmould/Aisel | /Aisel/src/Aisel/ResourceBundle/Manager/ApiNodeManager.php | UTF-8 | 3,969 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Aisel package.
*
* (c) Ivan Proskuryakov
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Aisel\ResourceBundle\Manager;
use LogicException;
use Doctrine\ORM\EntityManager;
use Aisel\N... | true |
bf41d5d0bf213f2ead2a5c5ff87f554565cc2722 | PHP | gannasokolova/homework | /php_part6/10.php | UTF-8 | 861 | 2.546875 | 3 | [] | no_license | <form enctype="multipart/form-data" action=<?= $_SERVER['PHP_SELF'];?> method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="1048576" />
Отправить этот файл: <input name="file" type="file" />
<input type="submit" value="Send File" />
</form>
<?php
$uploaddir = __DIR__;
$uploadDirName = MyDir... | true |
8cd60020c3e247bcf160c9b299bd2850d02ab9b7 | PHP | HeyMrQuaidoo/pdftk-libs | /pdftk-php/example/_dbConfig.php | UTF-8 | 1,122 | 3.203125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
// Connection variables
$host = "localhost";
$username = "root";
$password = "";
$db_name = "pdftk-php";
// Connect to server and select database.
$connection = mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
########... | true |
74589f8907cd0eb43931e95fee2254ae3bd7ed7e | PHP | l09benavides/tiendaOnline | /tienda3/application/models/Model_Producto.php | UTF-8 | 6,873 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
//************************************************************************************
//Este módulo sirve para realizar todos los llamados a la BD relacionados con productos,
//como obtener datos de productos, agregar, modificar o eliminar datos de productos.
//Autor: Pablo Hernández
//Fecha de creación: 02/07... | true |
bae1e31fea343f575fdea8ed6e8d59d1b0086e7b | PHP | cargan/wave-form-player | /mp3ToWav.php | UTF-8 | 327 | 2.78125 | 3 | [] | no_license | <?php
function main($source, $destination)
{
$destFileName = $destination . ".wav";
$output = NULL;
$return = NULL;
$command = "avconv -i $source $destFileName";
exec($command, $output, $return);
}
if (($argc != 3) || !file_exists($argv[1])) {
die('invalid arguments specified');
}
main($argv[1], $argv[... | true |
9c74b58379ad8b7dbf04f1fd0542ff0b587753fe | PHP | AlexandrPoddubsky/ant | /Ant/Plugins/Leaf.php | UTF-8 | 803 | 2.578125 | 3 | [] | no_license | <?php
/*
require https://github.com/undercloud/leaf
*/
namespace Ant\Plugins;
use Ant\Ant;
/*
* DOM generator
*/
class Leaf extends Base
{
private $options = array();
/*
* Setup generator
*
* @param array $options params
*/
public function __construct(array $options = array())
{
$this->options = $opt... | true |
c727939dfed8a4dba258a3ed4ee6626ec3616755 | PHP | KarthikUdyawar/phpmysqlworkshopiitb | /Day1/q1_2_vowel.php | UTF-8 | 286 | 3.15625 | 3 | [] | no_license | <?php
$ch = 'Q';
switch($ch)
{
case 'A':
echo "$ch a Vowel";
break;
case 'E':
echo "$ch a Vowel";
break;
case 'I':
echo "$ch a Vowel";
break;
case 'O':
echo "$ch a Vowel";
break;
case 'U':
echo "$ch a Vowel";
break;
default:
echo "$ch a Consonant";
}
?> | true |
f8532ca9b1883be2e539b609b35814e9414afc9e | PHP | cristhianjdv/run_query | /run_query.php | UTF-8 | 3,541 | 2.5625 | 3 | [] | no_license | <?php
#Esta funcion la comparto para ayudar a todos que desean simplicar la vida PHP con mysql
#propiedad de "cristhianjdv"
#Codigo elaborado en el 2011 y funcional hasta la actualidad.
function run_query($sql,$op, $debug){
include_once 'data_db.php';
$db = new PDO('mysql:host='.$servidor.';dbnam... | true |
b9d0109bb597d38454fe4b4e80bc363ce7ad0826 | PHP | itsuki0223/portfolio-github.io | /source/CreateSurveySite/page1.php | UTF-8 | 1,621 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>サイト管理ページ</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>アンケート作成ページ</h1>
</header>
<div class="container">
<?php
//受け取ったデータをJSONに
$data = json_decode( $_POST["data"] , true );
... | true |
0533c4b0ce4d43b3aae3a4933c2da13d7f7a0327 | PHP | greenscar/caffeinewebdesign | /treat_me/ver4/classes/Catalog.inc | UTF-8 | 2,134 | 2.875 | 3 | [] | no_license | <?php
//require_once("DB_Mgr.inc");
require_once("Secretary.inc");
require_once("Flavor.inc");
class Catalog
{
var $items;
var $log;
function Catalog()
{
$this->items = Array();
$this->log = new Secretary();
}
function dbLoadItemsByNameID($dbmgr, $nameID)
{
$sel = "... | true |
cf3da4a206bcde3dd10e890dcc14f294da2bad8f | PHP | aniqurrehman042/Subscription-Service | /app/Http/Controllers/SubscriptionsController.php | UTF-8 | 839 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Subscription;
use App\Models\Website;
use Illuminate\Http\Request;
class SubscriptionsController extends Controller
{
function store(Request $request) {
// Validate request parameters
$attributes = $request->validate([
'email' => ['... | true |
32d48dc3dc78e0fbe4097acf0b5cdaaaaabe76c4 | PHP | matheusmendes1/TwitterClone | /db.class.php | UTF-8 | 1,762 | 3.015625 | 3 | [] | no_license | <?php
class db{
// CRIAR O BANCO NO PHPMYADMIN
//host
private $host = 'localhost';
//usuario
private $usuario = 'root';
//senha
private $senha = '';
//banco de dados
private $database = 'twitter_clone';
pu... | true |
008c6f96ef3383a51704fe50d6b9640f8ea8b3d2 | PHP | sinkdb/homestead | /class/command/ShowAddRlcCommand.php | UTF-8 | 1,189 | 2.75 | 3 | [] | no_license | <?php
PHPWS_Core::initModClass('hms', 'HMS_Learning_Community.php');
PHPWS_Core::initModClass('hms', 'AddCommunityView.php');
class ShowAddRlcCommand extends Command {
protected $id;
public function setId($id){
$this->id = $id;
}
public function getId(){
return $this->id;
}
... | true |
c0adff9291d93c4622fda99667cebc4aaad56b5f | PHP | ano-it-com/eav-bundle | /src/EAV/ORM/Entity/Entity/EAVEntityPropertyValue.php | UTF-8 | 2,330 | 2.703125 | 3 | [] | no_license | <?php
namespace ANOITCOM\EAVBundle\EAV\ORM\Entity\Entity;
use ANOITCOM\EAVBundle\EAV\ORM\DBAL\Types\BasicJsonMetaType;
use ANOITCOM\EAVBundle\EAV\ORM\DBAL\Types\DateTimeType;
use ANOITCOM\EAVBundle\EAV\ORM\DBAL\Types\DateType;
use ANOITCOM\EAVBundle\EAV\ORM\Entity\NamespaceEntity\EAVNamespaceInterface;
use ANOITCOM\E... | true |
f17c9bd0f78c009b7829453784e174ad05b8d404 | PHP | latiefqohar/belajar_laravel | /app/Http/Controllers/DosenController.php | UTF-8 | 464 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class DosenController extends Controller
{
public function index(){ //fungsi index
$nama='abdul latief qohar'; //variable nama diisi dengan string nama
$pelajaran=['algo','kalkulus','web']; //variable pelajaran diisi dengan array ... | true |
263c2762e6520182d5ce2adbc4a000bcf56e2442 | PHP | m-okubo/ecciss | /ecciss/Logger.php | UTF-8 | 1,443 | 3.015625 | 3 | [] | no_license | <?php
namespace ecciss;
class Logger
{
const ERROR = 1;
const WARNING = 2;
const INFO = 3;
const DEBUG = 4;
private static $log;
private $level;
private $destination;
public static function getInstance($level = Logger::INFO, $destination = null)
{
if (empty(self::$l... | true |
1e75a3ad11a28ad995173adc293c51fbb735117b | PHP | enricoaleandri/AdvanciaHiTech | /config/Config.php | UTF-8 | 4,337 | 3.125 | 3 | [] | no_license | <?php
class Config
{
private $configFile = "config/properties/config.properties";
private $properties;
function __construct(){
$this->loadProperties();
//$this->saveInSession();
$this -> properties = array();
}
private function saveInSession()
{
$_SESSION['... | true |
9698c5694f1d4238e7677b7b974835d43fc5dc29 | PHP | Lohardt/koillection | /src/Service/Log/Logger/DatumItemLogger.php | UTF-8 | 3,393 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Service\Log\Logger;
use App\Entity\Datum;
use App\Entity\Item;
use App\Entity\Log;
use App\Enum\LogTypeEnum;
use App\Service\Log\Logger;
use App\Service\Log\LogQueue;
use Symfony\Contracts\Translation\TranslatorInterface;
class DatumItemLogger extends Logger
{
/**
... | true |
cf4bf493c89a517ee7ce16670e48dc1933224299 | PHP | xphere/lazzzy | /tests/Iterator/TakeWhileIteratorTest.php | UTF-8 | 2,705 | 2.75 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the xphere\lazzzy test suite
*
* (c) Berny Cantos <be@rny.cc>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Lazzzy\Tests\Iterator;
use Lazzzy\Iterator\TakeWhileIterator;
use Lazzzy\Te... | true |
0bb89b0aa893909c318b75865bb3b770a0a31e32 | PHP | MaxKovalyov/CourseModel | /API/application/models/UpdateCourse.php | UTF-8 | 501 | 2.796875 | 3 | [] | no_license | <?php
namespace application\models;
use application\core\Model;
use application\lib\Db;
use PDOException;
class UpdateCourse extends Model{
public function getDataForUpdate($index) {
$db = new Db();
try {
$sql = "SELECT * FROM course WHERE idCourse=$index";
$data = $db-... | true |
a753cbf8d45ce3b4e3ac08ba736adcd6422ae7b2 | PHP | Fluppix/bitfabric | /Account/Http/Controllers/AccountController.php | UTF-8 | 853 | 2.5625 | 3 | [] | no_license | <?php
namespace Bitaac\Account\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
class AccountController extends Controller
{
/**
* Create a new controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @return void
*/
public... | true |
458029bb2461ba2308fcef55ecc6bedee44cd822 | PHP | derrickbundi/pesakit_ | /app/Http/Controllers/pagescontroller.php | UTF-8 | 1,218 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\{User};
use Auth;
use Spatie\Permission\Models\Role;
class pagescontroller extends Controller
{
/**
* request authetication for access to this controller
*/
public function __construct() {
$this->middleware('a... | true |
0c751934a9d13f7af78fb0c9eea93e36ed7c3857 | PHP | oveland/cdav | /database/migrations/2017_08_14_211204_create_abandonment_declarations_table.php | UTF-8 | 953 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAbandonmentDeclarationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(... | true |
b2bb11cfedb82407a16c50f7da76d34e00d384b4 | PHP | omgdesarrollo/enerin-omg | /OMG/Model/DocumentoSalidaModel.php | UTF-8 | 8,475 | 2.828125 | 3 | [] | no_license | <?php
require_once '../dao/DocumentoSalidaDAO.php';
require_once '../Pojo/DocumentoSalidaPojo.php';
class DocumentoSalidaModel
{
//put your code here
/*
*============================================================================
*@comment listar documentos de salida con folio de entrada y sin ... | true |
a1d539fa024a343d7fb9c9e99fde4a746ddfb090 | PHP | almino/Onimla-SemanticUI | /Traits/Alignment.php | UTF-8 | 4,422 | 2.609375 | 3 | [] | no_license | <?php
namespace Onimla\SemanticUI\Traits;
use Onimla\SemanticUI\Constant;
trait Alignment {
private function alignmentAddClass($position) {
$method = 'after';
$search = \Onimla\SemanticUI\Component::CLASS_NAME;
if ($this->hasClass(\Onimla\SemanticUI\Row::CLASS_NAME)) {
$meth... | true |
245739804a02b31aa3cbbbf08edc963398d545e4 | PHP | zaki1993/HackerSchool | /Ekatte/regioni.php | UTF-8 | 904 | 2.75 | 3 | [] | no_license | <?php header('Content-Type: text/html; charset=UTF-8'); ?>
<?php
require_once 'excel_reader2.php';
require_once 'db.php';
$region = new Spreadsheet_Excel_Reader();
$region->setUTFEncoder('iconv');
$region->setOutputEncoding('UTF-8');
$region->read("Ekatte/xls_ekatte/Ek_reg2.xls");
for($i=0;$i<count($region->sheets);... | true |
2bd9d49b8e6ac26a7a96de99d04db22ef9f9484f | PHP | R-o-y/cs2012_crowdfunding_system | /classes/Category.php | UTF-8 | 8,333 | 3.15625 | 3 | [] | no_license | <?php
/**
* Record the category table in database
*
* Class Category
*/
Class Category {
public $id;
public $name;
public $activate;
private static $currentCategory;
private static $connection;
/**
* Create category from array
*
* Category constructor.
* @param $categ... | true |
2b9ed744a6074d07375049dc7de4f7b287a0d3cb | PHP | SilasKenneth/evaluationPHP | /super/includes/Student.php | UTF-8 | 21,675 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
abstract class Student extends DB {
public static function getClassName($id,$sem,$year,$course){
try{
$record = self::getMyClasses($sem, $year, $course);
if(!$record){
return FALSE;
}
foreach($record as $rec){
if($rec['id'... | true |
9473b4bd7eebf552e6a457a815cae91f27f53840 | PHP | wpstarter/framework | /tests/View/Blade/BladeEchoHandlerTest.php | UTF-8 | 3,340 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace WpStarter\Tests\View\Blade;
use Exception;
use WpStarter\Support\Fluent;
use WpStarter\Support\Str;
class BladeEchoHandlerTest extends AbstractBladeTestCase
{
protected function setUp(): void
{
parent::setUp();
$this->compiler->stringable(function (Fluent $object) {
... | true |
bcf0c997e0948b8319e7202629c7135d62db330c | PHP | jdcepeda76/jlmwshop | /sistema/reports/reporte_allproducts.php | UTF-8 | 1,644 | 2.53125 | 3 | [] | no_license | <?php
require ('../../conexion.php');
header("Content-Type:application/xls");
header('Content-Disposition: attachment; filename="ProductosJLM.xls"');
$sql= "SELECT p.Id_producto, p.producto, pr.nombre, p.precio, p.cantidad, te.tela, ta.codigo, p.dateadd FROM productos p INNER JOIN proveedores pr ON p.nombre=pr.id_prov... | true |
45f0cc493c6e8c2f3d83b541e5cb737ddf480080 | PHP | parsonsx/dawgsquad | /sharingmedia/app/tests/cases/views/find_books.test.php | UTF-8 | 3,507 | 2.546875 | 3 | [] | no_license | <?php
/**
* File: app/tests/cases/views/find_books.test.php
*
* This ensures there are the correct elements on each view
* of the find books use case.
*/
class FindBooksTestCase extends CakeWebTestCase {
/* tests elements on search page */
function testFindBooksInitialPage() {
/* test title */
ech... | true |
3e43ef3e5c48ea3cf7cd8afb0e89cc140c16ce59 | PHP | shmoulevsky/todo2 | /app/Classes/BaseController.php | UTF-8 | 685 | 2.671875 | 3 | [] | no_license | <?
abstract class BaseController
{
// render view file
public function render($view ,$args = [], $template = ''){
extract($args, EXTR_SKIP);
$file = APP_DIR. '/View/'.$view.'.php';
if($template != ''){
$header = PUBLIC_DIR . '/templates/'.$template.'/he... | true |
8b3a1df866f68a534718c8aeaa0c36625ebedde2 | PHP | horngyih/qikres-core-plugin | /includes/class-qikres-custom-type.php | UTF-8 | 3,062 | 2.78125 | 3 | [] | no_license | <?php
abstract class Qikres_Custom_Type{
protected $custom_type_name;
protected $custom_type_labels;
protected $custom_type_args;
protected $custom_metadatas = array();
function __construct(){
}
//Public functions
public function register(){
$args = $this->custom_type_args;
... | true |
8dcaa8a7c436e21b226c938ea72c539c795c0e19 | PHP | michaeljoyce/omp | /controllers/modals/editorDecision/form/SendReviewsForm.inc.php | UTF-8 | 5,405 | 2.578125 | 3 | [] | no_license | <?php
/**
* @file controllers/modals/editorDecision/form/ReviewerForm.inc.php
*
* Copyright (c) 2003-2008 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class ReviewerForm
* @ingroup controllers_grid_reviewer__form
*
* @brief Form for adding a reviewer to a s... | true |
f5d3c3a060c76456ff0248e199608b4a03a4818c | PHP | shikong-sk/ThinkPHP_Study | /application/db/model/Department.php | UTF-8 | 760 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\db\model;
use think\Model;
class Department extends Model
{
protected $pk = 'departmentId';
public function student(){
// return $this->hasOne('Student','departmentId');
// 反向关联查询
// return $this->belongsTo('Student','departmentId','departmentId');
retur... | true |
adb61ee0e276e4f42559071825e5d3b2e03106bf | PHP | chipsu/php-core | /src/Headers.php | UTF-8 | 1,168 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace metrica\core;
class Headers extends Params implements HeadersInterface {
protected array $headers;
public static function fromArray(array $params): HeadersInterface {
$result = [];
foreach($params as $key => $value) {
if(substr($key, 0, 5) === 'HTTP_') {
$result[str_replace(... | true |
1613c74ad8a30b27db7be1d745eb53bedea7bfe0 | PHP | idmarinas/galaxyofdrones | /app/Jobs/Construction.php | UTF-8 | 1,081 | 2.703125 | 3 | [
"MIT",
"CC-BY-4.0",
"CC-BY-NC-SA-4.0"
] | permissive | <?php
namespace Koodilab\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Database\DatabaseManager;
use Koodilab\Game\ConstructionManager;
use Koodilab\Models\Construction as ConstructionModel;
class Construction implements ShouldQueue
{
use Queueable;
/**
... | true |
78646c9e5701766a2814f0b1d60c8b70eb2471a8 | PHP | Insti/ApprovalTests-Php | /writers/Writer.php | UTF-8 | 117 | 2.640625 | 3 | [] | no_license | <?php
interface Writer {
public function getExtensionWithoutDot();
public function write($receivedFilename);
}
?> | true |
8a1f56b6369f8677e57e20c5f08d9d1dd0e36429 | PHP | dave-d-code/Codeigniter-Work-Agency | /application/models/Common/Start_m.php | UTF-8 | 2,710 | 2.796875 | 3 | [] | no_license | <?php // delete end tag
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Common model for all
* to handle methods such as logging in etc
* that everyone will need. will work with the secure controller
*/
class Start_m extends CI_Model
{
public $login_form_rules = array(
array(
'field' => 'u... | true |
24de60dc4a41a68b651a6b3484bad0e9b3e38206 | PHP | ktv1/Sherif | /database/migrations/2018_07_30_191115_create_user_personal_table.php | UTF-8 | 790 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserPersonalTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_personal', function(Blueprint $table)
{
$table->increments('id');... | true |
50a21699a0d6a2ea2994f77bfa0f3ec418e5e32d | PHP | vhilly/ODS | /protected/controllers/Menu_itemsController.php | UTF-8 | 2,886 | 2.546875 | 3 | [] | no_license | <?php
class Menu_itemsController extends Controller
{
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout='//layouts/main';
/**
* @return array action filters
*/
public function filters()
{... | true |
635f9b05ac9b880a9e947aaa40cede163780b08a | PHP | KelvinDeveloper/sluuplabs | /Services/Upload/UploadService.php | UTF-8 | 1,583 | 2.515625 | 3 | [] | no_license | <?php
class Upload extends Explorer{
function Upload(){
$ArrayL = explode( '/', $_POST['Location'] );
$_POST['Location'] = '';
foreach( $ArrayL as $v ){
if( !empty( $v ) && $v != 'Explorer' ){
$_POST['Location'] .= $v . '/';
}
}
$_POST['Location'] = '/' . $_POST['Location'];
... | true |
96ec711396b0161e86c615935925e09923d19dfa | PHP | udpcraft/deployer | /web/app/Helper/Utility/Datetime.php | UTF-8 | 139 | 2.640625 | 3 | [] | no_license | <?php
namespace Helper\Utility;
class Datetime
{
public static function current()
{
return date('Y-m-d H:i:s');
}
}
| true |
50685f55bb70385f399db5c1605eb14092fc6042 | PHP | t1sh0o/afl | /app/models/User.php | UTF-8 | 1,287 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
/**
* Mass assigned variables
* ... | true |