本文整理汇总了PHP中y函数的典型用法代码示例。如果您正苦于以下问题:PHP y函数的具体用法?PHP y怎么用?PHP y使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了y函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: y
function y($param = NULL, ...$params)
{
if (func_num_args() == 0) {
return NULL;
}
// take the yolo pill and you will see how far the rabbit hole goes
return cons::cons($param, empty($params) ? NULL : y(...$params));
}
开发者ID:TazeTSchnitzel,项目名称:yolo,代码行数:8,代码来源:yolisp.php
示例2: rushcalendarservice
function rushcalendarservice($config)
{
$y = m() >= $config['dates']['winter']['interest_begin_month'] ? y() + 1 : y();
$winter_season = m() >= $config['dates']['winter']['interest_begin_month'] || m() <= $config['dates']['winter']['interest_end_month'];
$semester = $winter_season ? "winter" : "fall";
$dates = $config['dates'][$semester];
return calendarservice(time(), $y, $dates['period_begin_month'], $dates['period_begin_day'], $y, $dates['period_end_month'], $dates['period_end_day'], "&q=" . urlencode($config['api_query_string']));
}
开发者ID:gapoorva,项目名称:thetatauwebsite16,代码行数:8,代码来源:rushcalendar-service.php
示例3: f
function f()
{
$a = 1;
$b = 2;
$c = 3;
y($a, $b);
$d = 4;
q($c);
}
开发者ID:Halfnhav4,项目名称:pfff,代码行数:9,代码来源:liveness.php
示例4: yolo
function yolo(...$args)
{
static $lo = false;
if ($lo) {
throw new YoloException("YOLO");
} else {
$lo = true;
}
return yolisp(y(y('lambda', y('controller'), y('let', y(y('request', y(y('::', Request::class, 'createFromGlobals'))), y(pack('H*', base_convert('111001001100101011100110111000001101111011011100111001101100101', 2, 16)), y('controller', 'request'))), y(y('->', 'response', 'send')))), ...$args));
}
开发者ID:TazeTSchnitzel,项目名称:yolo,代码行数:10,代码来源:yolo.php
示例5: actionCreateAjax
/**
* Creates a new Messages model.
* If creation is successful, the response will be a 'success'=true.
* @return mixed
*
* $(document).on('submit','#messages-form',function(e) {
* e.preventDefault();
* var $form = $(this);
* $.ajax({
* url: '<?php echo y('.urlManager')->createUrl("/contact/default/create-ajax");?>',
* dataType: 'json',
* type: 'post',
* data: $form.serialize(),
* success: function (data){
*
* console.log(data);
*
* $.each($form.serializeArray(), function(index, name) {
* $('[name='+name.name+']')
* .parent()
* .find('#validate-'+name.name)
* .remove();
* });
*
* if(data.success) {
* // here submit
* alert(data.message);
*
* } else {
*
* $.each(data.data, function(name, errors) {
* $('[name='+name+']')
* .parent()
* .append($('<p id="validate-'+name+'" class="help-block text-danger">'+errors.join(',<br>')+'</p>'));
* });
* }
* }
* });
* });
*
*/
public function actionCreateAjax()
{
y('.response')->format = 'json';
$model = new Messages();
$model->attributes = $_REQUEST;
if ($model->save()) {
return ['success' => 1, 'data' => $model, 'message' => y('app', 'Message sent, Thanks for contact us')];
} else {
return ['success' => 0, 'data' => $model->getErrors()];
}
}
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:52,代码来源:DefaultController.php
示例6: x
function x($name, $value = nil)
{
if ($value !== nil) {
$GLOBALS["VARS"][$name] = $value;
return $value;
}
if (array_key_exists($name, $GLOBALS["VARS"])) {
return $GLOBALS["VARS"][$name];
}
if (array_key_exists($name, $_POST)) {
return y($_POST[$name], false);
}
return null;
}
开发者ID:Rastrian,项目名称:Donationraptor,代码行数:14,代码来源:init.php
示例7: v
function v($b)
{
$c = y($b);
$a = sizeof($c);
$d = ($a + 1) / 2;
$e = array();
for ($h = 0; $h < $a; ++$h) {
array_push($e, $c[$h + 1] - 96);
}
$f = array_reverse($e);
$g = array();
for ($h = 0; $h < $a; ++$h) {
array_push($g, ~$f[($d + $h) % $a]);
}
return $g;
}
开发者ID:bontiv,项目名称:intrateb,代码行数:16,代码来源:functions.php
示例8: y
<?php
$x = 7;
function y()
{
unset($GLOBALS["x"]);
}
y();
var_dump($x);
开发者ID:michaelprem,项目名称:phc,代码行数:9,代码来源:unset_global_array.php
示例9: static
<?php
[new static(), $method];
x(new static());
y(new static());
开发者ID:exakat,项目名称:exakat,代码行数:5,代码来源:_Static.14.php
示例10: attributeLabels
/**
* @inheritdoc
*/
public function attributeLabels()
{
return ['id' => y('app', 'ID'), 'title' => y('app', 'Title'), 'image' => y('app', 'Image'), 'description' => y('app', 'Description'), 'price' => y('app', 'Price'), 'products_packages_id' => y('app', 'Products Packages ID'), 'orden_id' => y('app', 'Orden ID')];
}
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:7,代码来源:BaseLists.php
示例11: loop
$n = $x % 8;
$lhs = loop(function ($x, $m) use($n) {
return [$m >= $n, snoc($m, $x)];
}, []);
$rhs = upto($n + 1);
return $lhs === $rhs ? 0 : dump(get_defined_vars());
}, 'y1' => function ($x) {
$n = $x % 4;
return y(function ($f, $m) use($n) {
return $m === $n ? $m : $f($m + 1);
}, 0) !== $n;
}, 'stream_take1' => function ($x) {
$n = $x % 8;
$lhs = upto($n);
$rhs = stream_take($n, y(function ($f, $n, $_) {
return [$n, $f($n + 1)];
}, 0));
return $lhs === $rhs ? 0 : dump(get_defined_vars());
}, 'tabulate1' => function ($a, $b, $c, $d, $e, $f) {
$result = tabulate($a, $b, [$c => $d, $e => $f]);
return strpos($result, "{$c} {$d}") === FALSE;
}, 'tabulate2' => function ($a, $b, $c, $d, $e, $f) {
$result = tabulate($a, [$b], [$c => $d]);
return strpos($result, "{$a} {$b}") === FALSE;
}, 'fanout' => function ($x) {
list($s, $m) = fanout(['strval', 'minus'], $x);
if ($s !== strval($x)) {
return true;
}
if ($m !== -1 * $x) {
return true;
开发者ID:Warbo,项目名称:php-prelude,代码行数:31,代码来源:tests.php
示例12: array
<div class="row">
<div class="col-lg-6">
<?php
echo $form->field($model, 'name')->widget(y('TextField')->class, ['allowed' => 255, 'options' => array('class' => 'form-control')]);
?>
</div>
<div class="col-lg-6">
<?php
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>
</div>
<div class="col-lg-6">
<?php
echo $form->field($model, 'image')->widget(y('Upload')->class, ['allowedExtensions' => array('png', 'jpg', 'jpeg'), 'actionUrl' => y('.urlManager')->createUrl($this->context->module->id . '/' . $this->context->id . '/upload')]);
?>
</div>
</div>
<div class="form-group text-right">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="fa fa-save"></i> ' . 'Create' : '<i class="fa fa-save"></i> ' . 'Update', ['class' => 'btn btn-primary']);
?>
<?php
echo Html::a('<i class="fa fa-chevron-left"></i> ' . 'Back', ['index'], ['class' => 'btn btn-default']);
?>
</div>
<?php
ActiveForm::end();
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:31,代码来源:_form.php
示例13: y
开发者ID:exakat,项目名称:exakat,代码行数:3,代码来源:_Clone.08.php
示例14:
?>
<?php
if ($data->name === 'root') {
continue;
}
?>
<tr>
<td>
<?php
echo $data->name;
?>
</td>
<td class="text-right">
<?php
if (y('.authManager')->checkAccess($user->id, $data->name)) {
?>
<a href="#" class="btn btn-success">Enabled</a>
<?php
} else {
?>
<a href="#" class="btn btn-danger">Disabled</a>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</table>
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:31,代码来源:update.php
示例15: actionCreateAjax
/**
* Creates a new Lists model.
* If creation is successful, the response will be a 'success'=true.
* @return mixed
*
* $(document).on('submit','#lists-form',function(e) {
* e.preventDefault();
* var $form = $(this);
* $.ajax({
* url: '<?php echo y('.urlManager')->createUrl("/module/controller/create-ajax");?>',
* dataType: 'json',
* type: 'post',
* data: $form.serialize(),
* success: function (data){
*
* console.log(data);
*
* $.each($form.serializeArray(), function(index, name) {
* $('[name='+name.name+']')
* .parent()
* .find('#validate-'+name.name)
* .remove();
* });
*
* if(data.success) {
* $form[0].reset();
* bootbox.alert(data.message);
*
* } else {
*
* $.each(data.data, function(name, errors) {
* $('[name='+name+']')
* .parent()
* .append($('<p id="validate-'+name+'" class="help-block text-danger">'+errors.join(',<br>')+'</p>'));
* });
* }
* }
* });
* });
*
*/
public function actionCreateAjax()
{
y('.response')->format = 'json';
$model = new Lists();
$model->attributes = $_REQUEST;
if ($model->save()) {
return ['success' => 1, 'data' => $model, 'message' => y('app', 'Record created!')];
} else {
return ['success' => 0, 'data' => $model->getErrors()];
}
}
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:52,代码来源:ListsController.php
示例16: attributeLabels
/**
* @inheritdoc
*/
public function attributeLabels()
{
return ['id' => y('app', 'ID'), 'name' => y('app', 'Name'), 'owner' => y('app', 'Owner'), 'email' => y('app', 'Email'), 'phone' => y('app', 'Phone'), 'money' => y('app', 'Money'), 'info' => y('app', 'Info'), 'files' => y('app', 'Files')];
}
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:7,代码来源:BasePackages.php
示例17: array
<div class="col-lg-6">
<?php
echo $form->field($model, 'image')->widget(y('Upload')->class, ['allowedExtensions' => array('png', 'jpg', 'jpeg'), 'actionUrl' => y('.urlManager')->createUrl($this->context->module->id . '/' . $this->context->id . '/upload')]);
?>
</div>
<!--
<div class="col-lg-6">
<?php
echo $form->field($model, 'products_packages_id')->widget(y('TextField')->class, ['allowed' => 11, 'options' => array('class' => 'form-control')]);
?>
</div>
<div class="col-lg-6">
<?php
echo $form->field($model, 'orden_id')->widget(y('TextField')->class, ['allowed' => 11, 'options' => array('class' => 'form-control')]);
?>
</div>
-->
</div>
<div class="form-group text-right">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="fa fa-save"></i> ' . 'Create' : '<i class="fa fa-save"></i> ' . 'Update', ['class' => 'btn btn-primary']);
?>
<?php
echo Html::a('<i class="fa fa-chevron-left"></i> ' . 'Back', ['index'], ['class' => 'btn btn-default']);
?>
</div>
<?php
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:31,代码来源:_form.php
示例18:
<?php
$z = @y(1) . "a" . $c;
开发者ID:exakat,项目名称:exakat,代码行数:3,代码来源:Concatenation.15.php
示例19: ZZx
function ZZx($ZZZZk)
{
global $u, $b;
$ZZZZi = n($ZZZZk);
$ZZZZj = $u['www'] . substr($ZZZZi, strlen($u['sys']), strlen($ZZZZi));
if ($b['urlStyle'] == 1) {
$ZZZZj = y($ZZZZj);
}
return $ZZZZj;
}
开发者ID:rribbonss,项目名称:rribbonss.github.io,代码行数:10,代码来源:wimpy.php
示例20: y
<?php
echo Html::a('<i class="fa fa-chevron-left"></i> ' . Yii::t('app', 'Back'), ['index'], ['class' => 'btn btn-default']);
?>
</div>
<?php
echo y('TextField')->widget(['model' => $model, 'attribute' => 'name', 'allowed' => 255, 'options' => array('class' => 'form-control')]);
?>
<?php
echo y('TextArea')->widget(['model' => $model, 'attribute' => 'description', 'options' => array('class' => 'form-control')]);
?>
<?php
echo y('Upload')->widget(['model' => $model, 'attribute' => 'image', 'allowedExtensions' => array('png', 'jpg', 'jpeg'), 'actionUrl' => y('.urlManager')->createUrl('upload')]);
?>
<div class="form-group text-right">
<?php
echo Html::submitButton($model->isNewRecord ? '<i class="fa fa-save"></i> ' . Yii::t('app', 'Create') : '<i class="fa fa-save"></i> ' . Yii::t('app', 'Update'), ['class' => 'btn btn-primary']);
?>
<?php
echo Html::a('<i class="fa fa-chevron-left"></i> ' . Yii::t('app', 'Back'), ['index'], ['class' => 'btn btn-default']);
?>
</div>
<?php
ActiveForm::end();
?>
开发者ID:pointdnd,项目名称:yii2-modular,代码行数:30,代码来源:_form.php
注:本文中的y函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论