bitVectorHasState() public static method

public static bitVectorHasState ( integer $bit_vector, integer $flag ) : boolean
$bit_vector integer The bit vector we'd like to get the state for
$flag integer The flag we'd like to get the state for
return boolean True if all bits in the flag are eanbled in the bit vector, else false.
Example #1
0
 /**
  * @return bool
  * True if this is an abstract class
  */
 public function isAbstract() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_ABSTRACT);
 }
Example #2
0
 /**
  * @return bool
  * True if this parameter is pass-by-reference
  * i.e. prefixed with '&'.
  */
 public function isPassByReference() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\PARAM_REF);
 }
Example #3
0
 /**
  * @return bool
  * True if this is a static method
  */
 public function isStatic() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_STATIC);
 }
Example #4
0
 /**
  * @return bool
  * True if this method overrides another method
  */
 public function getIsOverride() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), Flags::IS_OVERRIDE);
 }
Example #5
0
 /**
  * @return bool
  * True if this is a private property
  */
 public function isPrivate() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\MODIFIER_PRIVATE);
 }
Example #6
0
File: Clazz.php Project: etsy/phan
 /**
  * @return bool
  * True if this class is a trait
  */
 public function isTrait() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\CLASS_TRAIT);
 }
Example #7
0
 /**
  * @return bool
  * True if this was an internal PHP object
  */
 public function isInternal() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), Flags::IS_INTERNAL);
 }
Example #8
0
File: Method.php Project: etsy/phan
 /**
  * @return bool
  * True if this method returns reference
  */
 public function returnsRef() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), \ast\flags\RETURNS_REF);
 }
Example #9
0
 /**
  * @return bool
  * True if this method returns a value
  */
 public function getHasReturn() : bool
 {
     return Flags::bitVectorHasState($this->getFlags(), Flags::HAS_RETURN);
 }
Example #10
0
 /**
  * @return bool
  * True if this method yields any value(i.e. it is a \Generator)
  */
 public function getHasYield() : bool
 {
     return Flags::bitVectorHasState($this->getPhanFlags(), Flags::HAS_YIELD);
 }