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


PHP Common::error方法代码示例

本文整理汇总了PHP中Common::error方法的典型用法代码示例。如果您正苦于以下问题:PHP Common::error方法的具体用法?PHP Common::error怎么用?PHP Common::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Common的用法示例。


在下文中一共展示了Common::error方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Start the generation process.
  *
  * @return void
  */
 public function __construct($args)
 {
     parent::__construct($args);
     // we need a controller name
     if ($this->lower == null) {
         Common::error('You must specify a bundle name.');
     }
     // add the directory copy to the writer
     $this->writer->copy_directory('Bundle', $this->lower, Bundle::path('bob') . 'templates/bundle', path('bundle') . $this->lower);
     $this->writer->write();
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:16,代码来源:bundle.php

示例2: __construct

 /**
  * Start the generation process.
  *
  * @return void
  */
 public function __construct($args)
 {
     parent::__construct($args);
     // we need a task name
     if ($this->class == null) {
         Common::error('You must specify a task name.');
     }
     // set switches
     $this->_settings();
     // start the generation
     $this->_task_generation();
     // write filesystem changes
     $this->writer->write();
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:19,代码来源:task.php

示例3: __construct

 /**
  * Start the generation process.
  *
  * @return void
  */
 public function __construct($args)
 {
     parent::__construct($args);
     // we need a controller name
     if ($this->class == null) {
         Common::error('You must specify a model name.');
     }
     // load any command line switches
     $this->_settings();
     // start the generation
     $this->_model_generation();
     // write filesystem changes
     $this->writer->write();
 }
开发者ID:downleave,项目名称:blog,代码行数:19,代码来源:model.php

示例4: reviewsFormation

                <?php 
include_once 'header.php';
?>

                <!-- page content -->
                <div class="content-wrap">
                    <div class="content-left">
                        <?php 
include_once 'nav-airport.php';
?>
                    </div>
                    <div class="content-right">
                        <?php 
if (!$airport->exists()) {
    Common::error("Error: Airport could not be found!");
}
?>

          <section class="airport-reviews">
            <?php 
$data = new reviewsFormation();
$exisitng = true;
$reviewsEntries = $data->joinTables();
echo '<h2>Reviews for ' . $airport->name() . '</h2><br>';
if (isset($_SESSION["username"])) {
    echo '<p><a href="title_content_uploader.php"><span style="font-weight:bold">Submit a new Review for ' . $airport->name() . '</span></a></p><br>';
    echo '<p><a href="protected_page.php"><span style="font-weight:bold">Go to My Reviews</span></a></p><br>';
}
if (count($reviewsEntries) != 0) {
    foreach ($reviewsEntries as $blog) {
开发者ID:epolixa,项目名称:cs546,代码行数:30,代码来源:reviews.php

示例5: urlencode

                echo "<td>" . $flight->arrival_time() . "</td>";
                echo "<td>" . $flight->status() . "</td>";
                echo "<td> <a href='flightsAdmin.php?step=editFlight&flight_number=" . urlencode($flight->flight_number()) . "'>EDIT</a> <a href='flightsAdmin.php?step=deleteFlight&flight_number=" . urlencode($flight->flight_number()) . "'>DELETE</a></td>";
                echo "</tr>";
            }
        } else {
            echo "<tr><td colspan='7'><center>There aren't any flights at this time.</center></td></tr> ";
        }
        ?>
            </table>
            <br>
            <br>
            <div style="text-align: right" ><a href="flightsAdmin.php?step=createFlight">+ Add New</a></div>
<?php 
    }
} else {
    Common::error("You're not allowed to access this page!");
}
?>

            </div>
    </div>

    <?php 
include_once 'footer.php';
?>

        </div>
</body>
</html>
开发者ID:epolixa,项目名称:cs546,代码行数:30,代码来源:flightsAdmin.php

示例6: __construct

 /**
  * Determine class names, identifiers and arguments based on the args
  * passed by the build script.
  *
  * @param array Arguments to the build script.
  * @return void
  */
 public function __construct($args)
 {
     // we need a writer object for file system changes
     $this->writer = new Writer();
     // set default args
     $this->args = $args;
     // if we got an argument
     if (isset($args[0])) {
         // check to see if its bundle prefixed
         if (strstr($args[0], '::')) {
             $parts = explode('::', $args[0]);
             // if we have a bundle and a class
             if (count($parts) == 2 && $parts[0] !== '') {
                 $this->bundle = Str::lower($parts[0]);
                 if (!Bundle::exists($this->bundle)) {
                     Common::error('The specified bundle does not exist, or is not loaded.');
                 }
                 // remove the bundle section, we are done with that
                 $args[0] = $parts[1];
             }
         } else {
             // use the application folder if no bundle
             $this->bundle = DEFAULT_BUNDLE;
         }
         // set bundle path from bundle name
         $this->bundle_path = Bundle::path($this->bundle);
         // if we have a multi-level path
         if (strstr($args[0], '.')) {
             $parts = explode('.', $args[0]);
             // form the class prefix as in Folder_Folder_Folder_
             $this->class_prefix = Str::classify(implode('_', array_slice($parts, 0, -1)) . '_');
             // form the path to the class
             $this->class_path = Str::lower(implode('/', array_slice($parts, 0, -1)) . '/');
             // unaltered case class
             $this->standard = $parts[count($parts) - 1];
             // lowercase class
             $this->lower = Str::lower($parts[count($parts) - 1]);
             // get our class name
             $this->class = Str::classify($parts[count($parts) - 1]);
         } else {
             // unaltered case class
             $this->standard = $args[0];
             // lowercase class
             $this->lower = Str::lower($args[0]);
             // get our class name
             $this->class = Str::classify($args[0]);
         }
     }
     // pass remaining arguments
     $this->arguments = array_slice($args, 1);
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:58,代码来源:generator.php

示例7: _copy_dirs

 /**
  * Copy a directory of templates to a destination.
  *
  * <code>
  * $this->_dircopy[] = array(
  * 		'type' 			=> 'View',
  *   	'name' 			=> 'Descriptive identifier shown to terminal.',
  *    	'source' 		=> 'the/location/to/copy/from',
  *     	'destination' 	=> 'the/location/to/copy/to'
  * );
  * </code>
  *
  * @return void
  */
 private function _copy_dirs()
 {
     // loop through dirs to copy
     foreach ($this->_dircopy as $dir) {
         // if force is set we overwrite anyway
         if (!is_dir($dir['destination']) and Common::config('force') == false) {
             if (!Common::config('pretend')) {
                 File::cpdir($dir['source'], $dir['destination']);
             }
             // log something pretty to the terminal
             Common::log("{c}({g}~{c}) {y}{$dir['type']}\t\t{w}{$dir['name']}");
         } else {
             // we cant copy if its already there
             Common::error('The directory \'' . $dir['name'] . '\' already exists.');
         }
     }
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:31,代码来源:writer.php

示例8: getAirport

 private function getAirport($id)
 {
     $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT);
     $stmt = $this->db->send_sql("SELECT * FROM airports WHERE id='{$id}'");
     if ($stmt->num_rows > 0) {
         //AIRPORT EXISTS
         //fetch info from the db
         $info = $stmt->fetch_array(MYSQLI_ASSOC);
         //populate class with contents
         $this->id = $info['id'];
         $this->name = $info['name'];
         $this->history = $info['history'];
         $this->parking = $info['parking'];
         $this->faq = $info['faq'];
         $this->contact = $info['contact'];
         $stmt->close();
     } else {
         //AIRPORT NOT FOUND
         Common::error("Error: Airport could not be found!");
     }
 }
开发者ID:epolixa,项目名称:cs546,代码行数:21,代码来源:Airport.php


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