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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
854c676deee3e2c1025e4f0978894e98006854df | PHP | Mixteer/reshi | /tests/Constraints/EqualsFileTest.php | UTF-8 | 1,392 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Reshi libray - an assertion library.
*
* @author Armando Sudi <armando.sudi@mixteer.com>
* @copyright 2015 Mixteer
* @link http://os.mixteer.com/baseutils/reshi
* @license http://os.mixteer.com/baseutils/reshi/license
* @version 0.1.0
*
* MIT LICENSE
*/
use \Reshi\Constraint... | true |
f7e3e6699fab10b5f2dd6bf2a6b4769b194d2091 | PHP | Htou/Object-Oriented-PHP-Study | /class_inheritance.php | UTF-8 | 304 | 3.203125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hichem
* Date: 23-1-19
* Time: 15:35
*/
class Cars
{
var $wheels = 4;
function gritting()
{
return "hello";
}
}
$bmw = new Cars();
class Trucks extends Cars {
var $wheels = 10;
}
$tacoma = new Trucks();
echo $tacoma->wheels; | true |
64d55e1de379ceae1da96a2d695464b079b700e0 | PHP | albertoortegafernandez/ejerciciciosphp | /ejercicios/13.php | UTF-8 | 574 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ejercicio13</title>
</head>
<body>
<?php
if((isset($_POST) && !empty($_POST))){
echo "Hola ".$_POST['nombre'];
}
else{ ?>
<h3>Por favor rellene su nombre </h3>
<form met... | true |
61d880a872c02459607b3f942048d694637b0931 | PHP | rashmi8105/Synapse | /src/Synapse/RiskBundle/EntityDto/RiskModelAssignmentsDto.php | UTF-8 | 3,141 | 2.578125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Synapse\RiskBundle\EntityDto;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Data Transfer Object for Risk Variables
*
* @package Synapse\RiskBundle\EntityDto
*/
class RiskModelAssignmentsDto
{
/**
* campus_id
*
* @var string ... | true |
9a5eb6b6dce9095d0291ab3e48270f8c84d82f54 | PHP | RamilYumaev/aa_dev | /modules/entrant/helpers/ContractHelper.php | UTF-8 | 2,720 | 2.75 | 3 | [] | permissive | <?php
namespace modules\entrant\helpers;
use modules\entrant\models\LegalEntity;
use modules\entrant\models\PersonalEntity;
use yii\helpers\ArrayHelper;
class ContractHelper
{
const STATUS_NEW = 0;
const STATUS_WALT = 1;
const STATUS_ACCEPTED = 2;
const STATUS_NO_ACCEPTED = 3;
const STATUS_VIEW ... | true |
8ce61c57f597016bc3bf5f818ea4a8a843f43897 | PHP | andreufsm/crudProfessor | /crudProfessor.php | UTF-8 | 1,161 | 2.5625 | 3 | [] | no_license | <?php
include 'conexaoDB.php';
function cadastrarProfessor($nome, $cpf, $celular, $cep){
connect();
query("INSERT INTO professor (nome, cpf, celular, cep) VALUES ('$nome', '$cpf', '$celular', '$cep')");
close();
}
function mostrarProfessores(){
connect();
$resultado = query("SELECT * from... | true |
64e5ca05a9d3e5adc461faf9b4e458a93e5f2ab8 | PHP | W3G33K/knapsack | /app/Filters/TransformUserDataFilter.php | UTF-8 | 613 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Filters;
use App\Entities\User;
use CodeIgniter\Filters\FilterInterface;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
class TransformUserDataFilter implements FilterInterface {
/**
* @inheritDoc
*/
public function before(RequestInterface $request): void {
... | true |
aab44d65600f82b8c55df44efad91172b7414ffd | PHP | ratepay/magento2-module | /Api/Data/OfflineCalculatorResponseInterface.php | UTF-8 | 819 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) Ratepay GmbH
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RatePAY\Payment\Api\Data;
/**
* Response interface for offline calculator reponse
*/
interface OfflineCalculatorResponseInterface
{... | true |
49ec1a39251e686bc9bca3ed88d3bab1641b14d5 | PHP | Zicrou/- | /application/models/sys/M_sys_role.php | UTF-8 | 4,619 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class M_sys_role extends MY_Model
{
public $id_actions;
public $id_type_profil;
public $id_sous_menu;
public $d_read;
public $d_add;
public $d_upd;
public $d_del;
public function get_db_table_pk(){
return 'id_actions';
}
public function delete_all($id_sous_menu)
{
$this->db->where($this->get_db_... | true |
a1ab5f98785313d1e7004dfc7d2e380f75d5fab4 | PHP | matthieusieben/Sedra | /src/Sedra/View/TemplateEngine/PHPTemplate.php | UTF-8 | 336 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Sedra\View\TemplateEngine;
use Sedra\View;
function render_php_template($__file, $__data)
{
extract($__data);
ob_start();
require $__file;
return ob_get_clean();
}
/**
*
*/
class PHPTemplate extends View
{
protected function _render(array $__data) {
return render_php_template($this->template... | true |
6bedcf5492b675e40be3b459df0dd5f990d9b424 | PHP | agporras/Online-Library | /admin/book-response.php | UTF-8 | 3,583 | 2.71875 | 3 | [] | no_license |
<?php
//include connection file
include_once("connection1.php");
$db = new dbObj();
$connString = $db->getConnstring();
$params = $_REQUEST;
$action = isset($params['action']) != '' ? $params['action'] : '';
$empCls = new books($connString);
switch($action) {
case 'add':
$empCls->insertBooks($param... | true |
aa1e216b3da421ec041b23c75b950420daa63922 | PHP | FabriJuncal/sitio-evento | /pagar.php | UTF-8 | 8,139 | 2.796875 | 3 | [] | no_license | <?php
if(!isset($_POST['submit'])){
exit("Hubo un error");
}
// Utilizamos el Metodo "Name Space" para importar las clases
use PayPal\Api\Payer;
use PayPal\Api\Item;
use PayPal\Api\ItemList;
use PayPal\Api\Details;
use PayPal\Api\Amount;
use PayPal\Api\Transaction;
use PayPal\Api\RedirectUrls;
use PayPal\Api\Paym... | true |
a4429396fcaed7c6389a071b045bd476e56705c6 | PHP | cj3wilso/mybest | /phpsqlsearch_genxml.php | UTF-8 | 3,827 | 2.53125 | 3 | [] | no_license | <?php
require("global.php");
include("form_results.php");
require("mysqlconnect.php");
if(!isset($sql_price)){$sql_price="";}
// If Street OR City/Region search
if ( $search_type == "street" || $search_type == "city" ) {
$sql = "SELECT *,
IF(COUNT( DISTINCT rent ) > 1,CONCAT('$', MIN(rent), ' - $', MAX(rent))... | true |
5e6be4552b49e0faf629e13b2f2bb107df51a1b6 | PHP | mrdatawolf/Filaments | /app/Http/Controllers/BrandController.php | UTF-8 | 2,959 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Brand;
class BrandController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the f... | true |
7a17a1b8ead9298a4e4395e48e597c462b243578 | PHP | gfuret/movies | /inc/functions.php | UTF-8 | 1,866 | 3.046875 | 3 | [] | no_license | <?php
include_once('dbConnect.inc.php');
/*
* write_log($message[, $logfile])
*
* Parameters:
* $message: Message to be logged
* $logfile: Path of log file to write to. Optional. Default is log/session.log.
*
*/
function write_log($message, $logfile='log/session.log') {
// Get time of request
if( ($... | true |
b4b5eab17db0967ab2efb852b3ebaf518c18ee2d | PHP | md5Stepan/yiiadminMetro | /protected/modules/admin/controllers/DefaultController.php | UTF-8 | 3,213 | 2.59375 | 3 | [] | no_license | <?php
class DefaultController extends Controller
{
public $layout = '//layouts/column2';
/**
* @return array action filters
*/
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
//'postOnly + delete', // we only allow deletion... | true |
b6ab025a2912d96f8e2b5669d00ff606f7927691 | PHP | hi-fidelity-forum/new | /app/member/classes/controller/member.php | UTF-8 | 1,839 | 2.734375 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct access allowed.');
// Описание класса
class Controller_Member extends Controller {
// Регистрация пользователей
public function action_register()
{
// Если есть данные, присланные методом POST
// Загрузка формы логина
$this->content = View... | true |
419298a63578e40b1323b6ea91196da10d5e8c59 | PHP | koriym/Koriym.DataFile | /tests/DataFileTest.php | UTF-8 | 436 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Koriym\DataFile;
use PHPUnit\Framework\TestCase;
class DataFileTest extends TestCase
{
/** @var DataFile */
protected $dataFile;
protected function setUp(): void
{
$this->dataFile = new DataFile();
}
public function testIsInstanceOfDataFile(... | true |
385cd16311bef773b6f9db4273c05f275e5c5347 | PHP | wangyufeng666/firstKK | /library/base/SecUtility.php | UTF-8 | 3,835 | 3.296875 | 3 | [] | no_license | <?php
class SecUtility {
/** <summary>
* 检测输入参数
* </summary>
* <param name="param">参数值</param>
* <param name="checkForNull">检测NULL</param>
* <param name="checkIfEmpty">检测空值</param>
* <param name="checkForCommas">检测逗号</param>
* <param name="maxSize">参数长度</param>
* <retu... | true |
fa3a2af98af21314b01a1f8f728bbd9a941bc05f | PHP | joao-coimbra/phone-book | /src/database/signup.php | UTF-8 | 1,182 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
include_once 'connection.php';
header("Content-type: text/html; charset=utf-8");
mysqli_set_charset($connect,"utf8");
if(empty($_POST['user']) || empty($_POST['email']) || empty($_POST['password']) || empty($_POST['phone'])) {
$_SESSION['empty-signup'] = true;
header('Location: ../../reg... | true |
21c8bdc06e0541095f90402445cb69e148ff18ae | PHP | honey8823/cmk | /src/app/controller/contact.php | UTF-8 | 525 | 2.6875 | 3 | [] | no_license | <?php
class ContactController extends Common
{
public function add($param_list = array())
{
try
{
// 引数
$content = trim($param_list['content']);
if ($content == "")
{
return array();
}
// 登録
$sql = "INSERT INTO `contact` (`content`) ";
$sql .= "VALUES (? ) ";
... | true |
8280e8a6da22e116a9415302baa3792fdd60edc2 | PHP | ubiclub/tinywebdb-php-WeatherStation | /draw.php | UTF-8 | 3,723 | 2.609375 | 3 | [] | no_license | <?php
include ("./jpgraph4/src/jpgraph.php");
include ("./jpgraph4/src/jpgraph_line.php");
$tempers = file($_GET['logfile']);
$tag = $_GET['tag'];
$p_time = 0;
$datax = array(); // "2001-04-01","2001-04-02","2001-04-03",...
$datay = array();
$data2y = array();
$datap = array();
$datab = array();
/***************
ech... | true |
0810035f41654ad1f32e46d3c57720989321502e | PHP | cybermateus/very-simple-login-register | /login.php | UTF-8 | 819 | 2.5625 | 3 | [] | no_license |
<?php
session_start();
include 'class.php';
?>
<p> login </p>
<form method="post" action="login.php">
username: <br>
<input type="text" name="username"><br>
password: <br>
<input type="text" name="password"><br>
<button type="submit" name="login"> login </button>
</form>
<p> or <a href="register.ph... | true |
8396fcf8c91faf2cc03b16efd5c01634fe8d7e0d | PHP | seanmorris/ids | /source/Api/Input/Yaml.php | UTF-8 | 449 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SeanMorris\Ids\Api\Input;
class Yaml extends \SeanMorris\Ids\Api\InputPump
{
public function pump()
{
$source = '';
while($line = fgets($this->handle))
{
if($line === "...\n" || ($source && $line === "---\n" ))
{
yield yaml_parse($source);
$source = '';
}
else
{
$sour... | true |
cdcbbde2cd074f553ddfbaddae92f0b90c0aa509 | PHP | Deaton879/phpmotors | /model/reviews-model.php | UTF-8 | 3,942 | 3.34375 | 3 | [] | no_license | <?php
// reviews model
// This function will insert a review
function addNewReview($reviewText, $invId, $clientId) {
// Create a connection object using the phpmotors connection function
$db = phpmotorsConnect();
// The SQL statement
$sql = 'INSERT INTO reviews (revie... | true |
ff7b45ba1d205a12ddf7b1f8e4735cb17ff22ce0 | PHP | sansanich83/843141-doingsdone-9 | /templates/mail-notify.php | UTF-8 | 452 | 2.53125 | 3 | [] | no_license | <div>
<h3>Уведомление о сегодняшних задачах</h3>
<p>Уважаемый <?=$user_name;?>. У вас запланированы задачи</p>
<?php foreach ($tasks as $key => $val): ?>
<p><?=$key +1 . '. ';?> <?php if (isset($val['task_name'])): echo esc($val['task_name']); endif; ?> на <?php if (isset($val['deadline'])): echo es... | true |
fc6d1b93674a7b5940af70d2e598562d277aa2be | PHP | kristof-siket/SportsDirectorSystem | /app/Services/Repository/Result/IResultRepository.php | UTF-8 | 2,216 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 2018.05.06.
* Time: 18:46
*/
namespace App\Services\Repository\Result {
use App\ModelInterfaces\ICompetition;
use App\ModelInterfaces\IResult;
/**
* Interface IResultRepository
* @package App\Services\Repository
*
* Common int... | true |
7e84abf628c9449d9f3bef52ddee1c5df11ccd7c | PHP | cw-nm/FileMaker | /src/Command/Duplicate.php | UTF-8 | 1,914 | 2.796875 | 3 | [] | no_license | <?php
namespace airmoi\FileMaker\Command;
use airmoi\FileMaker\FileMaker;
use airmoi\FileMaker\FileMakerException;
use airmoi\FileMaker\Object\Result;
/**
* FileMaker API for PHP
*
* @package FileMaker
*
* Copyright © 2005-2009, FileMaker, Inc. All rights reserved.
* NOTE: Use of this source code is subject to ... | true |
bb3870d3d7c689024ceeaa895a65c2d366e7dea6 | PHP | Lindomarc/mvc-cms | /App/Classes/Login.php | UTF-8 | 629 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Classes;
use \App\Models\Model;
class Login
{
/**
* @param $email
* @param $password
* @param Model $model
* @return bool
*/
public function login($email, $password, Model $model)
{
$data = $model->find('email', $email)->first();
if(!$data){
... | true |
6c75edb3fded60ee5935e3a23786cdc94f0cd910 | PHP | Aujra/mage2 | /app/code/Kind/Ingreidents/Model/Ingredient/Products.php | UTF-8 | 776 | 2.625 | 3 | [] | no_license | <?php
namespace Kind\Ingreidents\Model\Ingredient;
class Products implements \Magento\Framework\Option\ArrayInterface
{
protected $collectionFactory;
/**
* Products constructor.
*/
public function __construct(\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $collectionFactory
)... | true |
11449969d9b7338dd0e1d78b3e0628eb3706d60e | PHP | guidomrauber/mutante | /mutante.php | UTF-8 | 6,772 | 2.8125 | 3 | [] | no_license | <?php
$dna = $_POST['dna'];
$dna2 = $_POST['dna2'];
$dna3 = $_POST['dna3'];
$dna4 = $_POST['dna4'];
$dna5 = $_POST['dna5'];
$dna6 = $_POST['dna6'];
$cuenta = 0;
$inverso = 0;
?>
<?php
require 'header.php';
?>
<?php
$dna1 = $dna.$dna2.$dna3.$dna4.$dna5.$dna6;
$ajj1 = str_split($dna);
$ajj2 = str_s... | true |
bdd0f75e33e442d075aa9d65e992050bf1b60653 | PHP | OmarTarekAbbas/rbt_system_php7 | /app/Http/Requests/SettingUpdateRequest.php | UTF-8 | 1,902 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Constants\SettingTypes;
use App\Http\Repository\SettingRepository;
use App\Http\Requests\Request;
class SettingUpdateRequest extends Request
{
/**
* settingRepository
*
* @var SettingRepository
*/
private $settingRepository;
/**
* __con... | true |
4b23e96647f113887d0a94dd22b61271ee1699ad | PHP | cjwweb/CoolBox | /justfortest/Home/Controller/UserController.class.php | UTF-8 | 1,999 | 2.5625 | 3 | [] | no_license | <?php
namespace Home\Controller;
use Think\Controller;
class UserController extends Controller{
//用户登录,注册及处理
public function register(){
//判断是否提交表单
if(isset($_POST['user_name'])){
//实例化数据库对象,查询此用户在f_user表单中的信息
$mysql = new \Home\Model\userModel();
//调用封装的函数,获取用户信息
$result = $mysql->findUserByName($... | true |
ba4168902db2def8762ae447a942e5e49767c010 | PHP | celineaudin/PHP-Partie1 | /index.php | UTF-8 | 5,030 | 3.453125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<h1>Exercice 1</h1>
<p>Créez une variable et lui affecter une chaîne de caractères. Afficher cette variable.</p>
<?php
$prenom = 'Celine';
$age = 41;
echo $prenom; // Affiche 'Celine
echo '<br/>';
echo $age; // Affiche 41
echo '<br/>';
$pr... | true |
296d4bb58517915795afee63d769b82c3aba02dd | PHP | AmphiBee/wpgb-extended | /src/Providers/Filemanager.php | UTF-8 | 6,959 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace AmphiBee\WpgbExtended\Providers;
/**
* Filemanager
*
* Information about files
*
* @link https://github.com/AmphiBee/wpgb-extended/
* @author amphibee
* @link https://amphibee.fr
* @version 1.0
* @license https://opensource.org/licenses/mit-license.html MIT License
*/
class Filemanage... | true |
6a338f53a95705b2a56ec0d6bab2365cfbf8c3ae | PHP | emanoelmiranda/php-ddd-cargo-sample | /module/CargoBackend/tests/CargoBackendTest/Model/Cargo/TrackingIdTest.php | UTF-8 | 1,555 | 2.765625 | 3 | [] | no_license | <?php
/*
* This file is part of the codeliner/php-ddd-cargo-sample package.
* (c) Alexander Miertsch <kontakt@codeliner.ws>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CargoBackendTest\Domain\Model\Cargo;
use CargoBac... | true |
bcfcb8b766fa9f2bdd24e73c7df70966007a8096 | PHP | FSL-CMS/fsl-cms | /www/app/models/SoutezeRocniku.php | UTF-8 | 1,811 | 2.65625 | 3 | [] | no_license | <?php
/**
* FSL CMS - Redakční systém pro hasičské ligy
*
* @copyright Copyright (c) 2010 Milan Pála, fslcms.milanpala.cz
*/
/**
* Model vazby kategorií a soutěží
*
* @author Milan Pála
*/
class SoutezeRocniku extends BaseModel
{
/** @var string */
protected $table = 'souteze_rocniku';
... | true |
30c7855e520a389d1d78cb373ff1c8b841958850 | PHP | shayanderson/eco | /app/vendor/Eco/helper/request.php | UTF-8 | 1,184 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Eco is a PHP Framework for PHP 5.5+
*
* @package Eco
* @copyright 2015-2021 Shay Anderson <https://www.shayanderson.com>
* @license MIT License <https://github.com/shayanderson/eco/blob/master/LICENSE>
* @link <https://github.com/shayanderson/eco>
*/
use Eco\System;
/**
* Request helper functions
... | true |
b7c6f32e3b2a4d0bcb28315294c0b08ffdd3d24d | PHP | uestla/orm-1 | /src/DI/OrmCacheExtension.php | UTF-8 | 3,813 | 2.625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Nettrine\ORM\DI;
use Doctrine\Common\Cache\FilesystemCache;
use Doctrine\ORM\Configuration;
use Nette\DI\CompilerExtension;
use Nette\DI\ServiceDefinition;
use Nette\InvalidStateException;
class OrmCacheExtension extends CompilerExtension
{
/** @var mixed[] */
private $d... | true |
5681ebdaf2730e6118b2b1b41824d3647fb2d781 | PHP | tuaki/fksdb | /app/Components/Forms/Controls/Autocomplete/PersonProvider.php | UTF-8 | 2,969 | 2.765625 | 3 | [] | no_license | <?php
namespace FKSDB\Components\Forms\Controls\Autocomplete;
use FKSDB\ORM\ModelContest;
use FKSDB\ORM\ModelPerson;
use Nette\Database\Table\Selection;
use ServicePerson;
use YearCalculator;
/**
* Due to author's laziness there's no class doc (or it's self explaining).
*
* @author Michal Koutný <michal@fykos.cz>... | true |
21ff0b5b6e1c7dac86043d306a4bc7e4d8f0ba3b | PHP | chkdsk11/project | /serve/models/shopmodel/BaiyangCpsChannelRebate.php | UTF-8 | 1,548 | 2.609375 | 3 | [] | no_license | <?php
namespace Shop\Models;
use Shop\Models\BaseModel;
class BaiyangCpsChannelRebate extends BaseModel
{
/**
*
* @var string
* @Primary
* @Column(type="string", length=32, nullable=false)
*/
public $id;
/**
*
* @var string
* @Column(type="string", length=32, null... | true |
b467f180180cd94f276a17a45f6c0cd3f563572e | PHP | waldifubu/design-patterns-php | /src/FactoryMethod/Index.php | UTF-8 | 513 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Waldi
* Date: 16.08.2019
* Time: 22:15
*/
declare(strict_types = 1);
namespace Patterns\FactoryMethod;
class Index
{
public function start() {
$loggerFactory = new StdoutLoggerFactory();
$logger = $loggerFactory->createLogger();
echo get_class... | true |
50f7c57aa14b6442f2820707d40589dca80a4a20 | PHP | dreamsweaver/SistermaAcademico | /funcionalidad/VerOrientador.php | UTF-8 | 1,159 | 3.03125 | 3 | [] | no_license | <?php
/*
Esta clase pertenece a la capa de funcionalidad
Esta clase devuelve información básica de un orientadir en especifico o una lista de orientadores
*/
require_once '../cgi-bin/Conexion.php';
class VerOrientador {
private $_grado;
private $_seccion;
private $_curso;
private $_orientador;
private $_con;
pu... | true |
11bbe238c82a5aae1b72bb6a6df6bfd0d87ed269 | PHP | BinaryStudioAcademy/bsa-2018-hedonist | /app/Repositories/Review/Criterias/ReviewPaginationCriteria.php | UTF-8 | 519 | 2.609375 | 3 | [] | no_license | <?php
namespace Hedonist\Repositories\Review\Criterias;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
class ReviewPaginationCriteria implements CriteriaInterface
{
const LIMIT = 10;
private $page;
public function __construct(int $page)
{
... | true |
0399e725b5a574e9266fb85a28ee718f2a61e1cd | PHP | identor/trenchdevs | /app/Models/Projects/Project.php | UTF-8 | 958 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Models\Projects;
use App\Models\Users\ProjectUser;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Project
* @property $user_id
* @property $title
* @property $url
* @property $repository_url
* @prope... | true |
7962dceaa3301a97f28c89486f80bd5ae9ffd749 | PHP | ChayBB/AirBnB_clone | /database/migrations/2020_12_01_100236_create_categories_table.php | UTF-8 | 1,239 | 2.78125 | 3 | [] | no_license | <?php
use App\Models\Category;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Sch... | true |
9131deb1c58fa02fb55aa80e63bbb2d28f6ab05c | PHP | RicardoGranja50/Redes | /At17/principal.php | UTF-8 | 556 | 2.546875 | 3 | [] | no_license | <?php
echo"<span style='color:red;'><h3><b>**************************************Pagina Inicial****************************************</b></h3></span><br>";
$nome=$_POST['txt_nome'];
$idade=$_POST['txt_idade'];
session_name('VariaveisNomeIdade');
session_start();
$_SESSION['NomeAluno']=$nome;
... | true |
590a439dc8341e187e8dac858c9c34ebaf39758d | PHP | jcalosor/social-contacts | /api/app/Listeners/AbstractEventListener.php | UTF-8 | 299 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Listeners;
use App\Events\AbstractEvent;
abstract class AbstractEventListener
{
/**
* Handle the abstract event.
*
* @param \App\Events\AbstractEvent $event
*/
abstract public function handle(AbstractEvent $event): void;
}
| true |
ca7f42b5c0000c046bc15372b92868e2d7320df4 | PHP | digitalsurgeons/boilerplate-craftcms | /craft/plugins/freeform/Library/Codepack/Components/RoutesComponent.php | UTF-8 | 1,599 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Freeform for Craft
*
* @package Solspace:Freeform
* @author Solspace, Inc.
* @copyright Copyright (c) 2008-2017, Solspace, Inc.
* @link https://solspace.com/craft/freeform
* @license https://solspace.com/software/license-agreement
*/
namespace Solspace\Freeform\Libra... | true |
43d19086cfce5c56f01d585f0b33a3a0908c901c | PHP | FluryWaana/laravel-angular | /laravel/database/seeds/RoleTableSeeder.php | UTF-8 | 407 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\Role;
use Illuminate\Database\Seeder;
class RoleTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = ['administrateur', 'utilisateur'];
for ($i = 0; $i < count($data); $i++) {
Ro... | true |
e08d18e07f14c1b665054edd8fbf91e29456043e | PHP | wmcnair/wiltfolio | /form-handler.php | UTF-8 | 1,897 | 3.046875 | 3 | [] | no_license | <?php
// define variables and set to empty values
$fname_error = $lname_error = $email_error = "";
$fname = $lname = $email = $phone = $message = $url = "";
//form is submitted with POST method
if ($_SERVER["REQUEST_METHOD"] == "POST"){
if (empty($_POST["fname"])){
$fname_error = "First Name is required";
} else ... | true |
dd7c19d114127b923d97d40a2b02909c6f02d3cf | PHP | dantranmanh/mbf | /tool/core/HtmlCompact.php | UTF-8 | 4,424 | 2.828125 | 3 | [] | no_license | <?php
/**
* HtmlCompact.php
*
* Core_HtmlCompact class
*
* @project mvc
* @author duong bien
* @email bien.duongvan@yahoo.com
* @date 13/7/2015
* @time 21:43
* @copyright 2015 Copyright duong bien
* @license duong bien
* @version 1.0.0
*/
class Core_HtmlCompact{
public function htmlCompact(... | true |
762ff4a7725f1f11f13e701b16ab87296c1d67b1 | PHP | kranack/frmwrk | /tests/unit_tests/ModelTest.php | UTF-8 | 2,379 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests;
if (!defined ('ROOT_DIR'))
define ('ROOT_DIR', dirname(dirname(__DIR__)), true);
/*require_once (ROOT_DIR . '/app/framework/core/Tools/Session.php');
require_once (ROOT_DIR . '/app/application/controllers/Controller.php');
require_once (ROOT_DIR . '/app/application/controllers/HT... | true |
4e5ecbce009a55bc87cc89d4dbd5b31d263633f2 | PHP | aspose-cells/Aspose.Cells-for-Java | /Plugins/Aspose_Cells_Java_for_PHP/src/aspose/cells/quickstart/HelloWorld.php | UTF-8 | 1,076 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace Aspose\Cells\QuickStart;
use com\aspose\cells\Workbook as Workbook;
use com\aspose\cells\FileFormatType as FileFormatType;
class HelloWorld {
public static function run($dataDir=null)
{
// Instantiating a Workbook object that represents a Microsoft Excel file.
$workbook = ne... | true |
5a3cd21521b3aa6bea436f23b52038651b93c7a7 | PHP | aniketjarad/My_Business_Application | /models/CertificationCategoryModel.php | UTF-8 | 6,039 | 2.78125 | 3 | [] | no_license | <?php
class CertificationCategoryModel {
/**
* Check database connection
*/
function __construct($db) {
try {
$this->db = $db;
} catch (PDOException $e) {
exit('Database connection could not be established.');
}
}
/**
* Insert record in URL... | true |
b91e8d3996b5968bb0e390b770346247b44bc8c0 | PHP | Certas-web/fuelcardsapi | /src/AppBundle/Entity/WpTermRelationships.php | UTF-8 | 1,488 | 2.71875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
/**
* WpTermRelationships
*/
class WpTermRelationships
{
/**
* @var integer
*/
private $termOrder = '0';
/**
* @var integer
*/
private $objectId;
/**
* @var integer
*/
private $termTaxonomyId;
/**
* Set termOrder
... | true |
63e02fd39ea700c073f4e07dd919f7945d9113be | PHP | JBirot/CatClinic | /Modele/DataMappers/Sql/UtilisateurMapper.php | UTF-8 | 9,111 | 3.09375 | 3 | [] | no_license | <?php
class UtilisateurMapper extends SqlDataMapper
{
public function __construct(Connexion $O_connexion)
{
parent::__construct(Constantes::TABLE_UTILISATEUR);
$this->_A_champsTriables = array('id','login','admin');
$this->_S_classeMappee = 'utilisateur';
$this->_O_connexion = $... | true |
2aed0bb16eec5a61a0bb3502792504acc2562cfe | PHP | sirio3mil/cinema-expressive | /src/App/Resolver/UserLoggedTrait.php | UTF-8 | 412 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Resolver;
use Mezzio\Authentication\UserInterface;
trait UserLoggedTrait
{
protected UserInterface $user;
/**
* @return UserInterface
*/
public function getUser(): UserInterface
{
return $this->user;
}
/**
* @param UserInterface $user
*/
p... | true |
15c0032f4d5ae3a6b4758d179689e10c6954de1c | PHP | sunny-b/irisWebsite | /php/contactForm.php | UTF-8 | 3,010 | 2.625 | 3 | [] | no_license | <?php
$action=$_REQUEST['action'];
$class = "";
$class2 = "";
$class3="";
$value="";
$value2="";
$value3="";
$placeholder="Your Name";
$placeholder2="Your Email";
$placeholder3="Your Message...";
function echoForm($class,$class2,$class3,$value,$value2,$value3,$placeholder,$placeholder2,$placeholder3) {
ech... | true |
ca8211ca16247a22ec5f70ed6c2f2c954ea06e7c | PHP | Stolz/php-stubs | /res/php/network/functions/gethostbyname.php | UTF-8 | 279 | 2.71875 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Get the IPv4 address corresponding to a given Internet host name
*
* @phpstub
*
* @param string $hostname
*
* @return string Returns the IPv4 address or a string containing the unmodified
* on failure.
*/
function gethostbyname($hostname)
{
} | true |
e9c151adfa8a46640122f349ec58dd306b175afd | PHP | kay71029/rd2 | /LotteryGame/DoAddUser.php | UTF-8 | 2,465 | 2.546875 | 3 | [] | no_license | <?php
require("MySqlConnect.php");
header('Content-Type: text/html; charset=utf-8');
$id = substr(strip_tags(addslashes(trim($_POST['ac_id']))),0,20);
$pw = addslashes($_POST['ac_pw']);
$plen = strlen($pw);
checkAddUser($id, $pw, $plen);
AddUser($id);
function checkAddUser($id, $pw, $plen)
{
//帳號檢查
if (!preg_ma... | true |
790b85e384d153c8d9380db067fd20bb572561ab | PHP | ns96/MyLIS-2 | /source/application/libraries/Plugin_loader.php | UTF-8 | 686 | 3.03125 | 3 | [] | no_license | <?php
/**
* Supports the use of plugins
*
* @author Nathan Stevens
* @author Alexandros Gougousis
*/
class plugin_loader {
var $properties = null;
var $user = null;
var $plugins = null;
public function __construct($params) {
$this->properties = $params['properties'];
$this->user = $params['use... | true |
78264f95d98268f2dfe86ebe63924752c427f58f | PHP | emanuel0918/GesEventos | /php/crearAuditorio.php | UTF-8 | 1,007 | 2.703125 | 3 | [] | no_license | <?php
class CrearAuditorio
{
#el verdadero ancho del auditorio es $anchoAuditorio -1
var $anchoAuditorio=20;
#el verdadero alto del auditorio es $altoAuditorio -2
var $altoAuditorio=7;
var $nombreAuditorio="auditorio";
function __construct(){
include("./configBD.php");
$sqlBorrarAuditorio = "call sp_bor... | true |
ec08f5e948b71137cd16e2b44a326e7eda104442 | PHP | RunnerLee/pattern-learning | /src/Observer/ConcreteObject.php | UTF-8 | 902 | 2.96875 | 3 | [] | no_license | <?php
/**
* @author: runnerlee
* @email: runnerleer@gmail.com
* @time: 2016-11-29 上午11:06
*/
namespace Runner\Pattern\Observer;
class ConcreteObject implements ObjectInterface
{
/**
* @var array
*/
protected $observers = [];
/**
* @param ObserverInterface $observer
* @return $thi... | true |
86d740405e12784a640d891e89eb3ff25c4aa201 | PHP | aravindhghosh/ECommerce-Madurai-Herbal-Tea-and-Fruits | /cart.php | UTF-8 | 3,946 | 2.84375 | 3 | [] | no_license | <?php
session_start();
if(isset($_GET['logout'])){
session_destroy();
unset($_SESSION['username']);
header("location: index.php");
}
$status="";
if (isset($_POST['action']) && $_POST['action']=="remove"){
if(!empty($_SESSION["shopping_cart"])) {
foreach($_SESSION["shopping_cart"] as $key ... | true |
4310e2b2ef58903ddbc3a42e25c39e53545c42c5 | PHP | UAFS-CS2033/patternJSAPI | /api/getUser.php | UTF-8 | 182 | 2.625 | 3 | [] | no_license | <?php
include_once "../models/UserDAO.php";
$userID = intval($_GET['id']);
$userDAO = new UserDAO();
$user = $userDAO->getUser($userID);
echo json_encode($user);
?> | true |
94fae77f080f2d8a0976e4c29fb18d898cf3faab | PHP | muub/LiipMonitor | /Check/Runner.php | UTF-8 | 1,589 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Liip\Monitor\Check;
use Liip\Monitor\Result\CheckResult;
class Runner
{
protected $chain;
/**
* @param \Liip\Monitor\Check\CheckChain $chain
*/
public function __construct(CheckChain $chain)
{
$this->chain = $chain;
}
/**
* @param string $checkId
... | true |
8e5ef2835e9e93892c9bd54a9535d917abe5097e | PHP | hcoudrais/Celaris | /src/Celaris/Game/Command/CreateUniverseCommand.php | UTF-8 | 4,793 | 2.640625 | 3 | [] | no_license | <?php
namespace Celaris\Game\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Celaris\Game\Entity\Celaris;
use Celaris\Game\Entity\BuildingCelaris;... | true |
4ae4f3dfb86a8a1f6f47a33786b998f19faaa5bd | PHP | HelgeSverre/mindwave | /src/Memory/ConversationBufferMemory.php | UTF-8 | 1,355 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Mindwave\Mindwave\Memory;
use Mindwave\Mindwave\Contracts\Message;
use Mindwave\Mindwave\Message\AIMessage;
use Mindwave\Mindwave\Message\HumanMessage;
class ConversationBufferMemory extends BaseChatMessageHistory
{
/**
* @param array<array{role: string, content: string}> $messages
*/... | true |
031e04eac38152968500e9e60b7f8fdd9e3d8c26 | PHP | axelduret/acetate | /database/factories/AddressFactory.php | UTF-8 | 1,241 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Address;
use Illuminate\Database\Eloquent\Factories\Factory;
class AddressFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Address::class;
/**
* Define the model's default stat... | true |
7cd1fb967be48e5b20267a545308be49e6f9bc3f | PHP | iwyg/image | /Color/Grayscale.php | UTF-8 | 2,244 | 2.921875 | 3 | [] | no_license | <?php
/*
* This File is part of the Thapp\Image\Color package
*
* (c) iwyg <mail@thomas-appel.com>
*
* For full copyright and license information, please refer to the LICENSE file
* that was distributed with this package.
*/
namespace Thapp\Image\Color;
use Thapp\Image\Color\Palette\Grayscale as GrayscalePale... | true |
883a14a64da6cf59c6b665ad323d12e5f4864630 | PHP | tekkenking/POS | /app/models/Bankentry.php | UTF-8 | 387 | 2.578125 | 3 | [] | no_license | <?php
class Bankentry extends Eloquent {
protected $guarded = array('id', 'created_at', 'updated_at');
//protected $fillable = array('first_name', 'last_name', 'email');
public static $rules = array();
/**
* The database table used by the model.
* @var string
*/
protected $table = 'bankentries';
public ... | true |
cc75cd4ec9d0976cc68f35f360914178444a4e9f | PHP | max-petrovich/dle-kino | /public/engine/classes/uploads/upload.class.php | UTF-8 | 27,529 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
=====================================================
DataLife Engine - by SoftNews Media Group
-----------------------------------------------------
http://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004,2014 SoftNews Media Group
======================================... | true |
263519ae23a24f05ade66e55f0b98ad7383a3e9f | PHP | WPPlugins/constant-contact | /gCls/gCls2.php | UTF-8 | 2,801 | 2.6875 | 3 | [] | no_license | <?php
//################################################################################
//###### Project : Constant contact integration with word press ######
//###### File Name : gCls2.php ######
//###### Purpose : send the user entered value to constant contact API #####... | true |
5369f126147ee5557db43b94f38ab143d5975c6f | PHP | Daniel-hsh/modelCrP | /alteracaoBD.php | UTF-8 | 940 | 2.65625 | 3 | [] | no_license | <?php
include_once("connect.php");
$stmt = $obj_mysqli->prepare("ALTER TABLE tablename MODIFY columnname INTEGER");
$stmt->bind_param('ssss', $nome, $email, $cidade, $uf);
if(!$stmt->execute()){
$erro = $stmt->error;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="... | true |
00b6d6941a5e8f4dc1ebc8b2512810c902c52a6e | PHP | BackupTheBerlios/naf-svn | /trunk/Naf/Record/Registry.php | UTF-8 | 713 | 2.84375 | 3 | [] | no_license | <?php
/**
* @deprecated Use of this class is deprecated. Use Naf_Record::create() instead.
*
*/
class Naf_Record_Registry {
private static $_list = array();
/**
* Load record's data from DB
*
* @param int $id
* @return Naf_Record
* @throws Naf_Exception_404
*/
static function get($class, $id, $n... | true |
4e0b8070d4bf61dd91beb5c6748dd03e51dfd995 | PHP | Tidadou59/Anews | /a_ranger/adminis/delete.php | UTF-8 | 687 | 2.5625 | 3 | [] | no_license | <?php
include ("../connexion.php"); //connexion bdd
// démarre la session
session_start ();
include ("../protection.php"); //vérification de connexion
/* ***************************************************************** */
/**** Supprimer un commentaire ****/
if (!empty($_GET['id']))
{
/*
if ($id = filter_var... | true |
8a2cf114d23d4cec2f4d9e7e418dcbd283dc06ab | PHP | Silvan-Nyambu/Church-Management-System | /admin/add_group.php | UTF-8 | 2,060 | 2.8125 | 3 | [] | no_license | <?php
include "../includes/db_connect.php";
$message=''; // Variable To Store Error Message
//receive the values from the form and assign them to variables
if(isset($_POST['post_data'])){
$group_name=$_POST['group_name'];
//check if user name already exists
$check_grp = "select group_name fro... | true |
da1ebfbc291ec0a7eb6eea7331ad719188a37533 | PHP | ThomasBeWeb/restocoin | /template/navbar.php | UTF-8 | 3,589 | 2.59375 | 3 | [] | no_license | <?php
//Liste des liens de base
$listeFichiers = array(
"Home" => $GLOBALS['racine'],
"Nos cartes" => $GLOBALS['racine']."lastCards",
"Contact" => $GLOBALS['racine']."contact",
"Livred'Or" => $GLOBALS['racine']."livredor",
);
//Si Admin ET password confirmé, ajout de la page Administration
if(isset($_C... | true |
79f723529dff20ac2387938a43134811f3eb82d4 | PHP | Ryan949/CS157A_Project | /index.php | UTF-8 | 6,598 | 2.84375 | 3 | [] | no_license | <?php
require_once("src/config/Config.php");
$project_name = "Portfolio Stocks Manager";
$team_members = array("Ryan Daily", "William Chan", "Karma Pandya", "Joseph Hu");
$error = null;
// Create connection to Database
$mysqli = new mysqli(SERVERNAME, USERNAME, PASSWORD);
// Check connection
if ($mysqli->connect_erro... | true |
1863e4f0da26ff6470f57cbd1f87ce264cc8fadb | PHP | tnlitv/Intersog-PHP-task | /lib/Validators/AlbumValidator.php | UTF-8 | 487 | 2.546875 | 3 | [] | no_license | <?php
class AlbumValidator {
public function __invoke($req, $res, $next)
{
$validator = new \Valitron\Validator($req->getParsedBody());
$validator->rules([
'required' => 'name',
'in' => ['active', array('0', '1')]
]);
if (!$validator->validate()) {
... | true |
7251587dbb1c4121ed587ff6b159d97191079ac1 | PHP | formapro/testo | /src/Testo/Testo.php | UTF-8 | 4,567 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Testo;
use Testo\Filter\FilterInterface;
use Testo\Filter\LeaveBlocksFilter;
use Testo\Filter\UncommentFilter;
use Testo\Source\ClassSource;
use Testo\Source\FileSource;
use Testo\Source\MethodSource;
use Testo\Source\RootDirAwareInterface;
use Testo\Source\SourceInterface;
class Testo implements Root... | true |
cc6b64f9d0cdf187e4e6ca05f10575d2167835a3 | PHP | nightwolf93/Zephir | /zephir/app/modules/offer.module.php | UTF-8 | 511 | 2.78125 | 3 | [] | no_license | <?php
namespace Zephir\App\Modules;
class OfferModule {
private static $offers = array(
1 => array("id" => 1, "name" => "Gratuit", "price" => "0", "max-updates" => 5)
);
public static function getOffer($id){
if(is_numeric($id)){
if($id > 0 && $id <= count(self::$offer... | true |
c24e1a3cccceb2aa832359d1e2f9471c6b6f55b8 | PHP | Open-CSP/FlexForm | /src/Processors/Content/Edit.php | UTF-8 | 20,164 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by : Wikibase Solutions
* Project : FlexForm
* Filename : edit.class.php
* Description :
* Date : 19-3-2021
* Time : 21:23
*/
namespace FlexForm\Processors\Content;
use FlexForm\Core\Config;
use FlexForm\Core\Core;
use FlexForm\Core\Debug;
use FlexForm\FlexFormExceptio... | true |
decb66c69ef7625df9a143c0593b12bb22362700 | PHP | masmarmehdi/BackEndUcode | /sprint09/t00/models/Model.php | UTF-8 | 662 | 2.84375 | 3 | [] | no_license | <?php
include 'connection/DatabaseConnection.php';
abstract class Model{
protected $connection;
protected $table;
public function __construct($table){
$this->setTable($table);
setConnection();
}
private function setTable($table){
$thi... | true |
e6207df86677fb9c593f87064dc65ed8653b26d5 | PHP | ikr4185/nijiru-system | /application/logics/commons/Api.php | UTF-8 | 2,843 | 2.796875 | 3 | [] | no_license | <?php
namespace Logics\Commons;
use Cores\Config\Config;
/**
* Class Api
* @package Logics\Commons
*/
class Api
{
/**
* XML-RPC Wrapper
* @param $option
* @param $arg
* @return bool | array
*/
public function xml_rpc($option, $arg)
{
$request = xmlrpc_encode_request($op... | true |
2ac7da3b2ca607f0071d377bcad5006dd7601cba | PHP | NgurahPrihandana/MakeAWishShop | /app/models/Tipe_model.php | UTF-8 | 328 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Tipe_model {
private $table = "tb_tipe";
private $db;
public function __construct()
{
$this->db = new Database;
}
public function getAllTipe() {
$query = "SELECT * FROM $this->table";
$this->db->query($query);
return $this->db->resultSet();
}
}... | true |
bacef352531395699240c1416b85eef5ca6e3cd8 | PHP | MMHCherif/Eticket | /src/Entity/Event.php | UTF-8 | 3,146 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\EventRepository")
*/
class Event
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(typ... | true |
59e982f11557ccaf0a87d28502c54badd2722aca | PHP | Roberto5/AgeOfEvolution | /application/models/troopers.php | UTF-8 | 2,462 | 2.59375 | 3 | [] | no_license | <?php
/**
* troopers
*
* @author pagliaccio
* @version
*/
require_once 'Zend/Db/Table/Abstract.php';
class Model_troopers extends Zend_Db_Table_Abstract {
/**
* The default table name
*/
protected $_name=TROOPERS;
protected $_primary="trooper_id";
public $my_troopers = null;
public $other_troope... | true |
b0fd31269d9f20309e285cb590a26aded9c69327 | PHP | id0612/openapi-sdk-php | /src/Cms/V20180308/PutCustomMetric.php | UTF-8 | 1,034 | 2.578125 | 3 | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace AlibabaCloud\Cms\V20180308;
use AlibabaCloud\Client\Request\RpcRequest;
/**
* Request of PutCustomMetric
*
* @method string getMetricList()
*/
class PutCustomMetric extends RpcRequest
{
/**
* @var string
*/
public $product = 'Cms';
/**
* @var string
*/
public... | true |
666b3ca6141b8037fede0e1e689ed0640bb37dea | PHP | alterplataforma/alter-api | /app/Http/apinequi/AppConf.php | UTF-8 | 1,179 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ .'/config.php';
class AppConf {
private $clientId = null;
private $clientSecret = null;
private $apiKey = null;
private $authUri = null;
private $authGrantType = null;
private $apiBasePath = null;
public function __construct() {
$this->loadEnvVars();
... | true |
a1b92ee182fd622bb2ce1b3272c0001ce20992d4 | PHP | efremovigor/open-api | /project/src/Service/Entity/Routing/RoutingCollection.php | UTF-8 | 501 | 2.578125 | 3 | [] | no_license | <?php
namespace Service\Entity\Routing;
use Core\AbstractCollection;
use Core\Service\Entity\ContainsCollectionInterface;
/**
* Created by PhpStorm.
* User: igore
* Date: 01.02.18
* Time: 8:46
*/
class RoutingCollection extends AbstractCollection implements ContainsCollectionInterface
{
public function get... | true |
f0edc95a8276980d900766b63dcce972d2bddcd0 | PHP | AndresL99/MoviePass | /Controllers/CinemaController.php | UTF-8 | 4,819 | 2.8125 | 3 | [] | no_license | <?php
namespace Controllers;
use DAO\CinemaDAOJson as CinemaDAOJson;
use DAO\CinemaDAO as CinemaDAO;
use Models\Cinema as Cinema;
class CinemaController
{
private $cinemaDAO;
//private $listCinema; no me parece correcto utilizar un atributo extra para solo un metodo, asi que pa... | true |
63fd08d149c1a787b00a90ea19f6972bc8aa8b94 | PHP | toritsejuFO/php-boilerplate-api | /init.php | UTF-8 | 419 | 2.546875 | 3 | [] | no_license | <?php
session_start();
error_reporting(E_ALL); ini_set('display_errors', 1);
spl_autoload_register(function($class_name) {
include_once $_SERVER['DOCUMENT_ROOT'] . '/classes/' . $class_name . '.php';
});
// Load user if they are logged in
if (Session::exists('user_id')) {
$current_user = new User();
$current_us... | true |
d79dca06f1ba5e3f4c6b5d71e3766345c7cdadbd | PHP | Vanessa-Nava/CST-336-InternetProgramming | /Homework2/inc/functions.php | UTF-8 | 797 | 3.515625 | 4 | [] | no_license | <?php
function play(){
for($i= 1; $i<3; $i++){
${"randomhHand". $i } = rand(0,3);
displayHand(${"randomhHand".$i}, $i);
}
winner($randomhHand1, $randomHand2);
}
function displayHand($index, $pos){
$hand = array("rock", "paper", "scissors");
$ra... | true |
99408c1975edd1b39e4e71e91484dd5e04532fb3 | PHP | NiklasNeumann/GameOfLife | /tests/outputs/PngTest.php | UTF-8 | 4,698 | 2.921875 | 3 | [] | no_license | <?php
namespace outputs;
use GameOfLife\Board;
use GameOfLife\outputs\Png;
use Icecave\Isolator\Isolator;
use PHPUnit\Framework\TestCase;
use Ulrichsg\Getopt;
class PngTest extends TestCase
{
public function testOutputWithoutColors()
{
$field = new Board(5, 5);
$field->setBoardValue(2, 2, 1);... | true |
98fe2966f459f9c3526e702e73324a63feaa4a08 | PHP | PanHongXi/pt | /application/admin/controller/Link.php | UTF-8 | 2,996 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\controller;
class Link extends Base
{
public function lList()
{
//获取数据
$list = db('link')->paginate(20);
$page = $list->render();
//输出
$this->assign([
'list' => $list,
'page' => $page,
]);
return view('l... | true |
1afe8a9ef1a43a74622432da0ef98f1bf912bed4 | PHP | ralphowino/swagger | /src/Ralphowino/Swagger/Generators/SwaggerApi.php | UTF-8 | 641 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ralphowino\Swagger\Generators;
use Ralphowino\Swagger\Swagger;
class SwaggerApi extends SwaggerBase
{
function __construct($name)
{
$this->swg = new Swagger();
$this->name = $name;
$this->filename = storage_path().'/swagger/apis/'.$name;
$this->default= array(
... | true |
ee8cf517ccfb290a419b94ff67565955c360e17a | PHP | svtokarevsv/smartspace | /app/lib/Database.php | UTF-8 | 522 | 2.734375 | 3 | [] | no_license | <?php
namespace App\lib;
class Database
{
private static $db;
public static function getDb()
{
if (isset(self::$db)) {
return self::$db;
}
$dsn = "mysql:host=" . Config::get('db.host') . ";dbname=" . Config::get('db.db_name');
self::$db = new \PDO($dsn, Config::... | true |
c1d3c2017a2f6f4d266ea2f82243db182c77b952 | PHP | symfony/symfony | /src/Symfony/Contracts/Translation/TranslatorInterface.php | UTF-8 | 2,518 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Contracts\Translation;
/**
* @author Fabien Potencier <fabien@... | true |