当前位置: 首页>>代码示例>>PHP>>正文


PHP Query::acceptString方法代码示例

本文整理汇总了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();
 }
开发者ID:psychoticmeowArchives,项目名称:Imaje,代码行数:9,代码来源:border.php

示例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();
 }
开发者ID:psychoticmeowArchives,项目名称:Imaje,代码行数:9,代码来源:watermark.php

示例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();
 }
开发者ID:henrysingleton,项目名称:bridgettesingleton,代码行数:10,代码来源:shadow.php

示例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();
 }
开发者ID:psychoticmeowArchives,项目名称:Imaje,代码行数:10,代码来源:crop.php

示例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();
 }
开发者ID:psychoticmeowArchives,项目名称:Imaje,代码行数:14,代码来源:text.php

示例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();
}
/*---------------------------------------------------------------------------*/
开发者ID:psychoticmeowArchives,项目名称:Imaje,代码行数:29,代码来源:index.php


注:本文中的Query::acceptString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。