本文整理汇总了PHP中Query::acceptString方法的典型用法代码示例。如果您正苦于以下问题:PHP Query::acceptString方法的具体用法?PHP Query::acceptString怎么用?PHP Query::acceptString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Query
的用法示例。
在下文中一共展示了Query::acceptString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($settings)
{
$query = new Query($settings, array('fg' => '000000', 'style' => 'solid', 'size' => 1, 'offset' => 0));
$query->acceptString('fg', '/^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/');
$query->acceptString('style', '/^(solid|dashed|dashed-long|dotted)$/');
$query->acceptInteger('size', '/^[1-9][0-9]*$/');
$query->acceptInteger('offset', '/^[0-9]+$/');
$this->settings = $query->results();
}
示例2: __construct
public function __construct($settings)
{
$query = new Query($settings, array('file' => '', 'margin' => 0, 'xalign' => 'center', 'yalign' => 'center'));
$query->acceptString('file', '/.+$/');
$query->acceptInteger('margin', '/^[0-9]+$/');
$query->acceptString('xalign', '/^(left|center|right)$/');
$query->acceptString('yalign', '/^(top|center|bottom)$/');
$this->settings = $query->results();
}
示例3: __construct
public function __construct($settings)
{
$query = new Query($settings, array('bg' => 'aaaaaa', 'radius' => 10, 'colour' => '000000', 'xoffset' => 25, 'yoffset' => 50));
$query->acceptString('bg', '/^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/');
$query->acceptInteger('radius', '/^[1-9][0-9]*$/');
$query->acceptString('shadow', '/^([0-9a-f]{3}|[0-9a-f]{6})$/');
$query->acceptInteger('xoffset', '/^[1-9][0-9]*$/');
$query->acceptInteger('yoffset', '/^[1-9][0-9]*$/');
$this->settings = $query->results();
}
示例4: __construct
public function __construct($settings)
{
$query = new Query($settings, array('bg' => 'ffffff', 'width' => 0, 'height' => 0, 'xalign' => 'center', 'yalign' => 'center'));
$query->acceptString('bg', '/^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/');
$query->acceptInteger('width', '/^[1-9][0-9]*$/');
$query->acceptInteger('height', '/^[1-9][0-9]*$/');
$query->acceptString('xalign', '/^(left|center|right)$/');
$query->acceptString('yalign', '/^(top|center|bottom)$/');
$this->settings = $query->results();
}
示例5: __construct
public function __construct($settings)
{
$query = new Query($settings, array('bg' => 'ffffff', 'fg' => '00000000', 'font' => '', 'size' => 10, 'text' => '', 'margin' => 0, 'padding' => 1, 'xalign' => 'center', 'yalign' => 'center'));
$query->acceptString('bg', '/^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/');
$query->acceptString('fg', '/^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/');
$query->acceptString('font', '/.+$/');
$query->acceptInteger('size', '/^[1-9][0-9]*$/');
$query->acceptString('text', '/.+$/');
$query->acceptInteger('margin', '/^[0-9]+$/');
$query->acceptInteger('padding', '/^[1-9][0-9]*$/');
$query->acceptString('xalign', '/^(left|center|right)$/');
$query->acceptString('yalign', '/^(top|center|bottom)$/');
$this->settings = $query->results();
}
示例6: Query
<?php
/*---------------------------------------------------------------------------*/
include_once './includes/query.php';
include_once './includes/image.php';
include_once './includes/filter.php';
include_once './includes/colour.php';
/*---------------------------------------------------------------------------*/
$query = new Query($_GET, array('path' => '', 'file' => '', 'filter' => 'unknown'));
$query->acceptString('file', '/.+$/');
$query->acceptString('path', '/.+$/');
$query->acceptString('filter', '/^[a-z0-9\\-]+$/');
$query = $query->results();
/*---------------------------------------------------------------------------*/
try {
$nocache = isset($_GET['nocache']);
$image = new Image($query);
$filter = new Filter($query);
// Regenerate?
if (!$image->cached($filter) or $nocache) {
$filter->apply($image);
$image->write();
}
$image->read($nocache);
} catch (Exception $error) {
header('content-type: text/html');
echo $error->getMessage();
}
/*---------------------------------------------------------------------------*/