Location: PHPKode > projects > Stickleback > stickleback-1.10.0/stickleback/Descriptor.php
<?php

/**
 * Abstract class that holds information about plugin (class) or extension point (interface) 
 *
 *
 * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.
 * The copyrights embodied in the content of this file are licensed under the BSD
 * open source license
 *
 * @package    stickleback
 * @subpackage plugin
 * @author     Matt Zandstra <hide@address.com>
 * @version    CVS: $Id: Descriptor.php,v 1.10 2008-07-22 23:52:24 zandstra Exp $
 */

/**
 * requires
 */
require_once("stickleback/DescriptorVisitor.php");

/**
 * Abstract class that holds information about plugin (class) or extension point (interface)
 * 
 * @package    stickleback
 * @subpackage plugin
 * @author     Matt Zandstra <hide@address.com>
 * @version    CVS: $Id: Descriptor.php,v 1.10 2008-07-22 23:52:24 zandstra Exp $
 */
abstract class stickleback_Descriptor {
    protected $type;

  /**
    * Constructor
    * @param string The plugin type
    */ function __construct( $type ) {
       $this->type = $type; 
    }

  /**
   * Get the type of the plugin or extension point
   * @return string the type
   */
    function getType() {
        return $this->type;
    }
   
  /**
   * Accept a {@link stickleback_DescriptorVisitor} object
   *
   * cf GOF Visitor pattern. This is a mechanism by which a composite
   * Descriptor structure can be traversed
   *
   * @param stickleback_DescriptorVisitor   the visitor that traverses the structure 
   * @param int optional depth (Descriptor objects can provide this data to callback methods in the visitor)
   REFACTOR - epoints no longer to use this
   */
    abstract function accept( stickleback_DescriptorVisitor $visitor, $depth=1 );
}
?>
Return current item: Stickleback