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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1181242c8a3b71076c96c203eabe83085605e4b1 | PHP | trantrang2000/estate_web | /controllers/BaseController.php | UTF-8 | 937 | 2.84375 | 3 | [] | no_license | <?php
class BaseController
{
public $template;
public $layout;
public $content;
public $headTag;
/**
* Thiết lập view
*/
public function setTemplate($_template, $var = [])
{
ob_start();
$this->template = $_template;
extract($var);
include "views/{$this->template}.php... | true |
c315018e688067c77bb39472307b5199d54609aa | PHP | vanessasummer/tinycake | /cake/kernel/controller_base.php | UTF-8 | 1,127 | 2.640625 | 3 | [] | no_license | <?php
abstract class Controller
{
var $db;
var $tpl;
/**
* 通用的调取模型类的函数
*/
function getModule($mname)
{
if(!isset($this->$mname))
{
include_once('m/'.$mname.'.php');
$this->$mname = new $mname($this->config, isset($this->db)?$this->db:false);
}
return $this->$mname;
}
/**
* 初始... | true |
c0a415923d3ac9875cfb13d6e69869a09f1013de | PHP | slender97/spotyfoe | /Spotifoe/calificacion.php | UTF-8 | 1,358 | 2.984375 | 3 | [] | no_license | <html>
<head>
<title>Caracteristicas</title>
</head>
<body>
<?php
include("connection.php");
$codCancio = $_GET['codCanci'];
$calif = $_POST["calificacion"];
$conn = connect("musica");
if (isset($_POST['enviar'])){
$enviar = $_POST['enviar'];
}
else{
$enviar = false;
}
if($enviar){
$sql = "INSERT ... | true |
4a06944b85083f2a0f1cf12f5e65ccae4aa6beea | PHP | bitxseven/yii2-big | /src/core/BlockInterface.php | UTF-8 | 1,749 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link http://www.bigbrush-agency.com/
* @copyright Copyright (c) 2015 Big Brush Agency ApS
* @license http://www.bigbrush-agency.com/license/
*/
namespace bigbrush\big\core;
/**
* Interface for a [[Block]] that ensures backend compatability.
*/
interface BlockInterface
{
/**
* Runs before [... | true |
70c27ea1e8ff985165749bc0a64f9e75f424fed2 | PHP | samizdam/Geometry | /src/Plane/Curves/CurvesFactoryInterface.php | UTF-8 | 1,039 | 2.96875 | 3 | [] | no_license | <?php
namespace samizdam\Geometry\Plane\Curves;
use samizdam\Geometry\Plane\Point\PointInterface;
use samizdam\Geometry\Plane\Lines\LineSegmentInterface;
/**
*
* @author samizdam
*
*/
interface CurvesFactoryInterface
{
/**
*
* @param PointInterface $centralPoint
* @pa... | true |
24ccd6308df52a7d49f7c52f4154e4450ce06db0 | PHP | otsuru/geeiku | /lib/lib_toppa.php | UTF-8 | 2,918 | 2.90625 | 3 | [] | no_license | <?php
//=================================================================
//
// 光通信(toppa!)用共通関数
//
// ------変更内容----------------------DATE -----Rev----Auther---
// 新規作成 2011/08/03 Rev 1.0.0 otsuru
// --------------------------------------------------------------
//
//==================================... | true |
51c365d594d6fcf40f4334d863c339c3012f784a | PHP | NielsOtten/MT-MEC-Tracking-Log | /includes/entryCall.php | UTF-8 | 3,417 | 2.6875 | 3 | [] | no_license | <?php
include_once("Entry.php");
include_once("../initialize.php");
if ($_POST) {
if (isLoggedIn()) {
$db = new database();
$entry = new entry($db->getConnection());
switch ($_POST["method"]) {
case "insert":
$entry -> title = (isset($_POST['title']) ? $_POST['t... | true |
a69b2df8105d751dee1adbd03903fbf14b4cfc92 | PHP | Unlimited2112/51 | /Технологии обработки финансовой информации/ТОФИ/tofi.bank/Classes/Libs/Formaters/Transliterator.php | UTF-8 | 4,223 | 2.65625 | 3 | [] | no_license | <?php
class Transliterator
{
/**
* @param string $title
* @param string $standard
* @return string
*/
static protected function ConvertRussianLetters($title, $standard)
{
$gost = array(
'Г'=>'G','Ё'=>'JO','Є'=>'EH','Ы'=>'Y','І'=>'I',
'і'=>'i','г'=>'g','ё'=>'jo','№'=>'#','є'=>'eh',
'ы'=>'y'... | true |
64cc4a9993723935c4f14d6833c96a4b411479fd | PHP | cintrzyk/project | /cakephp/app/controllers/users_controller.php | UTF-8 | 2,333 | 2.625 | 3 | [] | no_license | <?php
class UsersController extends AppController {
var $name = 'Users';
var $components = array('Session');
var $helpers = array('Html','Form');
//var $components = array('Auth'); // Not necessary if declared in your app controller
var $userProfile = array('controller' => 'profiles', 'action' => 'profil... | true |
0e4437dbaf3bc588c372b35d7da11ae40bbc6611 | PHP | phpists/sk | /api/modules/Billing/Traits/Paymentable.php | UTF-8 | 1,057 | 2.8125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Modules\Billing\Traits;
use Modules\Billing\Services\Gateway\PayPal;
trait Paymentable
{
/**
* Payment completed.
*
* @return boolean
*/
public function paid(): bool
{
return in_array($this->status, [self::COMPLETED]);
}
/**
... | true |
a9dbf9d28cce7c2c0bdb929346ccec18139aa426 | PHP | thephpleague/geotools | /tests/Coordinate/CoordinateTest.php | UTF-8 | 12,010 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Geotools library.
*
* (c) Antoine Corcy <contact@sbin.dk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\Geotools\Tests\Coordinate;
use League\Geotools\Coordinate\Coordinate;... | true |
805b79ab0bc347ca8d45ebcb23e254ead66f75ff | PHP | Landixus/PracticaFinal | /PHP/PracticaFinal/insertUser.php | UTF-8 | 1,245 | 2.734375 | 3 | [] | no_license | <?php
include 'dbConn.php';
$conn = PDOConn::connect();
$mail = $_POST["email"];
$password = $_POST["password"];
$height = $_POST["height"];
$weight = $_POST["weight"];
/*$mail = "TestUser";
$password = "PasswordTest";
$height = 120;
$weight = 55;*/
//"SELECT * FROM user WHERE mail='" + mail + "';"
try {
$st... | true |
93f55ad9370ae8e294ec69386ce00bdd6c0364b7 | PHP | kotopheiop/bitrix-core | /modules/vote/lib/copy/manager.php | UTF-8 | 2,346 | 2.65625 | 3 | [] | no_license | <?php
namespace Bitrix\Vote\Copy;
use Bitrix\Main\Copy\Container;
use Bitrix\Main\Copy\ContainerCollection;
use Bitrix\Main\Copy\EntityCopier;
use Bitrix\Vote\Copy\Implement\Answer as AnswerImplementer;
use Bitrix\Vote\Copy\Implement\Question as QuestionImplementer;
use Bitrix\Vote\Copy\Implement\Vote as VoteImplemen... | true |
736f94bb22ef932ce4ffeb6537bd0c95db80457d | PHP | NizaVolair/MySQL_PHP_Project_Database | /Courses.php | UTF-8 | 1,763 | 2.84375 | 3 | [] | no_license | <?php
// Turn on error reporting
ini_set("display_errors", "On");
// Connect to database
// Handle connection error
if($mysqli->connect_errno){
echo "Connection error " . $mysqli->connect_errno . " " . $mysqli->connect_error;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Niza Volair... | true |
a42193c2ba988ea17d838ae75e1b1026faa566ec | PHP | potara/core | /src/Core/Middleware/AbstractMiddleware.php | UTF-8 | 710 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Potara (https://potara.org)
*
* @see https://github.com/potara/core
* @copyright Copyright (c) 2018-2020 Bruno Lima
* @author Bruno Lima <brunolimame@gmail.com>
* @license https://github.com/potara/core/blob/master/LICENSE (MIT License)
*/
namespace Potara\Core\Mi... | true |
155fffca9a0e1afc5ac7e2f6ff51313450091529 | PHP | pwonline12/blog | /index.php | UTF-8 | 640 | 3.03125 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: Admin
* Date: 30.07.2015
* Time: 22:45
*/
class Person {
private $name;
private static $count=0;
/**
* @return mixed
*/
public static function getStaticName()
{
return self::$count;
}
public function __construct($name... | true |
a847df5fdbdddc799692cc1f021c881643e05484 | PHP | terablaze/core | /src/Database/ORM/UnderscoreNamingStrategy.php | UTF-8 | 3,678 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Terablaze\Database\ORM;
use function preg_replace;
use function strpos;
use function strrpos;
use function strtolower;
use function strtoupper;
use function substr;
use function trigger_error;
use const CASE_LOWER;
use const CASE_UPPER;
use const E_USER_DEPRECATED;
/**
* Naming strategy implementin... | true |
1adc30b633bd0283e32cebca4355ac0a2fd974d8 | PHP | jordanbrauer/phelpers | /tests/Unit/GenerateTest.php | UTF-8 | 1,155 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
/**
* This file is part of the jordanbrauer/phelpers PHP library.
*
* @copyright 2021 Jordan Brauer <18744334+jordanbrauer@users.noreply.github.com>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this ... | true |
d727da07dd541b892d7867a903d3c742801cd5ff | PHP | juanesrasta/Rest | /models/product.php | UTF-8 | 5,360 | 3.0625 | 3 | [] | no_license | <?php
class Product {
private $conn;
private $table = "products";
public $id;
public $name;
public $description;
public $price;
public $category_id;
public $category_name;
public $created;
public function __construct($db) {
$this->conn = $db;
}
public functio... | true |
5ec890d6647c0b7cb20e52a4f00a0a53af7b489e | PHP | Eldiar/ReadIt | /post_edit.php | UTF-8 | 898 | 2.90625 | 3 | [] | no_license | <?php
// Retrieving post information from POST
$postId = $_POST['Id'];
$postMessage = $_POST['postMessage'];
$_SESSION['postMessage'] = $postMessage;
// Post message length check
if (strlen($postMessage) > 4000) {
$_SESSION['message'] = "The post content cannot be longer than 4000 characters! (including spaces)";... | true |
016f768c8f60ed84431ff850c45862c76a7079fb | PHP | astronati/php-wordpress-api-response-parser | /src/Model/TagModel.php | UTF-8 | 603 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace WARP\Model;
class TagModel
{
/**
* @var array
*/
private $apiResponse;
public function __construct(array $apiResponse)
{
$this->apiResponse = $apiResponse;
}
/**
* @return int
*/
public function getID(): int
{
return $this->apiRespo... | true |
aa0df4e14973af094d74f02077d8a654bfd1bbc9 | PHP | Hachidaime/librarian | /app/controllers/Controller.php | UTF-8 | 4,313 | 2.6875 | 3 | [] | no_license | <?php
namespace app\controllers;
use Rakit\Validation\Validator;
use app\rules\UniqueRule;
use app\rules\LoginRule;
use app\helpers\Flasher;
use app\helpers\Functions;
/**
* Class Controller
*
* Controller menyediakan tempat nyaman
* untuk memuat komponen dan melakukan fungsi
* yang dibutuhkan oleh semua Control... | true |
e5c329a672db3c58c27c2e7d070b5d473aa14ace | PHP | oussamasebai/proetweb | /site/BO/core/ProduitC.php | UTF-8 | 3,319 | 3.046875 | 3 | [] | no_license | <?php
include "../../config.php";
class ProduitC
{
function afficherProduit($produit)
{
echo "id: " . $produit->getId() . "<br>";
echo "Nom: " . $produit->getNom() . "<br>";
echo "Prix: " . $produit->getPrix() . "<br>";
}
function ajouterProduit($produit)
{
$sql = "i... | true |
6f797e4912343f093b34e08c160e5b3791c335fb | PHP | gabelatendai/OPSS | /admin/students.php | UTF-8 | 3,230 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
include 'header.php';
include '../rb.php';
R::setup('mysql:host=localhost;dbname=opss_db', 'root', '');
?>
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<... | true |
0ea9a891a6bf6c64d7fa93fa91bba9ec0ab7f9d8 | PHP | darxide-pl/cakephp-filter | /src/Engine/BaseEngine.php | UTF-8 | 785 | 2.71875 | 3 | [] | no_license | <?php
namespace Filter\Engine;
use Filter\Engine\FilterEngineInterface;
use Cake\Routing\Router;
use Cake\Http\ServerRequest;
abstract class BaseEngine implements FilterEngineInterface
{
/**
* @var ServerRequest
*/
protected $request;
public function get(string $key)
{
r... | true |
f1733432d1fccc9949f59fb675eed34089b7de34 | PHP | sanbernardohackaton/X-FORCE | /clases/region_modelo.php | UTF-8 | 1,242 | 3 | 3 | [] | no_license | <?php
include_once('region.php');
include_once('conexion.php');
class Region_modelo
{
private $conexion;
public function __construct()
{
$this -> setConexion(new Conexion());
}
public function setConexion($conexion)
{
$this -> conexion = $conexion;
}
public function getConexion()
{
return $this -> ... | true |
2ce028c9d79eea92f2053d9b86adf9a73889970f | PHP | Pork3pok/prjs3 | /inc/class/etudiant.class.php | UTF-8 | 5,051 | 3.203125 | 3 | [] | no_license | <?php
require_once "inc/config.inc.php";
/**
* Classe représentant un Etudiant
*/
class Etudiant {
/* Attributs d'instance */
private $login;
private $idEtu;
private $sha1mdp;
private $nom;
private $prenom;
private $sexe;
private $telF;
private $telP;
private $email;
private $ville;
private ... | true |
99d6f7b240b157c924699546cbdf82c7663159df | PHP | MitNy/HackerRank | /StringConstruction.php | UTF-8 | 491 | 3.4375 | 3 | [] | no_license | <?php
// Complete the stringConstruction function below.
function stringConstruction($s) {
$split_s = str_split($s);
$us = array_unique($split_s);
return count($us);
}
$fptr = fopen(getenv("OUTPUT_PATH"), "w");
$stdin = fopen("php://stdin", "r");
fscanf($stdin, "%d\n", $q);
for ($q_itr = 0; $q_itr < $q... | true |
36e3272df87252ef1d227a670920b4bc8e401fc0 | PHP | yannlandry/yannlandry.com | /application/models/blog_model.php | UTF-8 | 1,224 | 2.609375 | 3 | [
"Unlicense"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Blog_model extends CI_Model {
public function get_categories()
{
return $this->db->query("SELECT Slug, Title FROM categories ORDER BY Position ASC")->result();
}
public function get_posts($category, $before)
{
$before = intval(... | true |
26db51186a8678484b77308953ddd515346a2e13 | PHP | xwmhmily/miniSwoole | /library/core/HttpServer.php | UTF-8 | 1,694 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* HttpServer
*/
class HttpServer {
private $server;
public function __construct($config) {
$ip = $config['http']['ip'];
$port = $config['http']['port'];
$this->server = new swoole_http_server($ip, $port);
$c = [];
foreach($config['common'] as $key => $va... | true |
604570d649934697a581e8c1b0919740a739b94d | PHP | Niranjan2054/neo | /class/image.php | UTF-8 | 1,645 | 2.578125 | 3 | [] | no_license | <?php
class image extends database{
function __construct(){
database::__construct();
$this->table('image');
}
public function addImage($data,$is_die=false){
return $this->adddata($data,$is_die);
}
public function getallImage($args=array(),$is_die=false){
return $this->selectdata($args,$is_die);
}
public... | true |
9079419e8b24a9da841051ccb2dfa873f06c1a08 | PHP | nova-framework/system | /src/Notifications/Models/Notification.php | UTF-8 | 2,283 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Nova\Notifications\Models;
use Nova\Database\ORM\Model as BaseModel;
use Nova\Database\ORM\ModelNotFoundException;
use Nova\Support\Contracts\ArrayableInterface;
use Nova\Notifications\Models\NotificationCollection;
class Notification extends BaseModel
{
/**
* The table associated with the... | true |
13f97680b760694d6486787bbcfbbb47723c893c | PHP | wqp2018/GoGoDemo | /app/Http/Controllers/Admin/CityController.php | UTF-8 | 835 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/12/23
* Time: 23:37
*/
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use DB;
class CityController extends BaseController{
// 获取一级城市
public function getFirstLevelCity(){
$data = DB::table('city')
... | true |
9534391f3d9eb9af4d08bdf655757ff22035c1b0 | PHP | nadvamir/php-framework | /system/__Form.php | UTF-8 | 1,705 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* basic form class, which creates a form, displays it and handles submission
*/
class Form
{
protected $_meta = array ();
protected $_fields = array ();
protected $_values = array ();
protected $_valid = true;
$_fields = array (
'login' => array (
't... | true |
42d7c21130ee0ef0d22561b54f32a692a22b3c26 | PHP | douglassantos45/php-slim-jwt | /app/controllers/ProductController.php | UTF-8 | 508 | 2.8125 | 3 | [] | no_license | <?php
namespace app\controllers;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
final class ProductController{
public function getProducts(Request $request, Response $response, array $args): Response{
//$response->getBody()->write("He... | true |
f6f13c7ff23aac2d76d164b1455918e7db9336d4 | PHP | efureev/response-actions | /src/Actions/Download.php | UTF-8 | 814 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ResponseActions\Actions;
use function array_merge;
/**
* @method static static make(string $url, string $name, array $params = [])
*/
class Download extends AbstractAction
{
use WithParams;
public function __construct(
protected string $url,
protec... | true |
ef211bb1d2bbba16ec5b739d6cfba979c6f630a9 | PHP | prasanthi-cloud/dckaptask | /Order.php | UTF-8 | 350 | 2.796875 | 3 | [] | no_license | <?php
include('Database.php');
class Orders{
public function __construct(){
$this->db = new Database();
$this->db->connect();
}
public function insertOrder($table='orders',$values,$rows){
$this->res=$this->db->insert($table,$values,$rows);
if($this->res){
return true;
}
else{
retur... | true |
321071495bbcc562fc9742e19749221c28a863b7 | PHP | qixinyun/xyxf-sdk | /src/Label/Translator/LabelRestfulTranslator.php | UTF-8 | 4,100 | 2.59375 | 3 | [] | no_license | <?php
namespace Sdk\Label\Translator;
use Sdk\Label\Model\Label;
use Sdk\Label\Model\NullLabel;
use Sdk\Common\Translator\RestfulTranslatorTrait;
use Sdk\Crew\Translator\CrewRestfulTranslator;
use Marmot\Interfaces\IRestfulTranslator;
class LabelRestfulTranslator implements IRestfulTranslator
{
use RestfulTrans... | true |
5efdd7e267fee3d80efe6b88cfc86fb072e3caa5 | PHP | minhtuancn/BusMapPalmas | /module/Map/src/Map/Form/FormBus.php | UTF-8 | 1,545 | 2.546875 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of TraceRoute
*
* @author herinson
*/
namespace Map\Form;
use Zend\Form\Form;
class FormBus extends Form {
public function __construct($name = null) {
parent::__construct... | true |
c5ed1707085143dcc5f184d685a3c05753f16bf4 | PHP | avinashpresntr/booking | /application/models/xtra_m.php | UTF-8 | 4,737 | 2.78125 | 3 | [] | no_license | <?php
class Xtra_m extends DIP_Model {
function __construct() {
parent::__construct();
}
public function get_all_languages() {
$l = new Language();
$l->get();
$result = array();
foreach ($l as $li) {
$result[$li->id] = $li->name;
}
retur... | true |
dd95c13c28bd8a762cccdb4356064a0ad1b10101 | PHP | cleemansen/comalyser | /Server/ws/home_values.php | UTF-8 | 2,194 | 2.640625 | 3 | [] | no_license | <?php
include('../database.php');
include('../functions.php');
connect_to_db();
$uid = $_GET['uid'];
$data = Array();
$buffer = Array();
$fields = Array();
array_push($fields, 'date');
$cnt = 0;
$q = "SELECT t.name, v.date, v.price, v.points ".
"FROM comunio_users AS u ".
"JOIN comunio_team AS t ON u.uid = t.uid ".... | true |
12a7740ef31639eff542029f9becc1e1ffb1ebda | PHP | royallegal/IRA-Old-WordPress-Theme | /functions/blog.php | UTF-8 | 2,607 | 2.734375 | 3 | [] | no_license | <?php
// ---- TABLE OF CONTENTS ---- //
// 1. Excerpts
// 2. Related Posts
// ---- EXCERPTS ---- //
// Remove <p> tags from excerpts
remove_filter('the_excerpt', 'wpautop');
// Remove <p> tags in manual exerpts
add_filter('rlswp_excerpt', 'shortcode_unautop');
// Text Only Excerpts
// rls_text_excerpt('rlswp_index'... | true |
8cd8b73b544504ece506b27701240e1bcf1c6630 | PHP | andrixh/rotor-path | /Rotor/Path.php | UTF-8 | 4,481 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Rotor;
use Rotor\Exception\InvalidPathOperationException;
class Path
{
protected $is_empty = false;
protected $is_dir = false;
protected $is_absolute = false;
protected $is_file = false;
protected $directory = '';
protected $basename = '';
protected $filename = '';
pro... | true |
2c0fb698a1229613ed9102b2d3e431b6218e52e8 | PHP | sunny-io/quiz | /quiz_v1/function.php | UTF-8 | 618 | 3.203125 | 3 | [] | no_license | <?php
function showquestion (array $liste){
$list = "";
/* echo "<ol>";
foreach ($liste as $value ) {
echo "<li>".$value."</li>";
}
echo "</ol>";*/
echo "<ul>";
foreach ($liste as $key => $value){
echo "<li><input type='radio' name='useranswer' id='useranswe... | true |
60a9c132dcb377d8e9ce590a2738385103e26184 | PHP | NaderElmor/SimpleEcommerce | /admin/members.php | UTF-8 | 21,158 | 2.546875 | 3 | [] | no_license | <?php
ob_start();
// Manage members page (add - Edit - update - delete)
session_start();
if(isset($_SESSION['username'])) {
$pageTitle = 'Members';
require 'init.php';
$actionName = isset($_GET['actionName']) ? $_GET['actionName'] : 'Main';
switch ($actionName) {
... | true |
6406b54135b2a690713304e66d1fd09604010769 | PHP | CosimoMartinez/verbena | /app/config/app.php | UTF-8 | 1,493 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Application configuration file.
*/
$app = [
/**
* The environment type.
*
* development: set application in development-mode (display debug messages, notices and errors).
* debug: set application in debug-mode (display debug messages and errors).
* quiet: set app... | true |
e41776a79eb79706bb30013afd5c0b3814f7126f | PHP | amzn/amazon-pay-sdk-php | /AmazonPay/ClientInterface.php | UTF-8 | 23,098 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace AmazonPay;
/* Interface class to showcase the public API methods for Amazon Pay */
interface ClientInterface
{
/* Setter for sandbox
* Sets the boolean value for config['sandbox'] variable
*/
public function setSandbox($value);
/* Setter for config['client_id']
* Sets the ... | true |
782f4a9bca4c2939473ed3c64145518d1dda3ce9 | PHP | MireiaCastillejo/PW_PWPOP_GROUP_10 | /src/Controller/HelloController.php | UTF-8 | 5,010 | 2.59375 | 3 | [] | no_license | <?php
namespace SallePW\SlimApp\Controller;
use Dflydev\FigCookies\FigRequestCookies;
use Dflydev\FigCookies\FigResponseCookies;
use Dflydev\FigCookies\SetCookie;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Salle... | true |
c19ba42200436b082f5e747ad29c18882a07cb44 | PHP | NetCommons3/Rooms | /Model/Space.php | UTF-8 | 5,427 | 2.609375 | 3 | [] | no_license | <?php
/**
* Space Model
*
* @property Space $ParentSpace
* @property Room $Room
* @property Space $ChildSpace
* @property Language $Language
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://ww... | true |
27657ba78ababc6bb185972d1fd88417d43e6639 | PHP | Denispo/TigerCore | /src/TigerCore/Constants/PasswordValidity.php | UTF-8 | 451 | 3.09375 | 3 | [] | no_license | <?php
namespace TigerCore\Constants;
class PasswordValidity extends BaseConst implements IBaseConst {
const PWD_INVALID = 0;
const PWD_VALID = 1;
public static function createFromBoolean(bool $isPasswordValid):self {
if ($isPasswordValid) {
return new self(self::PWD_VALID);
} else {
retur... | true |
7728f6aabab4a583ffbb2c2d7c6e14f9fc75cc36 | PHP | lenlyle1/framework | /App/Lib/Smarty/Plugins/function.calcAge.php | UTF-8 | 616 | 2.734375 | 3 | [] | no_license | <?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
use \Lib\Debug\Debugger;
/**
* Smarty {calcAge} function plugin
* Type: function<br>
* Name: userCan<br>
*
* @author Len Lyle
* @param array $params parameters
* @param Smarty_Internal_Template $... | true |
5ad90ce9ced9b4199218e621bf32769be1c58d6c | PHP | ToribioMatiasRaulAlberto/disor | /cifrado/web/codigo/PHP/vendor/pradosoft/prado/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php | UTF-8 | 5,708 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* TSqlMapPagedList class file.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link https://github.com/pradosoft/prado
* @copyright Copyright © 2005-2016 The PRADO Group
* @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Data.SqlMap
*/
Prado::using('System.C... | true |
838a35284420073d886c39c8e09a0026c308cf28 | PHP | martynkaa101/SkiManager | /php_codes/registration_folder/anna.php | UTF-8 | 752 | 2.6875 | 3 | [] | no_license | <?php
$servername="localhost";
$mysql_user="root";
$mysql_pass="";
$dbname="registration";
$conn=mysqli_connect($servername, $mysql_user, $mysql_pass, $dbname);
$instructor="Anna";
$flag='t';
if($conn){
echo("connection success! ");
}else{
echo("connection not success ");
}
for ($year = 2019; $year <= 2021; $year++)... | true |
d2bd648cd0e2134057cbeb12ab741645ebc3ed9d | PHP | pessolatohenrique/avaliacaoftd | /models/DeptoEmpregado.php | UTF-8 | 4,642 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use app\components\DateHelper;
/**
* This is the model class for table "dept_emp".
*
* @property int $emp_no
* @property string $dept_no
* @property string $from_date
* @property string $to_date
*
* @property Employee $empNo
* @property Department $deptNo
*/
class Depto... | true |
c981aea161899e355c9095a0124ed2524aa11352 | PHP | Viktorry/Movies | /public_html/Controller/UploadVideo.php | UTF-8 | 863 | 2.59375 | 3 | [] | no_license | <?php
class uploadVideo
{
public function uploadVideo()
{
if (isset($_POST['submit'])) {
$name = $_FILES['file']['name'];
$temp = $_FILES['file']['tmp_name'];
$target = Message::imagePath();
move_uploaded_file($temp, $target . $name);
$url = "... | true |
f544a619208e91673f5d4665ffd678ffcf7674ca | PHP | Pkarle/EasyRoom | /src/Controller/PropertyController.php | UTF-8 | 3,638 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Property;
use App\Form\CreatePropertyFormType;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use phpDocumentor... | true |
b976911819540445f4baf8d881e9bb4c9e44ddc5 | PHP | jhand0867/social_net | /like.php | UTF-8 | 2,561 | 2.65625 | 3 | [] | no_license | <html>
<head>
<title>Like</title>
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<style type="text/css">
* {
font-family: arial, sans-serif;
font-size:14;
}
</style>
</head>
<body>
<style type="text/css">
body {
background-color: #fff;
}
form {
top: 4px;
position: absol... | true |
93e0fab81242eabcce2c0d5e67d8f942c2db6e7b | PHP | JorgeOsorio97/DesarolloWebPracticas | /PracticasPHP/P15.php | UTF-8 | 997 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
function comparePass($pass, $pass2){
if($pass == $pass2){
echo "FELICIDADES, registro exitoso!";
... | true |
aabfba2fdbf59d71ed0983d63e6dc2dae40008f4 | PHP | PacktPublishing/PHP-Reactive-Programming | /Chapter09/AbstractRxThread.php | UTF-8 | 329 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
abstract class AbstractRxThread extends Thread
{
private $done = false;
protected $result;
public function getResult()
{
return $this->result;
}
public function isDone()
{
return $this->done;
}
protected function markDone()
{
$this->done = true;... | true |
2607650efc2285a624b5505dc0345c7716610cbe | PHP | fizzyOne/HELP_Organization | /common/feed.php | UTF-8 | 840 | 2.71875 | 3 | [] | no_license |
<?php include("config.php");?>
<?php
$query="SELECT * FROM feed WHERE status='1';";
if($result=mysqli_query($mysqli,$query)){
//get each rows
while ($row=mysqli_fetch_array($result)){
echo "<div class='feed'>";
echo "<h3>" . $row['title'] . "</h3>";
// echo "<p>By:" . $... | true |
8844e134cf1ee820dc908b8750421960a9ea154e | PHP | sohamlanke/phpmysqlworkshopiitb_Soham_Lanke | /Day2/q4_2_loops.php | UTF-8 | 83 | 2.921875 | 3 | [] | no_license | <?php
$x=array("one","two","three");
foreach($x as $i){
echo "$i <br>";
}
?> | true |
47bb42556e2e26300c88f3041bbfd3cd5f1ab3a3 | PHP | Jiale-Yue/Web-Server-Applications-Classwork | /session3/Exercise-part1-2.php | UTF-8 | 931 | 3.234375 | 3 | [] | no_license | <html>
<head>
<title>
connection test
</title>
</head>
<body>
<?php
$servername= "localhost";
$username = "root";
$password = "";
$dbname = "classicmodels";
$conn = new mysqli($servername,$username,$password,$dbname)... | true |
b397ee6929bd1b71b536b101b5514eb38b3f383c | PHP | ruchiraxj/otr_challenge | /index.php | UTF-8 | 1,168 | 2.515625 | 3 | [] | no_license | <?php
error_reporting(0);
ini_set('display_errors', 0);
session_start();
require_once('configs/configs.php');
// Check if path is available or not empty
if (isset($_SERVER['PATH_INFO'])) {
$path = $_SERVER['PATH_INFO'];
// Do a path split
$path_split = explode('/', trim($path));
} else {
// Set Path to '/'
$pa... | true |
8c59b237edb2e17aa32626a71083d89ac9b11329 | PHP | victorkagimu/HDM | /webERP/PeriodsInquiry.php | UTF-8 | 1,105 | 2.65625 | 3 | [] | no_license | <?php
/* $Revision: 1.2 $ */
$PageSecurity = 2;
include ('includes/session.inc');
$title = _('Periods Inquiry');
include('includes/header.inc');
$SQL = "SELECT periodno ,
lastdate_in_period
FROM periods
ORDER BY periodno";
$ErrMsg = _('No periods were returned by the SQL because');
$PeriodsResult = DB_query... | true |
710a41241d10a5771423835e03e1e414692542d2 | PHP | emancypage/oxid-rest-api | /app/Models/Base.php | UTF-8 | 1,385 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Base
*
* The common OXID base model to set primary key,
* timestamp fields, guarded field etc.
*
* @package App\Models
*/
class Base extends Model
{
/**
* Table primary key
*
* @var string
*/
protected... | true |
1c2dc67a69556d9a4d4ca167faec5bb14ab58ea5 | PHP | alexpts/php-rate-limiter | /src/RateLimitMiddleware.php | UTF-8 | 1,754 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace PTS\RateLimiter;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
class RateLimitMiddleware implements MiddlewareInterface
{
protected Limiter $limite... | true |
32134bb042305ec295a06428446c49901a9390ea | PHP | guasyed/GeoLocation | /src/Entities/Measures/AbstractMeasure.php | UTF-8 | 3,107 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php namespace Arcanedev\GeoLocation\Entities\Measures;
use Arcanedev\GeoLocation\Traits\CanBeJsonable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use JsonSerializable;
/**
* Class AbstractMeasure
*
* @package Arcanedev\GeoLocation\Entities\Measures
* @author AR... | true |
a2bb1af39c6b9bb1792ee4a352b844d86dac66a9 | PHP | nsingh0410/BaseUserImporter | /src/Controller/BulkUserImporterController.php | UTF-8 | 2,873 | 2.875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
use App\Files\export\PresentationLayer;
use App\Files\imports\BulkUserCSV;
/**
* Class BulkUserImporterController
* @package App\Controller
*/
class BulkUserImporterController extends AppController
{
/**
* Index method
*
* @return... | true |
c9dd86d0db587ce89880dc24a3832492dd78d0ce | PHP | geetanshu-m/Security-System | /manage_user.php | UTF-8 | 6,775 | 2.640625 | 3 | [] | no_license | <?php
include 'database/db.php';
session_start();
if (isset($_SESSION['user'])){
}
else{
header("location:auth.php");
}
$alert = array();
if(isset($_POST["submit_1"]))
{
logEvent('Form Submitting.');
$user = $_POST["user"];
$pass = $_POST["password"];
if(1)
... | true |
d1931ead289167cc10894d847ad27edbb1c0651b | PHP | sumitk/ZeusbaseTi | /Titanium Market/Wordpress Mobile App/ddapns/ddapns/dodyrw-ddapns-9b91e89/push.php | UTF-8 | 2,077 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
include "config.php";
if ($_GET['key']!=$config['apns_access_key']) {
exit;
}
date_default_timezone_set('Europe/Rome');
// Report all PHP errors
error_reporting(-1);
require_once 'ApnsPHP/Autoload.php';
if ($config['sandbox_mode']) {
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
$co... | true |
ee3f31c4266dadf50191bea4b2e86b9381722497 | PHP | beltramem/projetWeb | /model/FriendrequestModel.php | UTF-8 | 449 | 2.859375 | 3 | [] | no_license | <?php
class FriendrequestModel extends Model
{
private $playerOne;
private $playerTwo;
function add($playerOne,$playerTwo)
{
$query = "call add_friend_request('".$playerOne."','".$playerTwo."')";
$st = db()->prepare($query);
$st->execute();
}
function drop($playerOne,$playerTwo)
{
$query ="call drop... | true |
d6fdc634cf6ca4040e8845985af8d98db6a9872e | PHP | Q-Con/qcacher-autofill | /src/Commands/Steam/QueueApp.php | UTF-8 | 2,502 | 3.015625 | 3 | [] | no_license | <?php
namespace Zeropingheroes\LancacheAutofill\Commands\Steam;
use Illuminate\Console\Command;
use Zeropingheroes\LancacheAutofill\Models\{
SteamApp, SteamQueueItem
};
class QueueApp extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $... | true |
e1bcd61902fbfedf886ea8bd6c42d59ca9915318 | PHP | josephjlee/MySimpleORM | /src/MySimpleORM/Mapper/ObjectMappingInterface.php | UTF-8 | 389 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace MySimpleORM\Mapper;
/**
* Interface defining all the methods the ObjectMapping class
* will be using
*/
interface ObjectMappingInterface
{
public function findById($id);
public function getCurrentObject();
public function getObjectArray($wheres);
public function insertObject();
p... | true |
3736fc97c1dc3e4ac778625efb8feee89585cc17 | PHP | EdenPP/Cache | /index.php | UTF-8 | 1,790 | 2.75 | 3 | [] | no_license | <?php
/**
* Description :
*
* @author Eden
* @datetime 2015/12/18 16:24
* @copyright Beijing CmsTop Technology Co.,Ltd.
*/
class Session
{
private $conf;
public function __construct ()
{
$conf = include_once "config/sess-config.php";
if (empty($conf['session'])) {
... | true |
7cfa5c9602db62f936622dc9a6c93809e0d0266c | PHP | bettershop/LaikeTui | /php/app/keengine/model/Model.class.php | UTF-8 | 2,340 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// +---------------------------------------------------------------------------+
// | This file is part of the core package. |
// | Copyright (c) laiketui.com |
// | ... | true |
867f50f16d406f6e26da9d91096c244ecda00b48 | PHP | Redrum199/dailymotion | /objects/Relations.php | UTF-8 | 648 | 2.65625 | 3 | [] | no_license | <?php
class Relations
{
private $conn;
public function __construct($db)
{
$this->conn = $db;
}
function showVideosOnPlaylist()
{
$query = " SELECT p.name as playlist_name, p.created as playlist_created, v.id as video_id, v.name as video_name, v.thumbnail, v.description, v.po... | true |
52a45657d3330cd7231eab10935aefe2af75e14a | PHP | janssens/classements_fftri_raids | /src/EventListener/JoinAthleteListener.php | UTF-8 | 849 | 2.703125 | 3 | [] | no_license | <?php
namespace App\EventListener;
use App\Entity\Athlete;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Event\LifecycleEventArgs;
class JoinAthleteListener{
/**
* @var EntityManagerInterface
*/
private $em;
public function __construct(EntityManagerInterface ... | true |
aeb9b7bc2187d3237544180c0f4c49b454833dec | PHP | istresearch/poprox | /poprox/app/BrokenLeg.php | UTF-8 | 10,668 | 2.734375 | 3 | [] | no_license | <?php
namespace BitsTheater ;
use BitsTheater\costumes\IDirected;
use com\blackmoonit\exceptions\IDebuggableException;
use BitsTheater\costumes\APIResponse;
use com\blackmoonit\exceptions\DbException;
{
/**
* Provides a standardized way to design a custom exception that can use the
* BitsTheater text resources (whic... | true |
973d71e0c3b9e1bdc84018c6597090538bb06f68 | PHP | eminemutlu/exercise-program_with_RESTfulApi_dev | /pages/plan_form.php | UTF-8 | 12,646 | 2.53125 | 3 | [] | no_license |
<?php
echo '<div><h2 class="well">'.$page_title.'</h2></div>';
$plan_id="";
//USER DATA
$json_string = $url.'/api/all_users_list.php';
$jsondata = file_get_contents($json_string);
$arr = (array) json_decode($jsondata,true);
$total = 0;
foreach ($arr["records"] as $value) {
$total = $total... | true |
dc2c62c4d78721e4a0137458a8a86fea6a1c4948 | PHP | davidharrison92/sociallydistantpubquiz | /leaderboard.php | UTF-8 | 5,722 | 2.640625 | 3 | [
"MIT",
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
include("db/db_config.php");
include("db/get_game_state.php");
if (isset($_POST["teamsecret"]) and isset($_POST["teamID"])){
$teamID = mysqli_real_escape_string($conn, $_POST["teamID"]); // watch out! - $teamID is the form value. $team_i... | true |
f3b35768606ca6b037c703895d8d15d8b3cc2f65 | PHP | joesweeny/back-to-win-api | /src/app/Domain/GameEntry/Services/EntryFee/Redis/RedisEntryFeeStore.php | UTF-8 | 2,383 | 2.8125 | 3 | [] | no_license | <?php
namespace BackToWin\Domain\GameEntry\Services\EntryFee\Redis;
use BackToWin\Domain\GameEntry\Entity\GameEntry;
use BackToWin\Domain\GameEntry\Exception\EntryFeeStoreException;
use BackToWin\Domain\GameEntry\Services\EntryFee\EntryFeeStore;
use BackToWin\Framework\Uuid\Uuid;
use Money\Currency;
use Money\Money;
... | true |
e9ff8a2cd4daadb787598b63a458bc8582d9e4a9 | PHP | gabrieliovu/TW | /bootstrap.php | UTF-8 | 1,761 | 2.828125 | 3 | [] | no_license | <?php
// get the request uri (ex. /catalog/shoes?filter-brand=adidas)
$route = $_SERVER['REQUEST_URI'];
if (strchr($_SERVER['REQUEST_URI'], '?')) {
// /catalog/shoes?filter-brand=adidas => $route = /catalog/shoes
$route = strstr($route, '?', true);
}
if ($route === '/') {
// go to default action (was set in index.... | true |
27984762b20774f85c81829c85063f64579ebc00 | PHP | muracecilia/clase2pp2 | /app/ejercicio7.php | UTF-8 | 538 | 3.640625 | 4 | [] | no_license |
<?php
$n1 = rand(1,100);
$n2 = rand(1,100);
$n3 = rand(1,100);
echo " Los numeros son: " .$n1 . " - ".$n2 . " - ".$n3 . " <br> <br> ";
if ($n1!=$n2 && $n1!=$n3 && $n2!=$n3)
{
if(($n1 > $n2 && $n1 < $n3) || ($n1 < $n2 && $n1 > $n3))
{
$nMedio=$n1;
}
else
{
if (($n2 > $n1 && $n2 < $n3) ... | true |
d3aa31f1364185a6c5d3b3555713010c7539af9f | PHP | IhorNotevskyi/back-end | /php_basics_tasks/23.php | UTF-8 | 416 | 3.109375 | 3 | [] | no_license | <?php
echo "Напишите 3 строки, используя три разные функции для вывода текста<br>";
print "Напишите 3 строки, используя три разные функции для вывода текста<br>";
printf("Напишите 3 строки, используя три разные функции для вывода текста", "printf");
| true |
7b9c49e9cc6bed34228309fb331b0c204ced0b37 | PHP | Ruk33/AresLands | /application/models/Vip/Vip.php | UTF-8 | 1,559 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php namespace Models\Vip;
use Character;
use Laravel\URL;
class Vip extends \Base_Model implements VipRepository
{
public function getDescription()
{
return $this->description;
}
public function getIcon()
{
return URL::base() . $this->icon;
}
public function getName()
... | true |
9b2a5afff22d206c128509348040dfeb74d5c3f2 | PHP | stanislav-777/Task3--1---7 | /dist/templates/blocks/block-price.php | UTF-8 | 2,716 | 2.578125 | 3 | [] | no_license | <!-- $itemsRent = array(
1 => array(
'title' => 'Блок контейнер 2,5 х 6 м',
'price' => '452 Р/мес'
),
2 => array(
'title' => 'Блок контейнер 2 х 3 м',
'price' => '52345 Р/мес'
... | true |
f011a8d633e2720c0fe0f175d3624da6af609138 | PHP | haringsrob/twill-generator | /src/TwillGenerator.php | UTF-8 | 294 | 2.671875 | 3 | [] | no_license | <?php
namespace Haringsrob\TwillGenerator;
class TwillGenerator
{
public function tidyHtml(string $html): string
{
// This is not ideal atm as it does no indentation whatsoever, might require blade formatter to fix this at
// some point.
return $html;
}
}
| true |
61bc637f704d6f3ace986f77296c55047148c5e2 | PHP | Jakerevans/Gamedev | /includes/classes/translations/class-gamedev-translations.php | UTF-8 | 883 | 2.90625 | 3 | [] | no_license | <?php
/**
* Class GameDev__Translations - class-gamedev-translations.php
*
* @author Jake Evans
* @category Translations
* @package Includes/Classes/Translations
* @version 0.0.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'GameDev__Translations', false ) ) :
/**
* GameDev__Translat... | true |
87e7080b0152ed624bafdc627f852d46fec3d5c7 | PHP | mnpenner/ptilz | /src/BigMath.php | UTF-8 | 4,406 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ptilz;
abstract class BigMath {
/**
* Add two arbitrary precision numbers
*
* @param int|string $left The left operand, as a string.
* @param int|string $right The right operand, as a string.
* @return int|string
*/
public static function add($left, $right) {
... | true |
adbf45cadb33c9ad12f35bc057389d2221e8cbcb | PHP | ErgestImaj/wineac | /classes/Logger.php | UTF-8 | 853 | 2.953125 | 3 | [] | no_license | <?php
if ( ! defined( 'ABSPATH' ) ) exit;
class Logger
{
const DIRECTORY_LOGS ='logs';
const LOGS_FILE = 'wineac_logs.log';
const DIRECTORY_SEPARATOR = '/';
/**
* log data to file
* @param $data
*/
public static function writeLog($data){
$directory_path = WINEAC_DIR_PATH.... | true |
0dc562873f3103c2b219cde9710428419a39cce7 | PHP | uk-gov-mirror/ministryofjustice.opg-digideps | /client/src/Event/NdrSubmittedEvent.php | UTF-8 | 1,706 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace App\Event;
use App\Entity\Ndr\Ndr;
use App\Entity\Report\Report;
use App\Entity\User;
use Symfony\Contracts\EventDispatcher\Event;
class NdrSubmittedEvent extends Event
{
public const NAME = 'ndr.submitted';
/** @var User */
private $submittedBy;
/** @var N... | true |
ebcb675534e0434a7e7333f580def71956e983ff | PHP | oldDriver/Imdb-sf2 | /src/AppBundle/Util/Imdb/ImdbPersonPage.php | UTF-8 | 6,502 | 2.6875 | 3 | [] | no_license | <?php
namespace AppBundle\Util\Imdb;
use AppBundle\Util\Imdb\ImdbPersonPageInterface;
use AppBundle\Util\Imdb\ImdbAbstractPage;
class ImdbPersonPage extends ImdbAbstractPage implements ImdbPersonPageInterface
{
/**
*
* @var array
*/
private $jobs = array();
/**
*
* @var \DateTime
... | true |
045322343cf838d4e756787d02703be36d846b5d | PHP | WPPlugins/wp-file-permission-check | /classes/FpcDirFilter.class.php | UTF-8 | 400 | 2.765625 | 3 | [] | no_license | <?php
/**
*
* @package File Permissions & Size Check
* @author Wycks
* @link
*
* Exclude directories
*/
class FpcDirFilter extends RecursiveFilterIterator
{
public function accept()
{
$excludes = array("cache", "objectcache", "pgcache", "dbcache");
return... | true |
4f3b1499c7260af4f285ce5a304a66b4abdc9651 | PHP | alanpoulain/core | /src/Metadata/Resource/Factory/ExtractorResourceMetadataFactory.php | UTF-8 | 2,932 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\Core\Metadata\Resource\Factory;
... | true |
9956c26e2af22596a5b98495f70ddf8f4babd2d5 | PHP | dsoprea/WebsocketServer | /server.php | UTF-8 | 25,826 | 2.671875 | 3 | [] | no_license | #!/php -q
<?php /* >php -q server.php */
error_reporting(E_ALL);
set_time_limit(0);
ob_implicit_flush();
class CloseConnectionException extends Exception
{ }
function Dump($data, $base = 16)
{
if($base != 2 && $base != 16)
{
trigger_error("Can not dump for a base of ($base). We only support (2) a... | true |
9dd0a9b848c40e5cde563fb1432c826051fb6411 | PHP | ThomasPnt/OperationCaritative | /index.php | UTF-8 | 803 | 2.890625 | 3 | [] | no_license | <?php
echo('Bonjour');
try
{
// On se connecte à MySQL
$pdo = new PDO('pgsql:host=ec2-46-137-174-67.eu-west-1.compute.amazonaws.com;dbname=de8uvfserneqgu;', 'qdvsqfgjvjobfx', 'b4d817b0fd17040988aeff318385ef1d44ed81d8b19fa0e38e2d49506ed792b1');
}
catch(Exception $e)
{
// En cas d'erreur, on affiche un me... | true |
0c0702ae7ac4e70a36cfb99f2649392585e4813d | PHP | usucode/ivory | /themes/4536/functions/class/class-walker-category-checklist-widget.php | UTF-8 | 1,858 | 2.5625 | 3 | [] | no_license | <?php
/**
* Extend Walker Class
*
* PHP Version >= 5.6
*
* @package WordPress
* @category Theme
* @subpackage 4536
* @author Chef
* @license https://www.gnu.org/licenses/gpl-3.0.html/ GPL v2 or later
* @link https://4536.jp/
* @since 1.0.0
*/
// https://wordpress.stackexchange.com/qu... | true |
317f7121735e44e6f5667fc3c039463bd3631e6a | PHP | expiaz/php-mvc | /core/http/Url.php | UTF-8 | 1,293 | 3.015625 | 3 | [] | no_license | <?php
namespace Core\Http;
final class Url{
private $controller;
private $action;
private $payload;
private $url;
private $destination;
public function __construct(string $destination = '', array $payload = [])
{
/*$this->controller = $controller;
$this->action = $action;*... | true |
67a483b75fc99fdb4ecf2325727d6d3f0c406853 | PHP | Amirhv/laravel-practice | /app/Post.php | UTF-8 | 475 | 2.625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
protected $fillable = ['title', 'description', 'user_id'];
public function user()
{
return $this->belongsTo(User::class);
}
// accessor
public function getTitleAttribute($value)
{
retu... | true |
7798f582fcf36a2ef65ad3815665276258879f58 | PHP | baubyte/aplicacionesWebTPFinal | /app/libraries/Core.php | UTF-8 | 2,737 | 3.234375 | 3 | [] | no_license | <?php
defined('BASEPATH') or exit('No se permite acceso directo');
/*
* Clase principal de la aplicación
* Crear URL y cargar controlador central
* FORMATO URL - /controller/method/params
* Ejemplo /article/update/1
**/
class Core
{
/**Trait Singleton*/
use Singleton;
/**Propiedad para el Controlador Actual... | true |