本文整理汇总了PHP中package函数的典型用法代码示例。如果您正苦于以下问题:PHP package函数的具体用法?PHP package怎么用?PHP package使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了package函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: package
function package($pattern, $destination, $recurse = false, $exclude = false)
{
global $root, $stage_path;
$search = $root . '/' . $pattern;
echo "Packaging " . $search . "\n";
foreach (glob($search, GLOB_BRACE | GLOB_NOSORT) as $file) {
if (is_file($file)) {
if ($exclude && exclude($exclude, $file)) {
continue;
}
if (!is_dir("{$stage_path}/{$destination}")) {
mkdir("{$stage_path}/{$destination}", 0777, true);
}
copy($file, $stage_path . '/' . $destination . '/' . basename($file));
}
}
if ($recurse) {
foreach (glob(dirname($search) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {
if ($exclude && exclude($exclude, $dir)) {
continue;
}
package(dirname($pattern) . '/' . basename($dir) . '/' . basename($pattern), $destination . '/' . basename($dir), $recurse - 1, $exclude);
}
}
}
示例2: packingData
<?php
require_once "functions.php";
$packing_array = packingData();
if (isset($_GET["pakitud"])) {
$package_id = $_GET["pakitud"];
package($package_id);
}
?>
<html>
<body>
<table border="1">
<?php
for ($i = 0; $i < count($packing_array); $i++) {
echo "<tr>";
echo "<input type='hidden' name='id' value='" . $packing_array[$i]->id . "'>";
echo "<td>" . $packing_array[$i]->kirjeldus . "</td>";
echo "<td>" . $packing_array[$i]->korpus . "</td>";
echo "<td>" . $packing_array[$i]->kuvar . "</td>";
echo "<td>" . $packing_array[$i]->pakitud . "</td>";
echo "<td><a href='?pakitud=" . $packing_array[$i]->id . "'>Pakitud</a></td>";
}
?>
</table>
</body>
</html>
示例3: package
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MOVINPIXEL AND ITS 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 SHALL MOVINPIXEL OR ITS CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
package('mango.system');
/**
*
*
* @author Jader Feijo <jader@movinpixel.com>
*
* @license MIT
*
* @package mango.system
*
*/
class MMutableString extends MString
{
//
// ************************************************************
//
示例4: package
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MOVINPIXEL AND ITS 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 SHALL MOVINPIXEL OR ITS CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
package('mango.system.io');
import('mango.system.*');
import('mango.system.exceptions.*');
/**
*
*
* @author Jader Feijo <jader@movinpixel.com>
*
* @license MIT
*
* @package mango.system.io
*
*/
abstract class MOutputStream extends MStream
{
//
示例5: package
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// $Id: AllAmpolirosDatatransferTests.php,v 1.2 2004-07-08 15:04:26 alex Exp $
/**
* @package com.solarix.ampoliros.tests.datatransfer
* @author Alex Pagnoni <alex.pagnoni@solarix.it>
* @copyright Copyright 2000-2004 Solarix Srl
* @since 4.0
*/
package('com.solarix.ampoliros.tests.datatransfer');
import('carthag.dev.unit.framework.TestSuite');
import('com.solarix.ampoliros.tests.datatransfer.ClipboardTest');
/**
* @package com.solarix.ampoliros.tests.datatransfer
* @author Alex Pagnoni <alex.pagnoni@solarix.it>
* @copyright Copyright 2000-2004 Solarix Srl
* @since 4.0
*/
class AllAmpolirosDatatransferTests extends Object
{
public static function suite()
{
$suite = new TestSuite('AmpolirosDatatransfer');
$suite->addTestSuite(new ReflectionClass('ClipboardTest'));
return $suite;
示例6: package
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// $Id: XmlRpcUser.php,v 1.3 2004-07-08 15:04:26 alex Exp $
package('com.solarix.ampoliros.webservices.xmlrpc');
import('com.solarix.ampoliros.io.log.Logger');
/*!
@class XmlRpcUser
@abstract XML RPC interface users.
*/
class XmlRpcUser extends Object
{
var $mLog;
var $mAmpDb;
var $mUserId;
var $mProfileId = 0;
var $mSiteId = 0;
/*!
@function XmlRpcUser
示例7: package
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MOVINPIXEL AND ITS 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 SHALL MOVINPIXEL OR ITS CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
package('mango.system.exceptions');
import('mango.system.*');
import('mango.system.io.*');
/**
*
* @author Jader Feijo <jader@movinpixel.com>
*
* @package mango.system.exceptions
*
*/
class MFileNotFoundException extends MException
{
protected $filePath;
public function __construct(MString $filePath, MException $previous = null)
{
parent::__construct(Sf("File at path '%s' could not be found!", $filePath), MException::FILE_NOT_FOUND_EXCEPTION, $previous);
示例8: package
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// $Id: HuiDispatcher.php,v 1.10 2004-07-08 15:04:26 alex Exp $
package('com.solarix.ampoliros.hui');
/*!
@class HuiDispatcher
@abstract Hui events dispatcher.
@discussion Hui events dispatcher.
*/
class HuiDispatcher extends Object
{
/*! @var mName string - Dispatcher name. */
private $mName;
/*! @var mEvents array - Array of the event functions. */
public $mEvents = array();
/*! @var mDispatched bool - True when the events have been dispatched. */
private $mDispatched;
/*!
@function HuiDispatcher
示例9: package
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// $Id: RecordSet_odbc.php,v 1.3 2004-07-08 15:04:23 alex Exp $
package('com.solarix.ampoliros.db.drivers.odbc');
import('com.solarix.ampoliros.db.RecordSet');
class recordset_pgsql extends recordset
{
var $suppseek = true;
var $_start = false;
function _Init()
{
$this->resultrows = @pg_numrows($this->resultid);
$this->resultfields = @pg_numfields($this->resultid);
}
function _Seek($row)
{
$this->currentrow = $row;
return true;
}
示例10: package
* Ampoliros Application Server
*
* http://www.ampoliros.com
*
*
*
* Copyright (C) 2000-2004 Solarix
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// $Id: HuiAuthHelper.php,v 1.5 2004-07-14 15:16:44 alex Exp $
package('com.solarix.ampoliros.hui.helpers');
import('com.solarix.ampoliros.hui.mvc.HuiRequest');
import('com.solarix.ampoliros.hui.mvc.HuiResponse');
interface HuiAuthHelper
{
public function auth(HuiRequest $request, HuiResponse $response);
}
示例11: package
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MOVINPIXEL AND ITS 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 SHALL MOVINPIXEL OR ITS CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
package('mango.data');
import('mango.system.*');
/**
* Class that describes an entity's property
*
* This class holds and manages the information necessary to describe
* an entity's property
*
* @author Jader Feijo <jader@movinpixel.com>
*
* @license MIT
*
* @package mango.data
*
*/
class MEntityDescriptionProperty extends MEntityDescriptionAttribute
示例12: switch
#
#
require "../settings.php";
require "../core-settings.php";
require "../libs/ext.lib.php";
## Decide
if (isset($_POST["key"])) {
switch ($_POST["key"]) {
case "process":
$OUTPUT = process($_POST);
break;
case "confirm":
$OUTPUT = confirm($_POST);
break;
case "pack":
$OUTPUT = package($_POST);
break;
default:
$OUTPUT = slctEmployee();
}
} else {
$OUTPUT = slctEmployee();
}
require "../template.php";
function mlist($name, $curr = "")
{
$month = 1;
$months = array("1", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$list = "<select name={$name}>";
while ($month <= 12) {
if ($month == $curr) {
示例13: package
<?php
/**
* Description of ContrPerro
*
* @author ubuntu
*/
require_once Controller_php;
package("pack1");
import("Perro");
class ContrPack1 extends Controller
{
/**
*
* @return Pack1
*/
public static function getInstance()
{
return parent::getInstance();
}
public function getPerro(Procedure &$pro, int $perroid)
{
$p = Perro::persistence();
$perro = $pro->declare_var('per', new RowType($p));
$pro->select($p->id, $p->nombre, $p->persona_id)->from($p)->where(c($p->id = $perroid))->into($perro);
return $perro;
}
public function getPerros(Procedure &$pro)
{
$p = Perro::persistence();
$pro->returns(new RowType($p));
示例14: package
<?php
package('musicpd', ["emerge/use" => "vorbis"])->install();
service('musicpd')->enable()->requires(package('musicpd'));
示例15: package
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
// $Id: ModuleConfig.php,v 1.6 2004-07-08 15:04:25 alex Exp $
package('com.solarix.ampoliros.module');
/*!
@abstract Module configuration handling.
*/
class ModuleConfig extends Object
{
/*! @var ampdb dblayer class - Ampoliros database handler. */
private $ampdb;
/*! @var modname string - Module name. */
private $modname;
/*!
@param ampdb dblayer class - Ampoliros database handler.
@param modname string - Module name.
*/
public function ModuleConfig(DBLayer $ampdb, $modname)
{