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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
091c2fbd9a2b53b8f6580d266e0270cf684fcea1 | PHP | jubedhms/jubedhms | /application/controllers/api_v1/Advance_notification.php | UTF-8 | 4,269 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . 'libraries/REST_Controller.php';
class Advance_notification extends REST_Controller {
/**
* Get All Data from this method.
*
* @return Response
*/
public function __construct() {
parent::__construct();
$t... | true |
10e3fec61af7f480c6cb3ca408dfcf254d0a8dc3 | PHP | FergusNuwanda/Xilantro-Encuadernaciones | /mail.php | UTF-8 | 2,128 | 2.734375 | 3 | [] | no_license | <?php
sleep(2);
if (isset($_POST['submit'])) {
$nombre = $_POST['nombre'];
$email = $_POST['email'];
$mensaje = $_POST['mensaje'];
$errorEmpty = false;
$errorEmail = false;
if (empty($nombre) || empty($email) || empty($mensaje)) {
echo "<span class='form-error'>Completar todos los campo... | true |
8de239b7c352826d61083b6d5438cd0fd8bcd932 | PHP | Hydrotoast/Speed-Blog | /models/Post.php | UTF-8 | 283 | 3 | 3 | [] | no_license | <?php
class Post {
public $post_id;
public $post_title;
public $post_body;
public function printHTML() {
echo '<article>';
echo "<h2><a
href=\"post.php?post_id=$this->post_id\">$this->post_title</a></h2>";
echo "<p>$this->post_body</p>";
echo '</article>';
}
}
?>
| true |
c96d371f0dcd08d7bfcf2a484a0a45d06b03efe6 | PHP | IngeTeng/yuqing3.0 | /content_center/api/lib/table/table_apicount.class.php | UTF-8 | 3,116 | 2.875 | 3 | [] | no_license | <?php
/**
* table_apicount.class.php API调用统计表
*
* @version $Id$ v0.01
* @createtime 2016/5/22
* @updatetime
* @author jt
* @copyright Copyright (c) 微普科技 WiiPu Tech Inc. (http://www.wiipu.com)
*/
class Table_apicount extends Table{
/**
* Table_apicount::struct() 数组转换
*
... | true |
fb0f8b13adcbb2946466b32727d1e3006500b070 | PHP | mogaprit07/internship | /day3whileloop.php | UTF-8 | 152 | 2.921875 | 3 | [] | no_license | <?php
$a=0;
echo "<table bordert=1";
while($a<10)
{
echo "<td bgcolor='pink'>$a</td>";
$a++;
echo "</tr>";
}
echo "</table>";
| true |
76dbe8078ddf0c57eef4be5574b418987a170f21 | PHP | Bushikot/students_test_app | /bicycle/utils/Router.php | UTF-8 | 924 | 2.921875 | 3 | [] | no_license | <?php
namespace Utils;
class Router
{
private static function callAction($controllerName, $actionName, array $arguments = [])
{
$controllerName = "Controllers\\{$controllerName}";
$controller = new $controllerName;
call_user_func_array([$controller, $actionName], $arguments);
}
... | true |
bd2b3ba275b70d8cbcbe4b57ac364cbc8e6f25ea | PHP | ehrlichandreas/ehrlichandreas1-db | /src/EhrlichAndreas/Db/Adapter/Pdo/Abstract.php | UTF-8 | 14,465 | 2.859375 | 3 | [
"Unlicense"
] | permissive | <?php
//require_once 'EhrlichAndreas/Db/Exception.php';
//require_once 'EhrlichAndreas/Db/Abstract.php';
//require_once 'EhrlichAndreas/Db/Adapter/Pdo/Abstract/Statement.php';
//require_once 'EhrlichAndreas/Pdo/Pdo.php';
//require_once 'EhrlichAndreas/Util/Object.php';
/**
* Class for connecting to SQL database... | true |
cb2c7f033002369b6079b5f5c3aa970550fe0a09 | PHP | gustavoclay/PhpStudy | /revision/forms/dados.php | UTF-8 | 182 | 2.71875 | 3 | [] | no_license | <?php
/*
$nome = $_GET['nome'];
$email = $_GET['email'];
echo "Seu nome é $nome e seu email é $email<br>";
*/
echo $_GET['idade']."<br>".$_GET['nome']."<br>";
var_dump($_GET); | true |
9b60b49a07430a2d7a5f909f67b828725e1056d8 | PHP | sios13/simox | /src/Router/Router.php | UTF-8 | 5,736 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Simox;
use Simox\DI\DIAwareInterface;
use Simox\Router\Route;
class Router implements DIAwareInterface
{
private $_di;
private $_routeDefinitions;
private $_matchRoute;
private $_notFoundRoute;
public function __construct()
{
$this->_di = null;
$this->_rout... | true |
b30e9e367eb1a0bad94314ed640c63bff43282d4 | PHP | darkalok/Shakti-Sir_PHP-Training | /classes/Provided by Sameer/php/Task/class/db/signIn/index.php | UTF-8 | 742 | 2.65625 | 3 | [] | no_license | <?php
require("db_connect.php");
if (isset($_REQUEST["submit"])) {
$user_email = $_REQUEST['user_email'];
$user_password = $_REQUEST['user_password'];
$sql = "SELECT *FROM auth_info WHERE user_email='$user_email' AND user_password='$user_password'";
$rs = mysqli_query($con, $sql);
$data = mysqli_fetc... | true |
bfb037923d9a58343ae67c2441b3aabd9612e438 | PHP | howyi/json-schema-mapper | /src/JsonSchemaMapper/Reflector/FileReflector.php | UTF-8 | 1,219 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace JsonSchemaMapper\Reflector;
class FileReflector
{
public static function reflect(string $toDir, array $allFiles): void
{
self::deleteRecursive($toDir);
clearstatcache();
mkdir($toDir, 0777, true);
clearstatcache();
foreach ($allFiles as $filePath => $con... | true |
817d68cceb232923c69fdfef7da255726bc05c0c | PHP | chiricos/acl-laravel | /app/cerverus/Repositories/UserRepo.php | UTF-8 | 2,406 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace cerverus\Repositories;
use cerverus\Entities\User;
class UserRepo extends BaseRepo
{
protected function getModel()
{
return new User();
}
public function passwordRestart($email)
{
$user = $this->model;
$user = $user::where('email', '=', $email)->first();
... | true |
944f6047b0cc6cb57188cd78e5f5285f71e84098 | PHP | IQcoder/DesignerPatterns | /Creational/SimpleFactory/Bicycle.php | UTF-8 | 338 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chenchangqin
* Date: 2018/12/20
* Time: 16:38
*/
namespace Creational\SimpleFactory;
/**
* 自行车类
*/
class Bicycle implements VehicleInterface
{
/**
* @param mixed $destination
*
* @return mixed|void
*/
public function driveTo($destination)
... | true |
3c5668d238f6ed0ef6f296b6b1979fff7aa43852 | PHP | endachao/sugarBlog | /app/Repositories/SettingRepository.php | UTF-8 | 956 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Setting;
use Bosnadev\Repositories\Eloquent\Repository;
class SettingRepository extends Repository
{
/**
* Specify Model class name
*
* @return mixed
*/
public function model()
{
return Setting::class;
}
/**
* 传递 通... | true |
1936f842a71ca108792cb1ed4a77cb304e65f941 | PHP | kristijorgji/db-to-php | /tests/unit/Managers/Php/AbstractPhpManagerTest.php | UTF-8 | 3,242 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace kristijorgji\UnitTests\Managers\Php;
use kristijorgji\DbToPhp\Db\TablesCollection;
use kristijorgji\DbToPhp\Managers\Exceptions\TableDoesNotExistException;
use kristijorgji\DbToPhp\Managers\Php\AbstractPhpManager;
use kristijorgji\Tests\Factories\Db\TablesCollectionFactory;
class AbstractPhpManagerTe... | true |
81cd3cf3fe3b571fbeee695b5bec111eadc61f5f | PHP | DDuartecode/campeonato_sinuca | /vendor/test_sinuca/php-classes/src/Model/Team.php | UTF-8 | 1,106 | 2.953125 | 3 | [] | no_license | <?php
namespace TestSinuca\Model;
use \TestSinuca\DB\Sql;
use \TestSinuca\Model;
class Team extends Model {
public static function listAll()
{
$sql = new Sql();
return $sql->select("SELECT * FROM tb_teams ORDER BY id_team");
}
public static function checkList($list)
{
foreach ($list as &$row){
$... | true |
cd6cd2752383ec7de8f494ed18d7e43fd8bfdce1 | PHP | webtao520/php_project | /php应用/PHP文件的自动加载/printit.class.php | UTF-8 | 82 | 2.640625 | 3 | [] | no_license | <?php
class PRINTIT {
function doPrint() {
echo 'hello world';
}
} | true |
2863c2595b645f9bb8e8376f745593a1eb1b5cd1 | PHP | SureshVallli/drupal-8-development | /modules/custom/iai_personalization/tests/src/Unit/PersonalizationIpServiceTest.php | UTF-8 | 4,189 | 2.5625 | 3 | [] | no_license | <?php
/**
* @file
*
* Contains \Drupal\Tests\iai_personalization\Unit\PersonalizationIpServiceTest
*/
namespace Drupal\Tests\iai_personalization\Unit;
use Drupal\iai_personalization\PersonalizationIpService;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\HttpFoundation\Request;
/**
* Tests methods in the... | true |
96a298cba5eaf7d8f102140b5495ba89ba6549a0 | PHP | lightbringer1991/Projects | /DataExtractor/dataExtractor.php | UTF-8 | 1,160 | 2.65625 | 3 | [] | no_license | <?php
// error_reporting( E_ALL );
set_time_limit(1800);
require_once("lib/Extractor.class.php");
$urlList = explode("\r\n", $_POST['url']);
$fileName = $_POST['fileID'];
$option = (isset($_POST['options'])) ? $_POST['options'] : '0';
$emailList = array();
$phoneList = array();
//---- main script
if ($option == 'dee... | true |
ee0888d50109495df89b86bced1f19fc6c7634b6 | PHP | shohan777/Php-Project | /php_min/incriment.php | UTF-8 | 774 | 3.34375 | 3 | [] | no_license | <?php
/*print "<table border=\"4\">\n";
for ($y=1; $y<=10; $y++){
print "<tr>\n";
print "shohan";
for ($x=1; $x<=10; $x++){
print "<td>";
print($x+$y);
print "</td>\n";
}
print "</tr>\n";
}
1.83
print "</table>";*/
print "<table border=\"6\">\... | true |
7cec22a1e2f38c8e8b039954b153b1edb9b70b92 | PHP | MQrpik/api_project | /Handler.php | UTF-8 | 1,859 | 2.921875 | 3 | [] | no_license | <?php
require_once("LinkBackend.php");
class Handler {
function getAllEntries() {
$companies = new Company();
$rawData = $companies->getAllEntry();
if(empty($rawData)) {
echo "Błąd wyświetlania";
} else {
$response = $this->encodeJson($rawData);
echo $response;
}
}
function add() {
... | true |
a109b89a2309db9743e71fe0b300b6c40467c4da | PHP | fs-geofs/geofsdisplay | /php/praesidienste-geoloek.php | UTF-8 | 587 | 2.765625 | 3 | [] | no_license | <?php $url = "https://geofs.uni-muenster.de/wp/geoloek/praesenzzeiten";
$input = @file_get_contents($url) or die('Could not access file: $url');
// remove any attributes from tags, to ensure there is no unwanted styling
$input = preg_replace("/<([a-z][a-z0-9]*)[^>]*?(\/?)>/i",'<$1$2>', $input);
// replace newlines... | true |
fe74db8dd60466cd02bcff816723090cf5323643 | PHP | bergwerk/bwrk_address | /Classes/ViewHelpers/Link/PhoneViewHelper.php | UTF-8 | 1,204 | 2.578125 | 3 | [] | no_license | <?php
namespace BERGWERK\BwrkAddress\ViewHelpers\Link;
use BERGWERK\BwrkAddress\ViewHelpers\AbstractViewHelper;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
/**
* Class PhoneViewHelper
* @package BERGWERK\BwrkAddress\ViewHelpers\Link
*/
class PhoneViewHelper extends AbstractTagBasedViewHelper
{... | true |
5208bfcbabd3ac920523c64b7f11bcf994940514 | PHP | arr0nax/collection-database | /src/user.php | UTF-8 | 1,779 | 3.265625 | 3 | [] | no_license | <?php
class User {
private $username;
private $password;
function __construct($username, $password, $id = null)
{
$this->username = $username;
$this->password = $password;
$this->id = $id;
}
function setusername($username)
... | true |
a866405c9fe4b46288d32f0442903310620725a1 | PHP | ansariarsal99/ec-laravel | /app/Exports/SellingUnitGroupExport.php | UTF-8 | 1,463 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
// use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
// use App\ProductColor;
use App\SellingUnitGroup;
class SellingUnitGroupExport implements FromCollection, WithHeadings
{
/**
* @return \Ill... | true |
df70a7fefc481b0b77652c45ee48326ab5a9921f | PHP | begoc/topmade | /app/Http/Controllers/Site/WelcomeController.php | UTF-8 | 1,191 | 2.546875 | 3 | [] | no_license | <?php namespace Topmade\Http\Controllers\Site;
use Illuminate\Contracts\Bus\Dispatcher;
use Topmade\Commands\GetWelcomeSite;
use Topmade\Http\Controllers\Controller;
class WelcomeController extends Controller
{
/*
|--------------------------------------------------------------------------
| Welcome Contr... | true |
22b8b8046fde8a314d17b9ac5f0402b7b3a49c0e | PHP | yauhenko/carkeeper-old | /backend/src/Controllers/News.php | UTF-8 | 1,247 | 2.640625 | 3 | [] | no_license | <?php
namespace Controllers;
use Framework\DB\Client;
use Framework\DB\Pager;
class News extends ApiController {
/**
* @route /news
*/
public function index(): array {
$res = Pager::create()
->sql('SELECT ** FROM news WHERE published = 1 AND (date_begin IS NULL OR date_begin <= NOW()) AND (date_end IS NU... | true |
3a228a4d5c4735c88fe6c37a0df439902b17e433 | PHP | krievley/p4 | /app/models/Party.php | UTF-8 | 2,215 | 2.8125 | 3 | [] | no_license | <?php
/*
* Model to represent the parties table.
*/
class Party extends Eloquent {
/**
* The following functions represent the relationships
* of the Party model to other models
*
* @var function
*/
//Party belongs to User
public function user() {
return $this->belongsTo('Us... | true |
f5ccbb9c9eda04fa8842c15182770c1c1faf512a | PHP | jackhutson03/Fresheat | /protected/extension/GoogleApis/lib/google-api-php-client/examples/analytics/simple.php | UTF-8 | 1,779 | 2.59375 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
require_once '../../src/apiClient.php';
require_once '../../src/contrib/apiAnalyticsService.php';
session_start();
$client = new apiClient();
$client->setApplicationName("Google Analytics PHP Starter Application");
// Visit https://code.google.com/apis/console?api=analytics to generate your
// client id, client... | true |
692877da1e2b4db16a09fa5b6f69e9f21a16b158 | PHP | phpactor/phpactor | /lib/CodeTransform/Domain/NameWithByteOffsets.php | UTF-8 | 937 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Phpactor\CodeTransform\Domain;
use ArrayIterator;
use Iterator;
use IteratorAggregate;
/**
* @implements IteratorAggregate<NameWithByteOffset>
*/
class NameWithByteOffsets implements IteratorAggregate
{
private $nameWithByteOffsets;
public function __construct(NameWithByteOffset ...$nameWi... | true |
44353872146da3b1457ddbaebd1896083015eace | PHP | Fale/vodafone | /app/database/migrations/2013_05_21_202048_vodafone.php | UTF-8 | 527 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
class Vodafone extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('vodafone', function($table)
{
$table->increments('id');
$table->string('tipo');
$table->string('destinazione');
$table... | true |
6beb0a01792c3cf4dffc373b5cb8cc02aeff0803 | PHP | FollowZero/oc-areas-plugin | /models/Village.php | UTF-8 | 800 | 2.625 | 3 | [] | no_license | <?php namespace Plus\Area\Models;
use Model;
/**
* Model
*/
class Village extends Model
{
use \October\Rain\Database\Traits\Validation;
/*
* Disable timestamps by default.
* Remove this line if timestamps are defined in the database table.
*/
public $timestamps = false;
/**
... | true |
ca87da9d36c298e17e14330ec300599a18aef5b2 | PHP | lanlin/god | /src/Persist/AdapterFiltered.php | UTF-8 | 1,008 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace God\Persist;
use God\Model\Model;
/**
* ------------------------------------------------------------------------------------
* God Adapter Filter Interface
* ------------------------------------------------------------------------------------
*
* @author lanlin
* @change 2018/06/22
*/
interface... | true |
aebbc4007675a8b5f0279875202d9e143f4d6760 | PHP | KurejiMilan/kurohana | /phpdirectory/api/entity/user.php | UTF-8 | 1,886 | 2.859375 | 3 | [] | no_license | <?php
include_once '../../pwd_hash_dir/pwdhash.php';
include_once '../../encryptor/opensslencryption.php';
class User{
private $conn;
public function __construct($database){
$this->conn = $database;
}
public function validateCredentials($email,$name, $username, $pwd, $pwd1){
if(empty($email)||empty($n... | true |
092c841fdf311501d8e629af308b0a3a9cab2dc6 | PHP | anttesoriero/MitigationsRepository | /Front End Code/Mitigations Repository Actual/controller/php/getRole.php | UTF-8 | 659 | 2.640625 | 3 | [] | no_license | <?php
session_start();
if (!include('../../model/php/dbProcedures.php')) {
die('error finding dbProcedures.php in model dir');
}
$hostname = 'localhost'; //local host - our web server will be our db server.
$username = $_SESSION['username'];
$password = $_SESSION['password'];
$dbname = 'Mitigation_Repository';
... | true |
9e2ba765170f1a73af4b8505ff45bc132b5a2ec4 | PHP | GordanaP/LaraNews | /app/Category.php | UTF-8 | 649 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name'];
/**
* A category has many articles.
*
* return \Illuminate\Database\Eloquent\Rel... | true |
d7937b52d4ea1d03085b2e788af85ad98f37f458 | PHP | Michael-Min/hyperf-iot | /app/Core/Common/Extend/CardApi/Bk/Tools.php | UTF-8 | 4,770 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Core\Common\Extend\CardApi\Bk;
use Core\Common\Extend\CardApi\Bk\Method;
use Core\Common\Extend\CardApi\Bk\Aes;
use Core\Common\Extend\CardApi\Bk\districtInspection;
use Core\Common\Extend\Helpers\CurlHelpers;
use Hyperf\Di\Annotation\Inject;
use App\Constants\Stat... | true |
4cab85b64e9cfa5e57fea7516803383740f38039 | PHP | rached81/campagne-vaccination-stt | /src/Entity/AgentVaccin.php | UTF-8 | 3,955 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use App\Repository\AgentVaccinRepository;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
use DateTimeInterface;
// DON'T forget the following use statement!!!
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
// use Symf... | true |
57be8328016c1ab6d9c868ad98f1f489267e1e81 | PHP | justin-palumbo/nameless-earth | /get_scores.php | UTF-8 | 677 | 2.703125 | 3 | [] | no_license | <?php
$url=parse_url(getenv("CLEARDB_DATABASE_URL"));
$myServer = $url["host"];
$myUser = $url["user"];
$myPass = $url["pass"];
$myDB = substr($url["path"],1);
//connection to the database
$dbhandle = mysql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
//sel... | true |
5255e76b297bff65c908e2b727db6539aaff9fff | PHP | dominiquepieton/tennisClubSaussan | /src/Controller/ReservationController.php | UTF-8 | 5,501 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Reservation;
use App\Form\ReservationType;
use App\Repository\ReservationRepository;
use Symfony\Component\HttpFoundation\Request;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route... | true |
e6867cfafacae0eacb90f1776c56505dce0d272f | PHP | StevenQin1996/Design_and_analysis_Algorithm | /design01.php | UTF-8 | 991 | 3.28125 | 3 | [] | no_license |
<?php
//steven Qin
function Compare($A,$B)
{
$sizeA =count($A);
$sizeB =count($B);
$aCounter = 1;
$bCounter = 1;
$common = array();
while($aCounter <= $sizeA && $bCounter <= $sizeB)
{
if ($A[$aCounter] == $B[$bCounter])
{
array_push($common,$A[$aCounter])... | true |
3b3b671fdd1ab8e04b4d4f7efd37223e1b8d4351 | PHP | bhudnell/Past-Work | /Web development/quotations/showQuotes.php | UTF-8 | 1,189 | 2.953125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Quotations</title>
<link href="styles.css" type="text/css" rel="stylesheet" />
</head>
<body>
<h2>Quotes</h2>
<form id='addQuote' action='./addQuote.html' method='post'>
<input type='submit' value='Add Quote'>
</form><br>
<?php
require_once './D... | true |
81af0ad0cf4a6f9dd6c83e9a2f7074690556c57c | PHP | jonestabillo/react-server-template | /src/common/WebLogConfigurator.php | UTF-8 | 1,204 | 2.703125 | 3 | [] | no_license | <?php
namespace com\glyphstudios\project\common;
class WebLogConfigurator implements \LoggerConfigurator {
public function configure(\LoggerHierarchy $hierarchy, $input = null){
global $configuration;
/*******************************************
* For Main
*******************************************/
/... | true |
c2ea48a150a00dd7a12cab1b980cf16c2939b0f6 | PHP | nicklasos/ConfigServer | /src/Nicklasos/ConfigServer/Cache/NullableMemcache.php | UTF-8 | 483 | 2.671875 | 3 | [] | no_license | <?php
namespace Nicklasos\ConfigServer\Cache;
class NullableMemcache extends \Memcache
{
private $values;
public function set($key, $var, $flag = null, $expire = 0)
{
$this->values[$key] = $var;
}
public function get($key, $flags = null)
{
return isset($this->values[$key]) ? $... | true |
75261ada0b2d2932107a9419ac6a9f8e6567bed0 | PHP | control-ui-kit/control-ui-kit | /src/Components/Forms/Inputs/DateRange.php | UTF-8 | 4,657 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ControlUIKit\Components\Forms\Inputs;
use ControlUIKit\Traits\DateInputFunctions;
use ControlUIKit\Traits\UseInputTheme;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class DateRange extends Component
{
use UseInputTheme, DateInputFunctions;
pro... | true |
8ed5ec86aae80b7a0e563104e4e853f6ca0583e7 | PHP | art785/ipasa | /lib/entidad/Costo_Propiedad.php | UTF-8 | 1,292 | 2.859375 | 3 | [] | no_license | <?php
class Costo_Propiedad
{
//******* Atributos ********//
private $id_costo_propiedad;
private $fecha;
private $costo_predial;
private $id_propiedad;
//***************** inician set y get de Costo_Propiedad **********************//
//********************* set y get de Id_Costo_Propiedad *********************... | true |
5b7b75611b792a00f44122191218408522197988 | PHP | mgalex8/laraparser | /app/Vacancy.php | UTF-8 | 5,512 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\DB;
class Vacancy extends Model
{
/**
* The connection name for the model.
*
* @var string
*/
protected $table = 'vacancy';
public function city() {
return $this->belongsTo('App\City', 'city_id', 'id');
}
pub... | true |
906cea575474faf41e2ab9215302a0f58e798970 | PHP | LeoOnTheEarth/phpconf | /application/models/DbTable/Staffs.php | UTF-8 | 806 | 2.515625 | 3 | [] | no_license | <?php
class Phpconf_Model_DbTable_Staffs extends Zend_Db_Table_Abstract
{
protected $_name = 'staffs';
protected $_referenceMap = array(
'Conference' => array(
'columns' => 'conferenceId', // 對應到 staffs.conferenceId
'refTableClass' => 'Phpconf_Model_DbTable_Conferences',
... | true |
95574367f3a8f032d38e522538bdefcc022c3555 | PHP | Codeception/AspectMock | /src/AspectMock/Intercept/MethodInvocation.php | UTF-8 | 1,739 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace AspectMock\Intercept;
class MethodInvocation
{
public $closure;
protected $method;
protected $arguments;
protected $isStatic;
protected $declaredClass;
protected $class;
/**
* @param mixed $declaredClass
*/
public function setDe... | true |
7b469d4f1109b6b2b7179a5b6261561e557f1995 | PHP | mathematicator-core/primi | /src/handlers/FunctionDefinition.php | UTF-8 | 868 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Smuuf\Primi\Handlers;
use \Smuuf\Primi\Structures\FuncValue;
use \Smuuf\Primi\Structures\FnContainer;
use \Smuuf\Primi\HandlerFactory;
use \Smuuf\Primi\Context;
use \Smuuf\Primi\Helpers\Common;
/**
* Node fields:
* function: Function name.
* args: List of arguments.
* body: Node representing cont... | true |
009332b8fae209ed8cbd002cb2659d16c113711c | PHP | nicoq07/web | /src/Form/ContactForm.php | UTF-8 | 1,326 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Form;
use Cake\Form\Form;
use Cake\Form\Schema;
use Cake\Validation\Validator;
use Cake\Mailer\Email;
class ContactForm extends Form
{
protected function _buildSchema(Schema $schema)
{
return $schema->addField('name', 'string')
->addField('email', ['type' => 'string']... | true |
2d2e44617ce660d8d477c1e3d5691d078d445727 | PHP | leandrofreires/remessa-bradesco | /src/Arquivo.php | UTF-8 | 6,994 | 2.671875 | 3 | [] | no_license | <?php
namespace Leandrofreires\RemessaBradesco;
use Exception;
/**
* Class Arquivo
* @package Leandrofreires\RemessaBradesco
*/
class Arquivo
{
/**
* @var
*/
private $header_label;
/**
* @var
*/
private $filename;
/**
* @var
*/
private $trailler;
/**
... | true |
9939b23dc2ee3dc240df769f9888fc30c18eaaac | PHP | apie-lib/type-juggling | /src/Factory/ReflectionTypeFactory.php | UTF-8 | 1,084 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Apie\TypeJuggling\Factory;
use ReflectionType;
final class ReflectionTypeFactory
{
private static $typeMapping = [];
private function __construct()
{
}
private static function getType(string $methodName): ReflectionType
{
if (isset(self::$typeMapping[$methodName])) ... | true |
acd4da0ec6b528b872c94e4356d2758ddaa810ee | PHP | apishka/tester | /source/Test/Php/Extension.php | UTF-8 | 1,005 | 2.53125 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace Apishka\Tester\Test\Php;
use Apishka\Tester\Exception;
use Apishka\Tester\Result;
use Apishka\Tester\TestAbstract;
/**
* Apishka tester test PHP extension
*/
class Extension extends TestAbstract
{
/**
* {@inheritdoc}
*/
public function getSupportedNames(... | true |
b44eeb0aec8bdaa63b56f80929c188064aca19c0 | PHP | DEMarquez/Programacion_2015-2016 | /PHP_2015-2016/Tema1/practica15.php | UTF-8 | 361 | 3.546875 | 4 | [] | no_license | <html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
<title>Practica 15</title>
</head>
<body>
<h2>Farenheit a Celsius</h2>
<?php
define("Farenheit", 50);
define("mensaje", "Esta es la temperatura en Grados Celsius: ");
echo mensaje;
$resta=Farenheit-32;
$division=$resta*5/9;... | true |
05a1221cbea2d610017cdda80490d27a47119e96 | PHP | fh32000/school-management-system | /app/Models/Attendance.php | UTF-8 | 1,888 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Traits\Uuids;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* App\Models\Attendance
*
* @property string $id
* @property string $student... | true |
b4d876f243ecb283f384fbe6c0385cc27149246f | PHP | suesdesign/WordPress_API_get_posts | /suesdesign_api.php | UTF-8 | 1,314 | 2.859375 | 3 | [] | no_license | <?php
/**
* @package Suesdesign API
* @version 1.0
*/
/*
Plugin Name: Suesdesign WordPress API Posts
Plugin URI: http://suesdesign.co.uk/
Description: Get posts using the WordPress API
Author: Sue Johnson
Version: 1.0
Author URI: http://suesdesign.co.uk/
*/
class Suesdesign_Get_Posts
{
// GET the remote site
... | true |
0eac237183437f19e5d206ecacb3d315b33af08c | PHP | nevintrianade/NevinTrianAdeP_E41182107_GolE_Praktikum3 | /praktikum 3/application/views/v_belajar.php | UTF-8 | 1,002 | 2.984375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<title>Cara Membuat View Pada CodeIgniter | MalasNgoding.com</title> <!-- menampilkan judul -->
</head>
<body>
<center> <h2><?php echo $judul; ?></h2> <!-- menampilkan judul yang sudah dideklarasikan -->
<h3><?php echo $tutorial; ?></h3> </center> <!-- menampilkan tutorial yang ... | true |
1955f39638fa98409fecb8034eac1f18f01f33d3 | PHP | braincrafted/validation-bundle | /Validator/Constraints/EnumValidator.php | UTF-8 | 1,266 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Braincrafted\Bundle\ValidationBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
/**
* EnumValidator
*
* @package BraincraftedValidationBundle
* @subpa... | true |
68d415725ff5422f8c3d83324f49fac0b4a5d5f8 | PHP | europaphp/skeleton | /src/Europa/Module/Exception/InvalidBootstrapperInstance.php | UTF-8 | 310 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Europa\Module\Exception;
class InvalidBootstrapperInstance extends \InvalidArgumentException
{
public function __construct($class)
{
parent::__construct(sprintf('The bootstrapper class "%s" must implement "Europa\Module\Bootstrapper\BootstrapperInterface".', $class));
}
} | true |
c03682352e333744078826062df4f3582a831fc1 | PHP | dandyraka/YaelahClan | /src/run.php | UTF-8 | 2,031 | 3.140625 | 3 | [] | no_license | <?php
require __DIR__.'/../vendor/autoload.php';
$c = new Colors\Color();
echo $c("== Yaelah Clan ==")->yellow()->center() . PHP_EOL;
echo $c("check social media username availability")->yellow()->center() . PHP_EOL;
echo "Your name : ";
$nama = strtolower(trim(fgets(STDIN)));
if(preg_match('/\s/', $nama))... | true |
36e77f8c9a9eee31bf0a3a8be2b922f569737e3a | PHP | ariela/wtf | /Wtf/Field.php | UTF-8 | 1,470 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* カスタムフィールドを定義する為の抽象クラス
*
* License:
*
* Copyright 2011 Takeshi Kawamoto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2... | true |
b642ffcdd68d90d78a6a79fbe20cdf62bb996e71 | PHP | broadway/broadway | /test/Broadway/Domain/MetadataTest.php | UTF-8 | 1,927 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the broadway/broadway package.
*
* (c) 2020 Broadway project
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Broadway\Domain;
use PHPUnit\Framework\TestCase;
c... | true |
e2d9e2385fe0cae7dbad6031a0c478a96ab988ac | PHP | kaaterskil/casales | /module/Application/src/Application/Service/TargetRetrieveMultipleByQuery.php | UTF-8 | 2,783 | 2.578125 | 3 | [] | no_license | <?php
/**
* Casales Library
*
* PHP version 5.4
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHA... | true |
51767f7d87370cf79cfec76986e2b9f3669b15cb | PHP | shigebeyond/skmvc | /system/classes/Interface/Db.php | UTF-8 | 3,562 | 3.140625 | 3 | [] | no_license | <?php defined('SYSPATH') OR die('No direct script access.');
/**
* 封装数据库连接
*
* // 获得 config/database.php 中配置的 master 数据库连接
* Db::instance('master')
*
* @Package package_name
* @category
* @author shijianhang
* @date 2016-10-11 上午12:06:58
*
*/
interface Interface_Db
{
/**
* 获得db单例
* @param string $g... | true |
c03920d16856cd4a75ae0aad7ea2fc69647398e6 | PHP | chiddy50/Vue-with-Symfony-project | /src/Entity/StaffInfo.php | UTF-8 | 5,049 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\StaffInfoRepository")
*/
class StaffInfo
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
... | true |
7b5ba25b1c59bacee99e4340cc6111ee18cc49d4 | PHP | mateoguzmana/ChampionshipGo | /api/controllers/persons.controller.php | UTF-8 | 1,611 | 3.234375 | 3 | [
"ISC",
"MIT"
] | permissive | <?php
require_once "../models/persons.class.php";
/* Método de tipo entero
para el login, se hace un switch para hacer cada caso.
*Registar el method será igual a 1.
*Actualizar el method será igual 2.
*Eliminar el method será igual a 3.
*Logueo será igual a 5.
*/
$persons = new persons();
$method = $_POST['met... | true |
1b9bfff8c223702af338d22ef045a133bd5bc983 | PHP | dabich/simple-store | /app/Models/Cart.php | UTF-8 | 1,864 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Models;
/**
* Class Cart
* @package App\Models
*/
class Cart
{
/**
* Get cart data
* @return array
*/
public static function getData()
{
return self::prepareCartData(session('cart'));
}
/**
* Add item to cart
* @param $product
*/
pu... | true |
538ec5be11d26f72ea19fe6b95dcf98fe64f31e5 | PHP | ctx2002/QUDV | /src/QUDV/QuantityKind/Height.php | UTF-8 | 455 | 2.9375 | 3 | [] | no_license | <?php
namespace QUDV\QuantityKind;
use QUDV\IQuantityKind;
class Height implements IQuantityKind
{
public function name(){
return "height";
}
public function symbol() {
return "H";
}
public function description() {
return "";
}
public function id() {
return $... | true |
da9f2092679e2b3a958102c93088ce816ba8c296 | PHP | Domingosj/jobPortal | /app/Models/FeaturedRecord.php | UTF-8 | 2,235 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\FeaturedRecord
*
* @property int $id
* @property int $owner_id
* @property string $owner_type
* @property int $user_id
* @property string|null $stripe_id
* @property string $start_time
* @property string $end_time
* @prope... | true |
c159a072d172fdea091a7a61db26720dfadb1d44 | PHP | ahmedsallam1/data-streaming-web-service | /src/Service/JsonParser.php | UTF-8 | 662 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Factory\JsonParserFactory;
class JsonParser
{
/**
* @var \Rodenastyle\StreamParser\Services\JsonCollectionParser
*/
private $parser;
/**
* @var array
*/
private $items = [];
public function __construct(JsonParserFactory $parser)
{
... | true |
fc1907fafc34ad88338baf061b0480b951e5bc34 | PHP | jmougin/WebService | /ajoutclient.php | UTF-8 | 720 | 2.703125 | 3 | [] | no_license | <?php
require_once("DemandeSimu.php");
require_once("databuilder.php");
class ajoutclient
{
/**
* ajout method
*
*@param string $n Nom de l'emprunteur
*@param string $p Prenom de l'emprunteur
*@param int $a Age de l'emprunteur
*@param string $ad Adresse de l'emprunteur
*@param string $v ville de l'emprunt... | true |
1f106e289b3f1bedd297751c0fe898fae1631b8b | PHP | varunswing/php | /random-number.php | UTF-8 | 561 | 3.359375 | 3 | [] | no_license | <?php
if(isset($_POST['roll'])){
$rand = rand(1, 6); //getrandmax(); function is used to get maximum value of randon number.
echo 'You rolled a '.$rand;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-sc... | true |
39d251b6151219ae42ff0599b851f17d14e5411c | PHP | trufelek/bomberwoman | /src/Controller/InterfaceController.php | UTF-8 | 1,475 | 2.609375 | 3 | [] | no_license | <?php
/**
* Interface controller
*
* PHP version 5
*
* This file contains controller of user interface.
*
* @category Controller
* @package Controller
* @author Aleksandra Wierzbiak
* @version 1.0
* @copyright Kraków, 09 September, 2014
* @link wierzba.wzks.uj.edu.pl/~12_wierzbiak
*/
namespa... | true |
6b374ffc800ee16d338bf7065d7b5013996eb34b | PHP | jasonbstanding/php-openapi | /tests/spec/MediaTypeTest.php | UTF-8 | 2,059 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use cebe\openapi\Reader;
use cebe\openapi\spec\MediaType;
use cebe\openapi\spec\Example;
use cebe\openapi\spec\Reference;
/**
* @covers \cebe\openapi\spec\MediaType
* @covers \cebe\openapi\spec\Example
*/
class MediaTypeTest extends \PHPUnit\Framework\TestCase
{
public function testRead()
{
/... | true |
748c59be81d124a58b684d0636061f185f6dee4a | PHP | zpeng/gateway | /old_code/included/classes/Shipping.php | UTF-8 | 4,105 | 2.890625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Shipping
*
* @author ziyang
*/
class Shipping {
//put your code here
private $_shipping_id;
private $_shipping_region_id;
private $_shipping_region;
private $_shipp... | true |
401311c5c875bbb1565b4580d526dedd68d463e5 | PHP | LucmanRoyJohairi/MiniStoreSystem | /resources/views/submit.php | UTF-8 | 755 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
//namespace App\Http\Controllers;
include('db_connection.php');
$user = $_POST["username"];
$pass = $_POST["password"];
$sql = "Select username,password from tblaccounts";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $... | true |
861b1bcbfbcd1a6388ea8e76f747a18ce127e901 | PHP | lucasBoisgard/css_generator | /src/makeSprite.php | UTF-8 | 2,197 | 2.59375 | 3 | [] | no_license | <?php
require("function_css_gen.php");
require ("my_scandir.php");
require ("loading.php");
/**
* @param string $image Image for check size
* @param bool $resize If is true resize all images
* @param int $resize_value Size used for resize all images
* @return array ... | true |
2adf1a45afa1e1b19c1899d524905aca238f7bab | PHP | benboute/hector | /Hector/init.php | UTF-8 | 638 | 2.671875 | 3 | [] | no_license | <?php
namespace Hector;
header( 'X-Powered-By: Hector' );
class PHPException extends \Exception
{
public static function handleError( $no, $message, $file, $line )
{
throw new self( $message );
}
}
function exceptionHandler( /*\Exception*/ $exception )
{
try
{
ob_end_clean();
}
catch( \Exception $e ) {}
... | true |
abbd2c250a9dcbdb8a898aa82330161e661f39b7 | PHP | purplefan/dcodes-bundle | /Generator/CodeGenerator.php | UTF-8 | 1,427 | 2.875 | 3 | [] | no_license | <?php
namespace GO\DCodesBundle\Generator;
use GO\DCodesBundle\Generator\GeneratorInterface;
use GO\DCodesBundle\Generator\EngineInterface;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\Security\Core\Exception\InvalidArgumentException;
/**
* Class DigitsLettersGenerator
* @author Grzegorz... | true |
a831d1916c41f28d208c87c6a5bb4ab906754537 | PHP | koenreiniers/sf-platform | /src-raw/Component/Bol/Plaza/Model/ProcessStatus.php | UTF-8 | 3,498 | 2.8125 | 3 | [] | no_license | <?php
namespace Raw\Component\Bol\Plaza\Model;
class ProcessStatus
{
/**
* @var int
*/
protected $id;
/**
* @var int
*/
protected $sellerId;
/**
* @var string|null
*/
protected $entityId;
/**
* @var string
*/
protected $eventType;
/**
... | true |
f8e15917803a9399927254ce062e1880e5a2996e | PHP | rigo42/Mirennay | /controlador/ProductoDetalleControlador.php | UTF-8 | 2,689 | 2.59375 | 3 | [] | no_license | <?php
//Imports
require_once 'modelo/productoDetalleModelo.php';
require_once 'controlador/productoFavoritoControlador.php';
require_once 'controlador/productoEstrellaControlador.php';
require_once 'controlador/productoCarritoControlador.php';
class productoDetalleControlador{
private $productoDetalleModel... | true |
a8ad20b295ebe63aca9e234238c67cd449db7857 | PHP | Gobie/debug | /src/Gobie/Debug/Dumpers/SplFileInfoDumper.php | UTF-8 | 3,306 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace Gobie\Debug\Dumpers;
use Gobie\Debug\Helpers;
/**
* SplFileInfo dumper.
*/
class SplFileInfoDumper extends ObjectDumper
{
/**
* Dumps file statistics.
*
* @param \SplFileInfo $var Soubor
* @param integer $level Level
* @param integer $depth Depth
* @pa... | true |
72b7798a52243eff5da4bb238098a39b2008d31b | PHP | codebinary/AngularJsCourse | /UniverApp2.0/UniverApp/php/servicios/alumnos.listado.php | UTF-8 | 573 | 2.609375 | 3 | [] | no_license | <?php
// Incluir la clase de base de datos
/*include_once("../lib/ezsql/ezsql.php");
$db = new ezSQL_mysql("root", "", "univer_db", "localhost");
$sql = "SELECT * FROM alumnos ORDER BY nombre ASC";
$resultado = $db->get_results($sql);
echo json_encode($resultado);*/
// Incluir la clase de base de datos
include_onc... | true |
c39c2ecd9219c9bc681d8718c28028b78b4b9825 | PHP | xiaoyiqingz/web_learn | /php/test9-SmartCat.class.php | UTF-8 | 402 | 3.609375 | 4 | [] | no_license | <?php
class SmartCat{
public function calc($num1, $num2,$oper) {
$res=0;
switch($oper) {
case '+': $res = $num1+$num2;
break;
case '-': $res = $num1-$num2;
break;
case '*': $res = $num1*$num2;
break;
case '/': $res = $num1/$num2;
break;
}
return $res... | true |
f0cc409c66e4ff60088f5174a13807518c61fcbd | PHP | lightory/Script-for-Algorithms-Coursera | /Week 1/script.php | UTF-8 | 1,701 | 3.484375 | 3 | [] | no_license | <?php
function conquer($arrA, $arrB) {
$count = 0;
$i = 0;
$j = 0;
$arr = [];
while (($i + $j) < (sizeof($arrA) + sizeof($arrB))) {
$a = PHP_INT_MAX;
$b = PHP_INT_MAX;
if ($i < sizeof($arrA)) {
$a = $arrA[$i];
}
if ($j < sizeof($arrB)) {
$b = $arrB[$j];
}
if ($a < $b) {
$arr[] = $a;
$... | true |
cdaa21c68c261b894b90453c3e2e18f2448cece9 | PHP | hassehulabeck/php-10p | /warmup-5/index.php | UTF-8 | 1,536 | 3.40625 | 3 | [] | no_license | <?php
// Slå på all felrapportering. Bra under utveckling, dåligt i produktion.
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$suits = array("Hearts", "Clubs", "Spades", "Diamonds");
$ranks = array("2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A");
$deck =... | true |
f420c9e5ae6ac3306b782c6f891ea864e5c8e671 | PHP | christianykyo/PHP-1-dan-2 | /PHP 1.2.php | UTF-8 | 147 | 2.953125 | 3 | [] | no_license | <?php
$name = "Chris";
function show_name() {
global $name;
echo "My name is ".$name. ".";
}
show_name();
?> | true |
0a8932aded3148edf1ec8bea712117c4c4b344b7 | PHP | reportico-web/reportico | /src/Authenticator.php | UTF-8 | 15,843 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Reportico\Engine;
/**
* Class Authenticator
*
* Base class for controlling access to Reportico functions
*/
class Authenticator extends ReporticoObject
{
const UNKNOWN_ROLE = 0;
const GUEST_ROLE = 1;
const USER_ROLE = 2;
const ADMIN_ROLE = 3;
//public const GUEST_ROLE = 1;
... | true |
ae2a617bedb9df6f8c886c60a353d64904f71d19 | PHP | bennettl/Panramic | /template/home/home.groupManage.php | UTF-8 | 1,331 | 2.6875 | 3 | [] | no_license | <?php
require_once('connect.php');
global $dbc, $current_user, $groupId;
// If the groupId isset, then the user is admin/officer of a selected group, else, the user is admin of only one group
if (isset($_POST['groupId'])){
$groupId = intval($_POST['groupId']);
} else {
$info = array();
if ($current_user->is_admin($i... | true |
377d2b0a0caefa65f1e4a7f4b23a8fa2e83dc643 | PHP | paulantezana/ong_demo | /models/Familia_model.php | UTF-8 | 7,035 | 2.578125 | 3 | [] | no_license | <?php
class Familia_model
{
private $db;
private $familias;
public function __construct($dbConexion)
{
$this->db = $dbConexion;
$this->familias = array();
}
public function Listar()
{
try {
$this->familias = array();
$consulta = $this->db->prepare(... | true |
5fffa5b02466447bad4a280ff0e1193bcd3f9c03 | PHP | montross50/prelude-database | /test/DsnParserTest.php | UTF-8 | 1,972 | 2.546875 | 3 | [] | no_license | <?php
namespace Prelude\Database;
class DsnParserTest extends \PHPUnit_Framework_TestCase {
private static $STR_CONFIG = array(
'driver' => 'driver',
'host' => 'host.tld',
'user' => 'u',
'pass' => 'p',
);
private static $ARR_CONFIG = array(
'driver' => 'pgsq... | true |
25cd55792d595f2491ceef7e12e9913e426a3e1c | PHP | iamazhi/azhibox | /business/suntech/include/fields/datetime/input.inc.php | UTF-8 | 164 | 2.671875 | 3 | [] | no_license |
function datetime($field, $value)
{
if($this->fields[$field]['dateformat'] == 'int')
{
return strtotime($value);
}
else
{
return $value;
}
}
| true |
8a1c1d3424ac8eb1663d07523f02482eb2fa625d | PHP | daniel-qwerty/villegas-aldazosa | /Com/Helper/Url.php | UTF-8 | 2,380 | 2.703125 | 3 | [] | no_license | <?php
class Com_Helper_Url extends Com_Object {
/**
*
* @access public
* @var String
*/
public $physicalDirectory;
/**
*
* @access public
* @var String
*/
public $urlBase;
/**
* @static
* @access public
* @return Com_Helper_Url
*/
... | true |
65ac2b148a9a833fd5bb419f48dfa10808d6a88e | PHP | IndraGunawan/CassandraBundle | /Cassandra/ORM/SchemaManager.php | UTF-8 | 2,334 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace CassandraBundle\Cassandra\ORM;
use CassandraBundle\Cassandra\Connection;
class SchemaManager
{
protected $connection;
public function __construct(Connection $connection)
{
$this->connection = $connection;
}
private function _exec($cql)
{
$statement = $this->c... | true |
2e9b748f2adf84b84eb19427f85e15b05e48f4b8 | PHP | LukeChaston/ToDoApp | /src/Classes/Hydrators/ToDoModel.php | UTF-8 | 502 | 2.75 | 3 | [] | no_license | <?php
namespace LukeNamespace\Models;
class ToDoModel
{
private $db;
public function __construct($db)
{
$this->db=$db;
}
public function addToDo()
{
$this->db=$db;
}
public function getAllToDos()
{
$this->db=$db;
}
public function setToDoComplete(... | true |
338310ccb8fe59b550b5907846d280310e1d43e8 | PHP | w1575/test-parser | /src/logger/LoggerInterface.php | UTF-8 | 1,159 | 3.203125 | 3 | [] | no_license | <?php
namespace App\logger;
/**
* Просто развлекаюсь с интерфейсом особо логики в нем искать не стоит
* @package App\logger
*/
interface LoggerInterface
{
public const TYPE_INFO = 'ERROR';
public const TYPE_WARNING = 'WARNING';
public const TYPE_ERROR = 'ERROR';
/**
* @param string $message ... | true |
022c3867d31c3fd05b589b151572824982e2129f | PHP | Le-Quynh-29/case_module2 | /src/Controller/StudentController.php | UTF-8 | 2,973 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Model\Student;
use App\Model\StudentModel;
class StudentController
{
public $studentModel;
public function __construct()
{
$this->studentModel = new StudentModel();
}
public function showStudent()
{
$students = $this->studentModel->sho... | true |
eb9e481bc43ba5d2fb6380f33f97ca79d30ad2a2 | PHP | alfalfarias/movired-laravel | /app/Http/Requests/AppRequest.php | UTF-8 | 2,233 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Services\TypeService;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Validation\Rule;
class AppRequest extends FormRequest
{
/**
* Determine if the use... | true |
db78b9093a61ef5c117765757aa5894864385de5 | PHP | meena304/DelishDreamDish | /database/migrations/2021_04_27_150232_create_deliveryboys_table.php | UTF-8 | 829 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDeliveryboysTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('deliverybo... | true |