<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Engine_Package_Manifest_Entity_Callback extends Engine_Package_Manifest_Entity_Abstract
{
  protected $_path;
  
  protected $_class;

  protected $_priority = 100;

  protected $_props = array(
    'path',
    'class',
    'priority',
  );

  public function __construct($spec, $options = null)
  {
    if( is_array($spec) ) {
      $options = array_merge($spec, (array) $options);
    }
    if( is_array($options) ) {
      $this->setOptions($options);
    }
    if( is_string($spec) ) {
      $this->setType($spec);
    }
  }

  public function getPath()
  {
    return $this->_path;
  }

  public function setPath($path)
  {
    $this->_path = (string) $path;
    return $this;
  }

  public function setClass($class)
  {
    $this->_class = (string) $class;
    return $this;
  }

  public function getClass()
  {
    return $this->_class;
  }

  public function setPriority($priority)
  {
    $this->_priority = (integer) $priority;
    return $this;
  }

  public function getPriority()
  {
    return $this->_priority;
  }
}
